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