Gigatron as TTL Apple-1 replica

1 post / 0 new
gigatronTTL's picture
Last seen: 3 days 11 hours ago
Joined: Feb 8 2020 - 14:06
Posts: 2
Gigatron as TTL Apple-1 replica

This may amuse some.


My replica of the Apple-1 is in fact a software/hardware mockup. It is an emulation running on my Gigatron TTL microcomputer. The Gigatron is an 8-bit TTL computer. It is essentially no more than a custom CPU made out of 34 SSI/MSI-level 74LS-series TTL chips (so no bulky 74LS181 ALU chip for example). It has 32K of RAM and an EPROM for program memory and application storage. The system runs at 6.25 MHz and its core software takes care of generating VGA signals and sound channels and such. In the little idle time it has it runs a cycle-aware interpreter for 16-bit application code: vCPU, loosely inspired by SWEET16. Cycle-aware interpretion is needed to keep the VGA pulses exactly on time every 200 cycles, as there are no hardware interrupts to do this otherwise. Our philosophy is "if it can be done in software, there's no need to have it in hardware". Even if that complicates writing software, which it often does.


We designed this computer 3 years ago, just for fun. (But we turned it into a soldering kit using 74HCT series chips). And yes, very soon it played a breakout-like game, in 64 colors, and it could run Tiny BASIC. But that wasn't good enough.


Last year, we added a cycle-aware emulation for the 6502 instruction set: v6502. Like vCPU, this also runs in the idle time of the video loop, effectively achieving about 200 kHz instead of 1MHz for the original MOS 6502. So it was good enough we could run Microchess and such. Soon we also added WozMon and the Baum-Wozniak disassembler as published in DrDobbs. There was no PIA emulation, so we abused the BRK instruction for I/O.


Last month we made the last steps: first we added vertical blank interrupt support to the video loop. That in turn allowed us to emulate the PIA by having the interrupt service routine snooping on the D010-D013 addresses! The PIA emulation isn't 100.00% accurate (it can't be when done this way), but it's good enough to fool most A1 software.


The second step, with great help from the 6502 forum, we ported back the Baum-Wozniak mini-assembler to the Apple-1. It works great now, and it was a nice excercise in software archaeology as well. Details on the 6502 forum.




Actually, I came here to express my thanks to Allen Baum and Woz, but I felt it needed a bit of introduction on why I'm so happy with their work :-) And I have no idea how to reach out to these gentlemen otherwise.


In short: I think we can "claim" we now have an Apple-1 replica done in under 40 chips, without microprocessor or video chip. Is it a serious claim? No, it's just part of a hobby. There are some mild anachronisms. And there are quite a few incompatibilities that grew out of historic choices we made. For example, many zero page locations are reserved, page 1 is used by the video system, and the stack runs in the zero-page. And that's all fine with me.