Altair 8800 Help
Richard A. Cini
rcini at optonline.net
Thu Oct 25 20:52:46 CDT 2007
Rick:
Congrats on a great acquisition.
4k BASIC requires a console at ports 0/1 but you could configure later
BASICs (8k, 12k and Disk Extended) to accept other configurations by setting
the front panel toggles properly.
If you look on my emulator site (http://www.altair32.com) you will find
the instructions for booting BASIC (they are actually contained in the help
file for the emulator).
As far as booting the floppy disk is concerned, I think one of the
folders in the emulator distribution has the code for the disk bootstrap in
it. If not, here's what I have. This is used in the 88-DSK emulation to boot
Altair disk images.
Since you have a real operating machine, it'd be great if I could get
binary copies of any interesting disks for the archive and see if I can get
them to boot on the emulator.
Rich
--
Rich Cini
Collector of Classic Computers
Build Master and lead engineer, Altair32 Emulator
http://www.altair32.com
http://highgate.comm.sfu.ca/~rcini/classiccmp
;the altair rom moves this code to 4c00h then jumps to it
;this is a disassembly of the 4c00h code
;C crc on disk doesn't match calculated crc
;M memory error read/back from memory doesn't match
; write to memory (no ram or bad ram)
;O overflow or out of mem caused by trying to load beyond
; ff00 or bad "load limit bytes" on disk.
4C00 DI ;disable interrupts
4C01 LXI SP,4D62 ;load stack pointer
4C04 XRA A ;ZERO IN A
4C05 OUT 08 ;SELECT DRIVE 0
4C07 MVI A,04 ;HEAD DOWN CMD
4C09 OUT 09 ;SEND head down
4C0B JMP 4C19 ;GO TEST FOR TRACK ZERO
4C0E TMVOK: IN 08 ;GET STATUS
4C10 ANI 02 ;TEST FOR MOVE OK
4C12 JNZ 4C0E ;JMP MOVE NOT OK
4C15 MVI A,02 ;step out cmd
4C17 OUT 09 ;send step out
4C19 TTRK0: IN 08 ;GET STATUS
4C1B ANI 40 ;TEST FOR TRACK ZERO
4C1D JNZ 4C0E ;JMP NOT TRACK ZERO
4C20 LXI D,0000 ;DE->0000H
4C23 NXTTK: MVI B,00 ;B=0
4C25 THDDN: IN 08 ;GET STATUS
4C27 ANI 04 ;TEST FOR HEAD DOWN
4C29 JNZ 4C25 ;JMP NOT HEAD DOWN
;SEEK TO SECTOR IN B
4C2C NXTSEC: MVI A,10 ;A=10H 16D RETRY COUNT
4C2E RETRY: PUSH PSW ;SAVE RETRY COUNT
4C2F PUSH D ;NXTMEM
4C30 PUSH B ;B=SECTOR
4C31 PUSH D ;NXTMEM
4C32 LXI D,8086 ;D=80(UNUSED?) E=128=COUNT
4C35 LXI H,4CD4 ;M=POINTER TO INBUFFER
4C38 TSECT: IN 09 ;GET SECTOR# UNDER HEAD AND STATUS
4C3A RAR ;TEST SECTOR TRUE
4C3B JC 4C38 ;jmp TSECT if not true
4C3E ANI 1F ;and sector mask 31d
4C40 CMP B ;DESIRED SECTOR
4C41 JNZ 4C38 ;jmp TSECT if not equal
;READ 134 BYTES TWO AT A TIME INTO INBUFFER
4C44 TRDOK: IN 08 ;get status
4C46 ORA A ;set flags test for read ok
4C47 JM 4C44 ;jmp TRDOK if not read ok
4C4A IN 0A ;get data byte1
4C4C MOV M,A ;move BYTE TO INBUFF
4C4D INX H ;BUMP INPOINTER
4C4E DCR E ;decrement COUNT
4C4F JZ 4C5A ;jmp MVBYTS if DONE
4C52 DCR E ;dec COUNT
4C53 IN 0A ;get data byte2
4C55 MOV M,A ;move to INBUFF
4C56 INX H ;increment POINTER
4C57 JNZ 4C44 ;jmp TRDOK if count in E is not zero
;MOVE 128 DATA BYTES FROM BUFF TO MEMORY MAKE A CRC
4C5A MVBYTS: POP H ;hl (M)=0000h first time
4C5B LXI D,4CD7 ;DE POINTS TO BUFFER + 3
4C5E LXI B,0080 ;B=0=CRC C=128 count
4C61 MVBYT2: LDAX D ;GET BYTE FROM BUFFER
4C62 MOV M,A ;MOVE TO DESTINATION
4C63 CMP M ;CHECK FOR MEMORY PROBLEM
4C64 JNZ 4CC1 ;JMP MERROR if problem
4C67 ADD B ;make a crc
4C68 MOV B,A ;save in B
4C69 INX D ;inc src
4C6A INX H ;inc dest
4C6B DCR C ;dec count
4C6C JNZ 4C61 ;jmp MVBYT2 until count = 0
;CHECK CRC
4C6F LDAX D ;DE POINTS TO BUFFER + 131
4C70 CPI FF ;COMPARE THAT BYTE TO 255
4C72 JNZ 4C78 ;JMP FFERR IF NOT EQUAL
4C75 INX D ;INC DE POINTS TO BUFF+132
4C76 LDAX D ;GET THAT BYTE
4C77 CMP B ;COMPARE TO CRC
4C78 FFERR: POP B ;B=SECTOR
4C79 XCHG ;DE->NEXT DEST HL->BUFF+132
4C7A JNZ 4CB5 ;CRC ERROR GO CRCERR
;CHECK FOR OUT OF MEMORY CHECK DONE LOADING
4C7D POP PSW ;0000H FIRST TIME
4C7E POP PSW ;ACC=16
4C7F LHLD 4CD5 ;L=BUFF+1 H=BUFF+2
4C82 PUSH D ;SAVE NEXT DEST 0080 first time
4C83 LXI D,FF00 ;DE->BOOTROM(END OF MEMORY)
4C86 CALL 4CCE ;COMPARE1 FF00H,HL OUT OF MEMORY (HL GREATER THAN
FF00H)
4C89 POP D ; NEXT DEST
4C8A JC 4CBE ;JMP 'O'UT OF RAM ERROR (HL GREATER THAN FFOOH)
4C8D CALL 4CCE ;COMPARE2 DE,HL ARE WE DONE LOADING?
4C90 JNC 4CAE ;IF NO CARRY (HL <= NEXT DEST)WE'RE DONE GO EXECUTE
;CALCULATE NEXT SECTOR AND TRACK
4C93 INR B ;ADD 2 TO SECTOR#
4C94 INR B ;
4C95 MOV A,B ;DESIRED NEXT SECTORA
4C96 CPI 20 ;TEST IF SECTORA LESS THAN 32
4C98 JC 4C2C ;IF LESS GO GET IT
4C9B MVI B,01 ; IF NOT LESS MAKE DESIRED SECTORB=1
4C9D JZ 4C2C ;IF SECTORA EQUALED 32 GO GET SECTORB=1
4CA0 IN 08 ;ELSE GET STATUS
4CA2 ANI 02 ;TEST MOVE OK
4CA4 JNZ 4CA0 ;UNTIL MOVE IS OK
4CA7 MVI A,01 ;STEP IN CMD
4CA9 OUT 09 ;SEND STEP IN CMD
4CAB JMP 4C23 ;START LOADING FROM NEXT TRACK SECTORB=0
;load the even sectors on a track first
;then the odd sectors
;DONE
4CAE MVI A,80 ;
4CB0 OUT 08 ;CLEAR CONTROLLER
4CB2 JMP 0000 ;GO
;CRC ERROR RETRY PSW TIMES
4CB5 CRCERR: POP D
4CB6 POP PSW ;
4CB7 DCR A ;DECREMENT RETRY COUNT
4CB8 JNZ 4C2E ;IF NOT 0 GO RETRY
;CLEAR CONTROLLER SEND TO CONSOLE ERROR MESSAGE
4CBB MVI A,43 ;ELSE LOAD A WITH CHAR 'C'RC ERROR
4CBD LXI B,4F3E ;GARBAGE
;4CBE MVI A,4F ; LOAD A WITH CHAR 'O'verflow
4CC0 LXI B,4D3E ;GARBAGE
;4CC1 MERROR: MVI A,4D ; LOAD A WITH CHAR 'M'EMORY ERROR
4CC3 MOV B,A ;SAVE CHAR
4CC4 MVI A,80 ;CLEAR CONTROLLER
4CC6 OUT 08 ;SEND CLEAR
4CC8 MOV A,B ;GET CHAR
4CC9 OUT 01 ;SEND error char TO CONSOLE
4CCB JMP 4CC9 ;OVER AND OVER and over...
;TEST FOR OVERFLOW, TEST load limit, COMPARE HL,DE
4CCE MOV A,D ;
4CCF CMP H ;
4CD0 RNZ ;
4CD1 MOV A,E ;
4CD2 CMP L ;
4CD3 RET
;BEGINNING OF IN BUFFER
4CD4 ADD H
On 10/25/07 9:34 PM, "Rick Bensene" <rickb at bensene.com> wrote:
>
> Hello, all,
>
> I recently acquired a very nice Altair 8800 with 40K of RAM (1 non-MITS
> 16K Static RAM board, and 3 MITS 4K Static RAM Boards, a MITS Version 1
> 8080 CPU Board, a MITS 2SIO, a MITS 88-DCDD floppy disc controller (two
> board pair), a MITS PROM board (8-slots for 1702 256-byte PROMS), a MITS
> 4-port Parallel card, and two MITS 8" floppy disc drive enclosures,
> along with a Televideo 912 Terminal, a heavily modified CT-1024
> "TV-Typewriter", and a serial TI 810 printer, and an 18-slot (non-MITS)
> motherboard with an upgraded power supply. That along with boatloads of
> spare parts, a bus extender, a couple of unused S-100 bus prototyping
> cards, an unstuffed Ithaca Audio S100 board (not sure what it is), all
> of the original Altair documentation, a bunch of 8" floppies (including
> original various version of MITS (Micro-soft) BASIC, MITS DOS, and
> FORTRAN complier, and a bunch of documentation written by the former
> owner of the system.
>
> I very carefully inventoried everything first, then pulled out all of
> the boards from the CPU and tested out the power supply, first
> un-loaded, then under dummy loads, then powered it up with the front
> panel power leads connected, but no other boards, and all looked good.
> Then I plugged in the CPU board and the 16K static RAM board, and
> powered up and could reliably examine and deposit data into the RAM. I
> then wrote some simple test programs and toggled them in, such as
> reading the sense switches and storing their content into a memory
> location, setting all (as much of possible without getting too fancy) of
> memory to a specific value, then verifying it, and various other CPU
> functionality tests.
>
> All the little test I did passed with flying colors. I then added in
> the three 8K MITS RAM boards, and they all seemed to work fine also.
>
> Then I plugged in the 2SIO board, but didn't have a cable to connect the
> port clearly configured on the board as the console port to the
> terminal, so I've got some work to do there. Tonight, I'm hoping to
> write a little test code using HYPERTERM or the like on a laptop to
> read/write characters through the console port. The other port is
> configured strangely, and I need to do some jumper wire tracing to
> figure out how it's configured.
> So, the CPU itself seems great. Next, I checked out the floppy
> controller boards, making sure all of the chips were well-seated (they
> were all socketed), and checked the power supply lines and regulators to
> make sure they were OK.
> Put the board set into the system, plugged "DRIVE 0" into the CPU, and
> toggled in some very basic floppy controller functionality tests that
> are included in the manual for the controller, and tried out the tests.
> They all passed just fine per the results that should be obtained as
> mentioned in the manual.
>
> So, here's the dilemma. The PROM board is currently configured at a
> start address of 1 111 100 000 000 000 (174000 Octal, or 0xF800). I
> plugged all of the PROMs into the sockets (there were five different
> ROMs that I found, including one that had a label that indicated that it
> was some kind of BOOT ROM). I started examining memory at 0xF800, and
> found that most all of the PROMs contained all zeros...either erased, or
> suffering from failure due to extreme age (date codes of '76), and/or
> no covers over the windows. The one PROM that responded was the one
> that had the label hinting that it might be a boot PROM. So, I wrote
> down the content of the PROM and went about hand disassembling it. It
> does indeed appear to talk to the floppy controller, which is hard-coded
> at I/O Addresses 0x10, 0x11, and 0x12), as there are a lot of IN and OUT
> instructions referencing these I/O addresses. Looking at the various
> absolute jump addresses in the ROM, it appers to be coded to run at
> 0x4Cxx, or 046xxx Octal. If I set the start address of the ROM board to
> make this ROM appear in the proper place, it'll conflict with the RAM
> installed in the system.
>
> I have a number of disks which I'd like to try to boot from, including:
>
> ALTAIR DISK EXTENDED BASIC
> REVISION 4.1 JUNE 1977
> COPYRIGHT 1988 BY MITS INC.
>
>
> Another disk with the following:
> MITS DISK OPERATING SYSTEM (DOS)
> VERSION #1.0 MFG: 03/13/78
> COPYRIGHT 1977 BY MITS INC.
> FLOPPY DISK
> (NWD) SN: 10396
>
> Which also has a label below this one saying
>
> FORTRAN COMPILER
> VERSION #2.8 MFG:06/05/78
> COPYRIGHT 1978 BY MITS INC.
> COPYRIGHT 1978 BY MICROSOFT INC.
> (NWD) SN: 10152
>
>
> Also on this same disk is a small label saying:
>
> (C)MICROSOFT 1977
> ALBUQUERQUE, NEW MEXICO
>
>
> And another disk that says:
>
> ALTAIR COMPUTER CENTER
> BEAVERTON, OREGON
> DISK COPY UTILITY VERSION 2.0 14-APR-78
> SN: 10058 7808
> NOTE: THIS DISKETTE WILL NOT COPY ITSELF
>
> All of the labels on these disks are original manufacturer
> labels...these disks are the genuine thing, not copies.
>
> Clearly, I'd love to be able to boot these disks. I think that the
> floppy controller is good. The system even came with a Alignment Disk,
> so I toggled in some of the routines that would allow observation of the
> tracking (cats-eye) and index/sector (it's a hard-sectored controller)
> stuff with an oscilloscope, and everything looked perfect.
>
> I just need some bootstrap code. I've looked around in all of the
> documentation, and there's no boot code listed in the docs for the
> floppy subsystem. There are small bootstrap routines to load code over
> the 2SIO board (presumably from a paper-tape reader on an ASR-33 TTY),
> another from a parallel port (presumably from one of those little
> optical tape readers that you'd pull the tape through, wasn't it a
> company called OAE?), and another from cassette (but I don't have an
> interface board for cassette). I've thought of writing a small program
> that would copy the boot code out of the PROM into the proper space
> within RAM, and then JMPing to it, but not sure if that'll work or
> not...I suppose it's worth a try, but haven't done that yet.
>
> I've perused the web a lot looking for boot code for the Altair floppy
> controller, and haven't been able to find anything.
>
> Any Altair experts out there that might have some floppy boot code for
> the Altair 88DCDD floppy controller that might work to boot up the MITS
> DOS, or DISK EXTENDED BASIC floppies I've got? Also, anyone know the
> default console port I/O address that these products expect the serial
> console to be at? I assume the FORTRAN compiler runs under MITS DOS,
> and that's why the two products are together on the same disk. Right
> now I've only got one of the floppy drives connected up, but I'd expect
> that the FORTRAN compiler will need the 2nd drive in order to do
> anything useful, but I'm trying to take things one step at a time.
>
> I've got a manual for Altair DOS, and it does describe the disk format,
> so I suppose I could write a boot program myself, but it'd be a lot
> easier just to find someone that already has the stuff.
>
> Also, if anyone knows where Altair DOS and Disk Extended BASIC expect
> the serial console (e.g, I/O Port Address), that too would be helpful.
>
> If anyone could help, I'd sure appreciate it.
>
> Thanks in advance,
> Rick Bensene
> The Old Calculator (and sometimes Computer) Museum
> http://oldcalculatormuseum.com
>
Rich
--
Rich Cini
Collector of Classic Computers
Build Master and lead engineer, Altair32 Emulator
http://www.altair32.com
http://highgate.comm.sfu.ca/~rcini/classiccmp
More information about the cctech
mailing list