First Commit of my working state
[simh.git] / ALTAIR / altair.txt
1 Altair 8800 Simulator
2 =====================
3
4 1. Background.
5
6 The MITS (Micro Instrumentation and Telemetry Systems) Altair 8800
7 was announced on the January 1975 cover of Popular Electronics, which
8 boasted you could buy and build this powerful computer kit for only $397.
9 The kit consisted at that time of only the parts to build a case, power
10 supply, card cage (18 slots), CPU card, and memory card with 256 *bytes* of
11 memory. Still, thousands were ordered within the first few months after the
12 announcement, starting the personal computer revolution as we know it today.
13
14 Many laugh at the small size of the that first kit, noting there
15 were no peripherals and the 256 byte memory size. But the computer was an
16 open system, and by 1977 MITS and many other small startups had added many
17 expansion cards to make the Altair quite a respectable little computer. The
18 "Altair Bus" that made this possible was soon called the S-100 Bus, later
19 adopted as an industry standard, and eventually became the IEE-696 Bus.
20
21 2. Hardware
22
23 We are simulating a fairly "loaded" Altair 8800 from about 1977,
24 with the following configuration:
25
26 device simulates
27 name(s)
28
29 CPU Altair 8800 with Intel 8080 CPU board, 62KB
30 of RAM, 2K of EPROM with start boot ROM.
31 2SIO MITS 88-2SIO Dual Serial Interface Board. Port 1
32 is assumed to be connected to a serial "glass
33 TTY" that is your terminal running the Simulator.
34 PTR Paper Tape Reader attached to port 2 of the
35 2SIO board.
36 PTP Paper Tape Punch attached to port 2 of the
37 2SIO board. This also doubles as a printer
38 port.
39 DSK MITS 88-DISK Floppy Disk controller with up
40 to eight drives.
41
42 2.1 CPU
43
44 We have 2 CPU options that were not present on the original
45 machine but are useful in the simulator. We also allow you to select
46 memory sizes, but be aware that some sample software requires the full
47 64K (i.e. CP/M) and the MITS Disk Basic and Altair DOS require about
48 a minimum of 24K.
49
50 SET CPU 8080 Simulates the 8080 CPU (normal)
51 SET CPU Z80 Simulates the later Z80 CPU [At the present time
52 this is not fully implemented and is not to be
53 trusted with real Z80 software]
54 SET CPU ITRAP Causes the simulator to halt if an invalid 8080
55 Opcode is detected.
56 SET CPU NOITRAP Does not stop on an invalid Opcode. This is
57 how the real 8080 works.
58 SET CPU 4K
59 SET CPU 8K
60 SET CPU 12K
61 SET CPU 16K
62 ......
63 SET CPU 64K All these set various CPU memory configurations.
64 The 2K EPROM at the high end of memory is always
65 present and will always boot.
66
67 The BOOT EPROM card starts at address 177400. Jumping to this address
68 will always boot drive 0 of the floppy controller. If no valid bootable
69 software is present there the machine crashes. This is historically
70 accurate behavior.
71
72 The real 8080, on receiving a HLT (Halt) instruction, freezes the processor
73 and only an interrupt or CPU hardware reset will restore it. The simulator
74 is alot nicer, it will halt but send you back to the simulator command line.
75
76 CPU Registers include the following:
77
78 name size comments
79
80 PC 16 The Program Counter
81 A 8 The accumulator
82 BC 16 The BC register pair. Register B is the high
83 8 bits, C is the lower 8 bits
84 DE 16 The DE register pair. D is the top 8 bits, E is
85 the bottom.
86 HL 16 The HL register pair. H is top, L is bottom.
87 C 1 Carry flag.
88 Z 1 Zero Flag.
89 AC 1 Auxillary Carry flag.
90 P 1 Parity flag.
91 S 1 Sign flag.
92 SR 16 The front panel switches.
93 BREAK 16 Breakpoint address (377777 to disable).
94 WRU 8 The interrupt character. This starts as 005
95 (ctrl-E) but some Altair software uses this
96 keystroke so best to change this to something
97 exotic such as 035 (which is Ctl-]).
98
99
100 2.2 The Serial I/O Card (2SIO)
101
102 This simple programmed I/O device provides 2 serial ports to the
103 outside world, which could be hardware jumpered to support RS-232 plugs or a
104 TTY current loop interface. The standard I/O addresses assigned by MITS
105 was 20-21 (octal) for the first port, and 22-23 (octal) for the second.
106 We follow this standard in the Simulator.
107
108 The simulator directs I/O to/from the first port to the screen. The
109 second port reads from an attachable "tape reader" file on input, and writes
110 to an attachable "punch file" on output. These files are considered a
111 simple stream of 8-bit bytes.
112
113 2.3 The 88-DISK controller.
114
115 The MITS 88-DISK is a simple programmed I/O interface to the MITS
116 8-inch floppy drive, which was basically a Pertec FD-400 with a power
117 supply and buffer board builtin. The controller supports neither interrupts
118 nor DMA, so floppy access required the sustained attention of the CPU.
119 The standard I/O addresses were 10, 11, and 12 (octal), and we follow the
120 standard. Details on controlling this hardware are in the altair_dsk.c
121 source file.
122
123
124 3. Sample Software
125
126 Running an Altair in 1977 you would be running either MITS Disk
127 Extended BASIC, or the brand new and sexy CP/M Operating System from Digital
128 Research. Or possibly, you ordered Altair DOS back when it was promised in
129 1975, and are still waiting for it to be delivered in early 1977.
130
131 We have samples of all three for you to check out. We can't go into
132 the details of how they work, but we'll give you a few hints.
133
134
135 3.1 CP/M Version 2.2
136
137 This version is my own port of the standard CP/M to the Altair.
138 There were some "official" versions but I don't have them. None were
139 endorsed or sold by MITS to my knowledge, however.
140 To boot CP/M:
141
142 sim> attach dsk0 altcpm.dsk
143 sim> go 177400
144 62K CP/M VERSION 2.2 (ALTAIR 8800)
145 A>DIR
146
147 CP/M feels like DOS, sort of. DIR will work. I have included all
148 the standard CP/M utilities, plus a few common public-domain ones. I also
149 include the sources to the customized BIOS and some other small programs.
150 TYPE will print an ASCII file. DUMP will dump a binary one. LS is a better
151 DIR than DIR. ASM will assemble .ASM files to Hex, LOAD will "load" them to
152 binary format (.COM). ED is a simple editor, #A command will bring the
153 source file to the buffer, T command will "type" lines, L will move lines,
154 E exits the editor. 20L20T will move down 20 lines, and type 20. Very
155 DECish. DDT is the debugger, SUBMIT is a batch-type command processor.
156 A sample batch file that will assemble and write out the bootable CP/M
157 image (on drive A) is "SYSGEN.SUB". To run it, type "SUBMIT SYSGEN".
158
159
160 3.2 MITS Disk Extended BASIC Version 4.1
161
162 This was the commonly used software for serious users of the Altair
163 computer. It is a powerful (but slow) BASIC with some extended commands to
164 allow it to access and manage the disk. There was no operating system it
165 ran under. To boot:
166
167 sim> attach dsk0 mbasic.dsk
168 sim> go 177400
169
170 MEMORY SIZE? [return]
171 LINEPRINTER? C [return]
172 HIGHEST DISK NUMBER? 0 [return] (3 here = 4 drive system)
173 NUMBER OF FILES? 3 [return]
174 NUMBER OF RANDOM FILES? 2 [return]
175
176 44297 BYTES FREE
177 ALTAIR BASIC REV. 4.1
178 [DISK EXTENDED VERSION]
179 COPYRIGHT 1977 BY MITS INC.
180 OK
181 mount 0
182 OK
183 files
184
185
186 3.3 Altair DOS Version 1.0
187
188 This was long promised but not delivered until it was almost
189 irrelevant. A short attempted tour will reveal it to be a dog, far inferior
190 to CP/M. To boot:
191
192 sim> attach dsk0 altdos.dsk
193 sim> go 177400
194
195 MEMORY SIZE? 64 [return]
196 INTERRUPTS? N [return]
197 HIGHEST DISK NUMBER? 0 [return] (3 here = 4 drive system)
198 HOW MANY DISK FILES? 3 [return]
199 HOW MANY RANDOM FILES? 2 [return]
200
201 056769 BYTES AVAILABLE
202 DOS MONITOR VER 1.0
203 COPYRIGHT 1977 BY MITS INC
204 .mnt 0
205
206 .dir 0
207
208
209
210
211