Code attached. I used ca65 for the 6502 code and asl for the 6800 code. I have not completed commenting all the 6800 code. I wrote it very quickly over the weekend (mostly late last night).
Both codes were written for the Apple-1. The Apple-1 was designed to support the 6502 and the 6800, however Woz picked the 6502 (reason: $25 vs. $175 cost, source:
http://apple2history.org/history/ah02/). Last year, Eric Smith, as part of the Summer Retro Challenge created the 6800 Monitor ROM for the hypothetical 6800-based Apple-1. Eric also created a set of MESS patches you can apply so that you can own a 6800-based Apple-1 today! :-)
The code below was created for both Apple-1 emulators (6502 and 6800)
- apple1_6800_pi.zip
- asl code, sorry still working on comments.
- (4.14 KiB) Downloaded 380 times
I'll be tinkering with optimization over the next six months as I complete my 8080, z80, 6809, and 8088 versions. The rules are simple:
1. Must be able to rerun without reloading, i.e. no precomputed values (e.g. pre zero'd arrays).
2. No self-modifying code.
3. Optimize for target CPU, use all tricks.
4. Same N(O^2) algorithm for all.
5. Have a life. Do not spend hours to shave off sub seconds.
6. Assume and respect some form of native environment or OS (e.g. do not tape load to direct page of running monitor in Apple-1 to load tables).
If any of you can find ways to significantly improve performance, then please pass on to me via email (
datajerk@gmail.com).
Thanks.