• Please review our updated Terms and Rules here

Altair 8800 simulator for Apple II

Joined
Sep 27, 2016
Messages
27
I'm working on an Altair 8800 simulator that runs on the Apple II.

Yes, emulating one old computer on another. This is made possible by an 8080 emulator written for 6502 by Dann McCreary in 1977, then ported to Apple II in 1979. I've updated the emulator and added a graphical front end to simulate the front panel of the Altair 8800.

Not being terribly familiar with the 8800 other than what I've seen on YouTube and some scanned PDFs, I'd like the feedback from some other testers.

You will need an Apple II (II+, IIe, IIc) or an emulator like Virtual II, some way to boot a DSK, and a color display.

Please PM me if you want to give it a try and can give good feedback on how well it emulates a real 8800.

Screenshots to whet your appetite:

Screen Shot 2019-03-01 at 11.46.06 AM.jpg
Screen Shot 2019-03-01 at 11.46.23 AM.jpg
 
Cool! I tried entering the simple counting program:

0000:
16 FF 7A D3 FF 01 FF FF
0B 78 B1 C2 08 00 15 C3
02 00

But when I get to address 000E, entering C3 and "O" sets the PC=C3. Same for other values. Trying to deposit to 000F with "P" does the same thing.
 
All programs in the simulator need to start at $1000 not 00, otherwise they will clobber the 6502 0 page, which leads to unexpected results.
 
OK, toggled in this updated counter program:

1000:
16 FF 7A D3 FF 01 05 00
0B 78 B1 C2 08 10 15 C3
02 10

The pause is short and could be accommodated in a single register. It seems that the (simulated) simulation is about 60000 times slower than real 8080 hardware. ;)

Fun stuff!!!
 
Emulating a 2mhz processor with three 16-bit register pairs on a 1mhz processor with two 8-bit registers will do that. Just wait until I get BASIC running on it, then you'll see how slow it really is.
 
On that note, can someone with real hardware and BASIC installed run this benchmark program and time it?

100 PRINT "Interface Age Prime-Number Benchmark Program"
110 FOR N=1 TO 200
120 FOR K=2 TO 100
130 M=N/K
140 L=INT(M)
150 IF L=0 THEN 200
160 IF L=1 THEN 190
170 IF M>L THEN 190
180 IF M=L THEN 210
190 NEXT K
200 PRINT N
210 NEXT N
220 PRINT
230 PRINT
240 PRINT "Done"
250 END
 
For reference, the above code took 3 hour 25 minutes to run in the simulator.

Title for World's Slowest BASIC?
 
You will need an Apple II (II+, IIe, IIc) or an emulator like Virtual II, some way to boot a DSK, and a color display.

If you had a version for the IIgs, then you'd at least have native 16 bit to speed it up, and extra host memory available for the emulated memory space.
 
I now have a version of the simulator with a rudimentary emulated teletype I/O - so you can type into it, and receive text back on the screen. It's enough to run MS Altair BASIC, which it pretty cool, and the source of the aforementioned 3+ hour benchmark. I never said this was going to be a fast emulator.

Looking now for other programs, OSes, demos that will work with this setup - essentially an Altair 8800 with 8k, SIO card and teletype/paper tape reader. Any thoughts?
 
Got Microchess working now

Got Microchess working now

Screen Shot 2019-03-20 at 11.58.55 AM.jpg

I had to patch its input routine slightly to match more closely the one from 4K BASIC, since it was filling up its input buffer with NULLs for some reason. Still working out if that's a problem with the emulation, or if Microchess is expecting something different in terms of the serial board setup.
 
With bank switching and a 128K Apple IIe, I can now address 64K of contiguous memory in the emulator. This means CP/M. And that means... Zork!

Screen Shot 2019-04-19 at 11.24.56 PM.jpg
 
On that note, can someone with real hardware and BASIC installed run this benchmark program and time it?

100 PRINT "Interface Age Prime-Number Benchmark Program"
110 FOR N=1 TO 200
120 FOR K=2 TO 100
130 M=N/K
140 L=INT(M)
150 IF L=0 THEN 200
160 IF L=1 THEN 190
170 IF M>L THEN 190
180 IF M=L THEN 210
190 NEXT K
200 PRINT N
210 NEXT N
220 PRINT
230 PRINT
240 PRINT "Done"
250 END

Hi, I just did this on my SOL-20 (8080) running MBASIC.COM in CP/M The execution time is 81 seconds +/- about 1 second.

Recently I wrote a small program to output the values of a sine function to the parallel port and timed the cycle. Of all the "BASICS" I tried MBASIC was the quickest.
 
Back
Top