When I was a pre-teen I cut my teeth programming on small 8 bit system called a ZX Spectrum. Friends of mine had similar machines including a ZX 81 which was an earlier model by the same company, the Microbee (in that case it was the original kit version that his father helped him put together) and a Super 80 (which was a another machine that came as a kit).

The Microbee

Although I loved my Speccy I was a bit jealous of my friends with the kit based machines (especially my friend with the Super-80, his Dad seemed to be forever building little add-ons and extensions for that machine). When I started high school a group of seniors in the computer club designed and built their own Z80 based single board computer. As a lowly first year there was no way I was going to be allowed to be involved in that but I use to hang out in the computer lab listening to their discussions, watching what they did and trying to soak up as much information about it as I could. This led to my interest in electronics and was probably the reason I work mostly with embedded devices now.

At the time electronics was quite an expensive hobby to get into and my family and I simply didn't have the budget to support it, software on the other hand is free to write so I gravitated more in that direction. It's only been in the last few years that I've picked up on the electronics side of things again.

A Favourite Book

One of the things I've always wanted to do is build my own single board 8 bit system, over the years I've been collecting the bits and pieces I thought that might be useful for this project as well as making design notes, collecting information and preserving as many old magazines and books on the subject as I can before they disappear down the memory hole. I've got quite a nice collection of older CPU's (Z80, 6800, 6502 and 6809), static RAM chips and EPROMS.

Over time my design for the system has evolved to incorporate new technology that wasn't available at the time these systems first came out. There are I2C controllers that provide an 8 bit wide parallel interface to the CPU that can be used to access a wide range of functionality including serial EEPROM, RTC chips and ADC's. My most recent design includes an ATMega as a system management, peripheral controller and interrupt controller - this would let me skip using an EPROM in the final design as the ATMega could initialise the memory with the bootloader code from an SD card or from it's own flash. Once it's got the system up and running it can go into slave mode and provide an interface to the SD card to the main CPU.

Not a Hex Keypad

There's also some much better development tools available now as well - decent ANSI C compilers for 8 bit processors for example (there is even a version of GCC for the 6809 CPU available). Over the years I've played around with emulating my designs in software and writing some sample code for them. I have a large collection of code related to this little obsession of mine.

This has been a very interesting (and strangely calming) project that I return to whenever I get frustrated or stuck with a current project. Given that I need to apply some thought to what to do next to proceed with the Babyduino project I went back and reviewed my notes and code to give my mind a chance to mull over the Babyduino issues in the background.

This time around I had an epiphany triggered by some things I have been looking at recently. Given that there are now some quite powerful 32 bit micro-controllers available in 28 pin PDIP format (the PIC32 and NXP LPC1114FN28 for example) it would be possible to use one of these as the basis of the circuit and simply emulate the target CPU. This would simplify the electronics side of the project no end. Even though it could be considered cheating it would still have the retro feel to it (all through hole components, no SMD, laid out on a single sided, single layer PCB or veoboard) with some more modern twists (SD card support and an I2C bus for example).

This Runs CP/M

Not long ago I came across SpritesMods site that had an interesting project where he emulated an 8080 on an ATMega88 accurately enough to run CP/M and the game Zork. I highly recommend reading through all that site, the author is very talented and you will learn a lot.

Given that it is possible to accomplish that on a 20MHz 8 bit micro-controller it should be easy (or relatively easy at least) to emulate the CPU plus some reasonably complex peripherals on a 32 bit CPU running at 50MHz or higher. Another benefit would be that a simple change of firmware to change the CPU being emulated while sharing the peripheral emulation code.

Anyway, I've added more notes and brief design sketch to a project that has been going on for a very long time. A nice side effect is that I've flushed out any pre-conceptions I had about the Babyduino project and I'm ready to address the problems I need to solve with a fresh mind.