Some people like computers from the previous century, the ones which are long obsolete, unusable, or have been mostly forgotten. Perhaps because they owned one in the past, or because they never could own one, or hey, maybe it’s a mom-and-dad thing. Whatever.

Fact is: 1) I’m somewhere in that category, 2) “retrocomputing” exists, and 3) there are numerous projects to fix, reconstruct, or replicate these clunky old systems.

One very nice project is the Z80 Membership Card by Lee Hart. He has taken an original Z80 CPU chip, and reconstructed a fairly elaborate computer by adding some modern hardware components, and turning it into a very nice kit of up to 3 layers:

The 1- and 2-layer configurations are small enough to fit in an Altoids tin, a well-known little box of fresh mints in the US, introduced over two centuries ago.

The 3-layer version is a bit too tall to properly fit in the original tin box, but Walter Miraglia designed a 3D-printed enclosure, with two slots in just the right place (more on that later):

When I read Lee Hart’s Z80MC page, the geek in me knew I had to get one and try it out.

What is it?

Three different PCB’s are available for the Z80 Membership Card project:

  1. the main Z80 CPU with enough ROM and RAM to run independently
  2. an “SIO” card which adds a real serial port, more RAM, and an SD-card slot
  3. a “Front Panel” card with buttons, display, beeper, and bit-banged serial

The system can operate with just 1, 1+2, 1+3, or the full shebang: 1+2+3.

The Z80 CPU card

It’s all through-hole (as everything was, in those days), with some fairly large memory chips compared to what was available and affordable in the 1970’s then: a 32 KB EPROM (these are UV-erasable, not EEPROM!) in low-memory and a 32 KB RAM for the upper half of memory. In the top right, there’s a 5V regulator if you want to power this from 6..8V.

It’s approximately what’s inside an STM32F103C8 7x7 mm 48-pin SMD chip, nowadays.

The Serial/RAM/SD card

The 40-pin UART chip in the top right is very retro, but the rest is more modern: a µSD card socket (on a little breakout board so you don’t have to solder this tiny SMD part yourself), and from 32 KB up to a whopping 512 KB additional RAM, which can be “bank-switched” to replace the EPROM on the CPU card.

This board is relatively new and still “a bit” in development. It’s definitely optional, but it’s also what allows this system to run full-fledged CP/M, with as many emulated floppy disk images on the µSD card as you care to set up. A 2 GB SD card is small these days (but it’s also the largest one supported here, as SDHC cards require a different access mode).

I assembled it without the RS232 level converter circuit, opting for the FTDI-compatible 6-pin header instead, with the jumper in place to also supply power from that same header.

The Front Panel card

This is – in my view – the most impressive part of the Z80MC design: a front panel which lets you control the whole system: view and alter memory as well as registers, jump to a specified adddress, and even single-step through the code.

It’s all done with some glue logic and a lot of ingenuity on the software side of things. The keyboard, 7-segment LED, and beeper are all managed in software by the Z80, and the front panel stays operational at all times because it all happens within periodic interrupts.

There’s even a bit-banged serial port (bottom left, again FTDI-compatible), running at 9600 baud. Note: there is no UART when using just the Z80 CPU + FP sandwich.

Construction

As mentioned, the Z80 Membership Card comes as a kit. It’s not cheap, but hey, what’s the value of something which leads to so much fun? And into which a fellow maker has poured so much time and creative energy (as well as blood, sweat, and tears, I imagine).

Construction is straightforward, i.e anyone with some experience in soldering can build this kit, I think. There are no SMD parts to deal with, you can rest assured that every solder joint you need to make is at least 2.54 mm (0.1”) away from the next one …

It does require very careful reading of the instructions shipped with the kit. I did a few things in the wrong order on the SIO board, for example, and paid the price by having to go through some very acrobatic soldering motions later on. Oh well, it worked out ok.

I also forgot to solder two jumpers when using the TTL-FTDI interface instead of the RS232 level shifters (again on the SIO board). Luckily, full schematics are provided with these boards, and some good pictures of the assembly process.

If you take things one step at a time, and follow them in the right order, you willl end up with something that works, stacks beautifully, and makes a very nice compact setup.

Powering it up

The whole three-layer configuration draws about 150 mA @ 5V, i.e. 750 mW.

There are a number of checks to go through when powering up such a combination of boards. The SIO board definitely needs to be left out and kept for the end. Just the Z80 CPU + front panel is enough to see things happen and to get a basic serial interface.

The supplied V1.5 EPROM has lots of features built-in. Serial port access via bit-banged FTDI on the FP board is probably the most important part to get working - once that works, everything can be controlled and tested via serial. There’s a Tiny Basic built in for simple tinkering (with tons of RAM, compared to what most hobbyists had, originally).

The v1.5 EPROM performs some startup checks to identify the system configuration it’s running on. If there’s no front panel: fine, it’ll run without. If there’s no SIO card, that’s fine too: no UART, no extra RAM, and no SD card access. If there’s no Z80? Yeah, well …

Running CP/M

But the main prize in this project is the ability to start up CP/M 2.2, which is included on the µSD card shipped with the (separate) SIO board kit. Lee even includes an original 5.25” CP/M floppy disk as part of this kit. But no worries: you can just leave it in its sleeve and marvel at the idea that computers used to need these disks, a few decades ago!

As I said, the logic in EPROM when starting up is clever. It can detect the SIO board, look for an SD card, load bootstrap code from it, and take it from there. Here’s how the system automatically starts up with all three boards installed, and a properly configured µSD card:

Cold Start

Z80 MEMBERSHIP CARD MICRO-SD, v1.5beta July 23, 2017
Hardware: 03 FP, SIO
Press M for Monitor..............................
Init SD Type#2 ACMD41+MBR S Type06 PBR S VOL=Z80         SYS=FAT16
Z80MC_GO.HEX -EXISTS FILE SIZE=0x00000D2C
Execute at:F400

Z80MC CP/M LOADER.  Apr 2, 2017
CPMDISKS.TXT -EXISTS FILE SIZE=0x000006F5
Menu

C   BOOT CP/M
L   LIST FILES
1 - Disk A = DISK-A.BIN -EXISTS FILE SIZE=0x0003E900 = 8" SSSD 250K
2 - Disk B = DISK-B.BIN -EXISTS FILE SIZE=0x0003E900 = 8" SSSD 250K
3 - Disk C = DISK-C.BIN -EXISTS FILE SIZE=0x0003E900 = 8" SSSD 250K
4 - Disk D = DISK-D.BIN -EXISTS FILE SIZE=0x0003E900 = 8" SSSD 250K

>..........
Z80MC 61K CP/M 2.2

WBOOT

a>

That “a>” prompt indicates that CP/M is at your command (long before MS-DOS existed).

What comes pre-installed

Let’s look around on the four pre-installed 8” SSSD images (a whopping 250 KB each):

a>dir
A: MON-32K  COM : ASM      COM : BIOS     ASM : STAT     COM
A: NSWP     COM : XMODEM   CFG : WM       COM : DDT      COM
A: DEBLOCK  ASM : WM       HLP : NSWP     TXT : DUMPCPD  COM
A: DISKDEF  LIB : DUMP     ASM : DUMP     COM : XMODEM   COM
A: GENMOD   COM : MOVCPM   COM : PIP      COM : RLOCBIOS COM
A: STDBIOS  ASM : SUBMIT   COM : SYSGEN   COM : XSUB     COM
A: LOAD     COM : ED       COM : LS       COM : MBASIC   COM
A: SURVEY   COM : VIEW     COM
a>ls
Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes
ASM     COM    8K | ED      COM    8K | NSWP    TXT   30K | VIEW    COM    1K
BIOS    ASM   12K | GENMOD  COM    2K | PIP     COM    8K | WM      COM   11K
DDT     COM    5K | LOAD    COM    2K | RLOCBIOSCOM    3K | WM      HLP    3K
DEBLOCK ASM   10K | LS      COM    3K | STAT    COM    6K | XMODEM  CFG    1K
DISKDEF LIB    7K | MBASIC  COM   24K | STDBIOS ASM   16K | XMODEM  COM    8K
DUMP    ASM    5K | MON-32K COM    4K | SUBMIT  COM    2K | XSUB    COM    1K
DUMP    COM    1K | MOVCPM  COM   10K | SURVEY  COM    2K
DUMPCPD COM    1K | NSWP    COM   12K | SYSGEN  COM    1K
30 File(s), occupying 207K of 241K total capacity
32 directory entries and 34K bytes remain on A:
a>ls b:
Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes
PIP     COM    8K | ZORK1   COM    9K | ZORK2   COM    9K
STAT    COM    6K | ZORK1   DAT   83K | ZORK2   DAT   88K
6 File(s), occupying 203K of 241K total capacity
48 directory entries and 38K bytes remain on B:
a>ls c:
Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes
ZORK3   COM    9K | ZORK3   DAT   81K
2 File(s), occupying 90K of 241K total capacity
57 directory entries and 151K bytes remain on C:
a>ls d:

0 File(s), occupying 0K of 241K total capacity
64 directory entries and 241K bytes remain on D:
a>stat
A: R/W, Space: 34k
B: R/W, Space: 38k
C: R/W, Space: 151k
D: R/W, Space: 241k


a>

Looks like we have some standard CP/M utilities, and three episodes of the text-based adventure game called “ZORK”. Haha, everybody seems to start off this way nowadays!

Much larger disk images can be placed on the SD card, so a lot more software can be used in CP/M. And since the SD card is formatted in a standard way (with FAT16), this card can be read and altered from a modern laptop or other “host” computer.

So, in conclusion: this is more or less what went into a personal computer in the 1970’s and 1980’s. Costing thousands of dollars back then, by the way. And don’t forget that an 8-bit CPU at 4 MHz will be, eh… somewhat slower than today’s silicon-driven gadgets.

All in all, I had oodles of fun assembling this kit. The first build phases went very smoothly, the SIO board was a bit harder - not only did I make some small mistakes, it’s also more complicated to debug since you don’t know right away what might be causing a problem: USB cable? FTDI interface? serial port? RAM chip? µSD socket? SD card contents?

But that’s part of the journey! I’ll probably try out a few more well-known CP/M programs one day, if only to re-experience the capabilities and performance of this long-gone era.

References