Much of the attraction of retro computing is the chance to understand how a machine really works. For some, that’s about building a thorough knowledge of the library of games and tools that came with a classic computer. For others, it’s about developing new software for retro consoles. For a dedicated few, it evolves into the desire to make your own device, to your own unique design. What better way to understand how computers work than to put together a complete working system from individual parts?

There are a number of such systems out there, including Ben Eater’s 6502 breadboard computer, and as an alternative, this Z80 based machine. However, The Byte Attic has gone one further… or perhaps two further, with a design of an educational single board computer featuring not only the 6502, but also the Z80 and a more modern ATMega chip to co-ordinate the system.

Cerberus The Cerberus Computer is not only an elegant looking machine, it is also a very honest 8-bit computer that features a ground-up video circuit design that is thoroughly documented and explained in The Byte Attic’s video series. Though the ATMega microcontroller provides modern conveniences such as loading from SD Card, the core of Cerberus is a logic design that is true to early 1980’s computing. There are no trick FPGAs, or ARM chips running at hundreds of megahertz to generate impossible video signals. Instead, programmable logic provides a 40 character by 30 row, black and white character mapped VGA display. Either of the two classic 8-bit microprocessors on the board can be selected to run, and then have complete control of the system.

The end result is a computer that would not appear out of place next to a ZX81 or Jupiter Ace, except designed without the technical compromises that those groundbreaking 80’s computers had to make in order to be affordable. Cerberus comes equipped with 64K ram, all of which is available to the selected microprocessor. Video is output at 320x240 resolution through a standard VGA connector. And whilst the microprocessors are determinedly 8-bit, they are more recent devices - so the 6502 is actually a 65c02, and both it and the Z80 can run at up to 8MHz.

This is a unique design then, not intended to be a recreation of an existing computer, or compatible with existing software. It is however extremly clean and straightforward, making it a great machine to learn about assembly language and computer architecture.

Practicalities

In practice, the ATMega acts as a supervisor to the system. When it is turned on, the modern microcontroller takes charge of the system RAM and provides a command line and simple monitor program. It also handles keyboard input via a standard PS2 socket. This allows software to be loaded up from SD card, tests to be run and the processor and speed to be selected (4Mhz or 8Mhz). By default, the ATMega configures the memory so that interrupt vectors, stack space and other expected values are set for both 6502 and Z80 operation.

Video

Then control is handed over to the selected microprocessor and the ATMega takes a back seat, only concerning itself with keyboard input. Key presses cause the running 8-bit chip to receive an interrupt, and the key value is put into a ‘mailbox’ location in RAM. This makes responding to user input very simple, unlike ancestors such as the ZX81 which had complex keyboard polling routines.

The character mapped display is equally easy to use, and very flexible. The 40 by 30 grid maps to a 1200 byte area of memory that can be written to at will. Each of the 256 characters is defined in a separate 2K area of RAM which is initialised with a standard 8-bit font on boot, but can then be rewritten freely. Font and character map are handled with dual-port memories, so the running microprocessor does not have to account for timing or delays. Indeed the video circuitry runs entirely asynchronously. This is a convenience that was not available to the lowly ZX81, which spent much of it’s time entangled with video output.

The observant amongst you will have noticed there is no mention of ROM. The simple answer is that there is none. The microprocessors are presented with a full 64K of RAM, initialised by the ATMega before they run, and they can then do whatever they want with it. As such, there is no operating system. With such a straightforward architecture, little is needed to get going with Cerberus. Most of the management functionality is crammed into the ATMega, written using the Arduino development environment.

Development - And Getting One

Cerberus has been developed over an eight month period, with regular updates and deep technical explanations on The Byte Attic’s YouTube Channel. With the final revision of the PCB currently on order, the plan is that full details of the system will be available on GitHub, so that anyone can make or modify their own Cerberus machine. With a bit of luck, short runs of kits may become available through Tindie or other services, but it will be possible to make your own should you wish.

This also leaves the door open for further development of the firmware that drives Cerberus, and software to run on it. As a didactic platform, the goal has been to help people learn about hardware, and to have an introduction to developing software on an open platform. Hopefully, Cerberus will gain some attention as a great introductory platform for microprocessor development.

In the mean time, I have taken the opportunity to write an emulator for the 6502 side of the system, which runs in the browser here This is a work in progress and an excuse for me to work on online development tools that should support not only Cerberus, but my own hardware designs. The emulator supports uploading binary files, and runs at 4Mhz. In future, I hope to add a disassembler and assembler to complete the tool chain and allow Cerberus software to be easily developed and debugged.

The latest updates on Cerberus can be seen on The Byte Attic’s Twitter feed.

Specs

For reference, these are the Specs of Cerberus at the time of writing:

Processors Z80 4/8Mhz
  65c02 4/8Mhz
  ATMega328P 16Mhz
Ram 64Kb
Rom None
Storage SD-Card
Display 320x240 black and white, character mapped (40x30)
Input PS2 Keyboard connector
Sound Piezo buzzer
Expansion Address and Data buses available