The Zilog Z80 #
The Zilog Z80 integrated chip was released in 1976 as alternative for the Intel 8080. It was software-compatible, it was faster, it added more instructions and registers, and it was easier to interface with. The Z80 ended up powering a wide range of home & business computers, such as the Tandy TRS-80 shown above.
Introduction #
This article describes an emulated version of the Z80 with 120 KB banked RAM as well as 2 GB of (emulated) disk storage, which is some two orders of magnitude more than was possible in the 70’s. This configuration can comfortably run CP/M 2 and 3, with enough storage for the equivalent of hundreds of floppy disks.
This project will not emulate the graphics and sound capabilities of the TRS-80, but rely on a terminal emulator attached via a serial USB link as a more business-like setup (similar to later TRS-80 models).
I’m going to use a “BlackPill” from WeAct for this (link). It’s based on an STM32F411CE with 128 KB RAM + 512 KB flash, and running at 100 MHz. For storage, a fingernail-sized microSD card will be used. Several aspects of this setup will make it considerably more convenient and performant than the Altair 8800 from another article.
The µSD card has its own board (link) and there’s a serial port for development and future expansion.
Putting it together #
As with the Altair 8800, everything is based on a small prototyping board with some permanent wiring soldered on the bottom: 4 wires connect +5V & GND and TX/RX to the serial interface board, and 6 wires connect +3.3V & GND and 4 signals (SPI2: MOSI, MISO, SCLK, NSEL) to the µSD card socket.
Wiring connections: A9 (USART1 TX) is connected to the serial’s RX, and A10 (USART1 RX) is connected to the serial’s TX. For SPI, the µC-side connections are B12: NSEL, B13: SCLK, B14: MISO, B15: MOSI.
Unfortunately, the wiring for the SD card is WRONG: B15..B12 instead of B12..B15. This is a silly mistake to make when turning around the board to attach wires. For the bit-banged "spi::Gpio" driver, this is easy to correct in code, but not for (more efficient) hardware-driven SPI drivers. The wiring will be fixed later ...
The WeAct µC board is socketed to allow easy replacement, for reasons which will become clear later.