GOOD COMPUTER: a modern 80's-style computer

A photograph of a electronic circuit board, with two microchips, two
LEDs, a push button and a number of other components.

In 2020 I decided, with tongue firmly in cheek, to build the only good computer. The idea/constraint was: what would it look like to build a late-70s-early-80s-style 8-bit computer in 2020?

The design is unremarkable, in that it hews fairly closely to the Microchip megaAVR reference design. Two important additions are a 128KB serial memory for program data storage, and a USB-serial module for program IO (not programming). Getting boards fabricated was a good opportunity to learn a little about KiCad and the process generally but its not the most interesting part of the project.

The software has been the really interesting experience. In the style of an 8-bit machine, I wanted my computer to be entirely self-contained, which meant being able to write programs directly on it. To do this, I implemented a dialect of BASIC in AVR assembly, including an interactive line editor, a memory manager and an XMODEM program loader. The goal was to be able to type in BASIC programs from books of the era, notably the classic Usborne series.

Once this was done, I looked about for other interesting software that my computer could run, and began to think about games. I’ve long been interested in the Z-machine, the virtual machine underneath the classic Infocom text adventures (that is: Zork). So I implemented the Z-machine in assembly for my computer, to the point that any of the original Infocom games game be loaded via XMODEM and played in their entirety.

The project is ongoing, with no particular end goal in mind. Mostly, I have an idea and then work out what I have to do to make it happen. This attitude has lead to some fascinating problems that I’ve had to solve.

On the software side, there’s been times where I’ve had to dig around in old papers and books looking for things like integer math algorithms, infix expression parsing and random number generation. There’s also just been some complicated code required to work around the constraints in the hardware; for example, the Z-machine maintains the world state in a complex object tree, and the AVR I chose has only a tiny working memory with the larger external memory on the end of a serial line, so there’s a lot of care required to move data in and out without making a mess of things.

On the hardware side, a lot of the challenges have just been in debugging things without expensive equipment readily available. As well as the usual bits of dodgy wiring and blown crystals, there’s also been problems with bus timings, difficulty figuring out initialisation sequences for peripheral devices and having to make sense of data sheets that are sometimes just plain wrong, and that’s if you can even find datasheets!

I’m proud of this project. Of course I understand that its 50 years late and there’s very little innovation to be seen, but that was never the point. I have dreamed of designing and building my own computer since I was a teenager, and now I have! I’ve now had the experience of building something from scratch, hardware and software, and the elation of finally cracking a tricky problem after days of banging on it knowing that its just me and the electrons. I feel like in a small way I’ve experienced for myself what the pioneers of our industry have experienced, and I think those connections to our past are important as we try to advance the state of the art.

Further reading: