I’m going to do a series of blog posts on retrocomputing.
In this first video, I introduce the retrocomputing platform that I’m going to be using. It’s the RC2104, by Spencer, who goes by the handle Semachthemonkey on Tindie. I purchased one of his RC2104 “full monty” kits and assembled and tried it out in the video above.
Introduction
So why did I choose the RC2014 and the Z80 microprocessor for my retrocomputing projects? First, I’ve never owned a Z80, so it was an opportunity for something new. Second, I liked the design of the RC2104 backplane. It offers plenty of room for expansion, for me to design and integrate my own modules. 40-pin headers are easy to come by and easy to work with. Once you populate the backplane out with a bunch of boards for various peripherals, it makes an impressive collection of PC boards and chips.
![rc2014_with some additional boards]()
rc2014 with some additional boards
A basic RC2014 build consists of: CPU, RAM, ROM, Clock, and Serial. That’s a total of five boards on the backplane leaving room for three additional boards. In the picture above, I’ve added a bus monitoring board, a real-time clock board, and replaced the default Clock board with an I2C bus supervisor that I’m still working on. I’ll be describing the various add-on boards in subsequent blog posts.
Architecture
![Retrocomputer Architecture]()
Retrocomputer Architecture
The Z80 has an Address, Data, and a control bus. The Address bus is 16 bits consisting of address pins A0-A15. The Data bus is 8 bits consisting of D0-D8. The Control bus has a number of signals, the most important ones to us when interfacing to peripherals are M1, WR, RD, IORQ, and MEMRQ.
Modules
The RC2014 Full Monty kit provided me with the standard set of modules that I needed to get the computer working. They are:
- CPU – The Z80
- ROM – 27C512 64 KB ROM, selectable in 8KB banks. This allows you to theoretically have 8 different ROMs available to boot, selectable by jumper.
- RAM – 62256 32 KB RAM
- Clock – 7.3728 Mhz crystal that drives a 74HC04 hex inverter. This clock drives both the Z80 and the UART on the serial board.
- Serial I/O – MC68B50 UART. It’s broken out to a header than can be directly connected to a FTDI cable, or you can populate the MAX232 socket for a real 9-pin serial port.
Along with the basic kit, I also purchased the Digital IO module. This consists of 8 buttons and 8 LEDs, and gives the first time retrocomputer builder something that “feels” retro.
Even before I received the kit, I had also started designing my own modules. The ones that I have built and/or am in the process include:
- Real Time Clock (RTC) and digital output – these will allow me to create a basic Nixie Tube Clock
- Bus Supervisor – By connecting some I2C I/O expanders to the bus, I hope to be able to put the Z80 into wait mode and takeover the bus using a raspberry pi. The idea is to be able to use the bus supervisor for assembly language development. I could in theory replace the ROM with another RAM chip, load programs into the RAM using the bus supervisor, and have a very rapid development cycle.
- Bus Monitor – Using some LED displays, I can show the values on the address and data buses.
- Single Stepper / Slow Stepper – Once I build the Bus Monitor, I realized the Z80 runs a little too fast for the Bus Monitor to be interesting. Slowing the Z80 down and single-stepping it will make the Bus Monitor a little more interesting.
- Speech Synthesizer - The retrocomputer needs a 1980s style voice.
Some of these modules I’ve built already. Some I’m still developing. I’ll be placing links to the associated blog pages as things come along. Below is a picture of a pile of modules, some from the Full Monty kit, some that I built myself:
![Modules for RC2014]()
Modules for RC2014 (clockwise from bottom left: Serial, CPU, RTC, RAM, ROM, Supervisor, Monitor)
Interfacing Basics
I started this with zero knowledge of the Z80, and managed to piece together some interfacing basics by looking at the work over others. Some notable and very useful websites are http://rc2014.co.uk/ and https://z80project.wordpress.com/.
Interfacing a peripheral device generally means adding it to the Z80’s IO space. To do this there are four signals of interest to us: M1, IORQ, RD, and WR. The M1 signal is active low when the Z80 is fetching an instruction from memory or when it’s acknowledging an interrupt. IORQ is active low when an IO operating is being performed. RD and WR are active low if the operation is a read or a write, respectively. This allows us to use a 74HCT138N as a basic IO address decoder:
![IO address decoder using 74HCT138N]()
IO address decoder using 74HCT138N
The upper three bits are used to select the IO addresses 00, 20, 40, 60, 80, A0, C0, or E0. That allows us to place a peripheral at any of 8 possible IO address spaces. In the above example, I didn’t do anything with the RD or WR pins. If you wanted to, you could connect RD or WR to the 74HCT138N’s G2B input, and this would cause the IO address decoder to only select the attached peripheral for reads or writes. The output of the 74HCT138N typically goes to the chip select device of the chip you’re attempting to interface to. It’s this basic IO decoder that I will end up using in most of my peripheral boards.
There are some important addresses that you should avoid, because the RC2014’s default boards use those addresses. The Serial IO board occupies addresses 80 to BF. The RC2014 Digital IO board by default occupies addresses 00 though 7F.
Logic Families
I’ve often not put a whole lot of thought into logic families — to me, if something calls for a 74xx04, I’ll use a 74LS04 just as quickly as I’ll use a 74HCT04. This Z80 retrocomputer build is the first time I’ve experienced a project where it really matters. Different logic families will place a different load demands on the Z80 microprocessor, which can only supply a few milliamps of drive to its pins. You can quickly load a Z80 down with LS parts. For my boards, I’ve been trying to exclusively use HCT parts. HCT are low power devices that still support TTL level voltages for high and low states.
You might run into a few of my blog posts or schematics where I’ve referred to a part as an HC or an LS. If so, that’s probably a mistake and I really meant to say HCT. If I do specifically choose a part that’s not an HCT then I’ll try to explain why.
Power
The RC2014 backplane can be powered by 5V, or you can add a 7805 regulator so that you can power the backplane from other voltages. I really like powering my projects from 12V, so I added a 7805.
This worked pretty well until I added one of my boards that had a whole lot of LED displays, and I overloaded the 7805 regulator and it went into thermal shutdown. It burned my finger too, when I touched it. I ended up replacing the 7805 with a switching regulator made by EZSBC. These little EZSBC regulator boards are pin compatible with the 7805, more-or-less about the same form factor, and use a switching regulator. Yes, it feels like cheating to have a modern surface-mount switching regulator in my retrocomputer project, but it also eliminated burnt fingers and thermal shutdowns. Here’s a picture of the switching module mounted in place of the 7805:
![Switching power supply in place of 7805]()
Switching power supply in place of 7805
Programming in BASIC
Basic was the first programming language I ever learned. It’s been a long time, but it came back to me.
I believe the particular implementation BASIC language used by the RC2014 is (either outright or derived from) this one by Grant Searle. If you’ve ever programmed any form of BASIC, then this should seem pretty familiar to you. It is handy to look over Grant Searle’s list of included keywords to know what the BASIC implementation does and does not support. While writing my simple programs, I often found myself trying to use keywords that weren’t implemented.
I found the easiest way to load and save programs is to write them up in my favorite text editor on my windows PC and “paste” them into the terminal program connected to the RC2014’s serial port. Beware that pasting a long program at 115200 baud can send data faster than the retrocomputer can keep up with it. I found it helpful to add a 35 millisecond line delay in my terminal program. The terminal program I use is SecureCRT by VanDyke technologies. It’s my go-to program for SSH, and I was happy to find that it will also talk to serial devices.
Scott’s github repo
My github repo containing various bits of source code and other useful things for the boards I’m working on is located at https://github.com/sbelectronics/rc2014. For example, it contains the BASIC program source for my RTC board and Nixie Tube clock.