On April 15 of 2024 Zilog has announced End-of-Life for Z80, one of the most famous 8-bit CPUs of all time. It is a time for open-source and hardware preservation community to step in with a Free and Open Source Silicon (FOSS) replacement for Zilog Z80.
The implementation is based around Guy Hutchison's TV80 Verilog core.
The future work
Z80 technical capabilities
Z80 registers
AF
: 8-bit accumulator (A) and flag bits (F)BC
: 16-bit data/address register or two 8-bit registersDE
: 16-bit data/address register or two 8-bit registersHL
: 16-bit accumulator/address register or two 8-bit registersSP
: stack pointer, 16 bitsPC
: program counter, 16 bitsIX
: 16-bit index or base register for 8-bit immediate offsetsIY
: 16-bit index or base register for 8-bit immediate offsetsI
: interrupt vector base register, 8 bitsR
: DRAM refresh counter, 8 bits (msb does not count)AF'
: alternate (or shadow) accumulator and flags (toggled in and out with EX AF, AF'
)BC'
, DE'
and HL'
: alternate (or shadow) registers (toggled in and out with EXX
)Z80 Pinout
,---------.__.---------.
<-- A11 |1 40| A10 -->
<-- A12 |2 39| A9 -->
<-- A13 |3 Z80 CPU 38| A8 -->
<-- A14 |4 37| A7 -->
<-- A15 |5 36| A6 -->
--> CLK |6 35| A5 -->
<-> D4 |7 34| A4 -->
<-> D3 |8 33| A3 -->
<-> D5 |9 32| A2 -->
<-> D6 |10 31| A1 -->
VCC |11 30| A0 -->
<-> D2 |12 29| GND
<-> D7 |13 28| /RFSH -->
<-> D0 |14 27| /M1 -->
<-> D1 |15 26| /RESET <--
--> /INT |16 25| /BUSRQ <--
--> /NMI |17 24| /WAIT <--
<-- /HALT |18 23| /BUSAK -->
<-- /MREQ |19 22| /WR -->
<-- /IORQ |20 21| /RD -->
`----------------------'
Hold all bidirectional
pins (Data bus) low to make CPU execute NOP instruction. NOP instruction opcode is 0.
Hold all input
pins high to disable interrupts and signal that data bus is ready.
Every 4th cycle 8-bit value on output
pins (Address bus low 8-bit) should monotonously increase.
Timing diagram, input pins
Z80CLK____ ____ ____ ____ ____ ____
__/ \____/ \____/ \____/ \____/ \____/ `____ ...
| | | | | |
| | | | | |
/RESET___________________________________________________________
__/
/WAIT ___________________________________________________________
__/
/INT ___________________________________________________________
__/
/NMI ___________________________________________________________
__/
/BUSRQ___________________________________________________________
__/
D7..D0 NOP NOP NOP NOP NOP
__ XXXXXXXXX ___#00___ ___#00___ ___#00___ ___#00___ ___#00___
Expected signals on output pins
/M1 _________ ____________________
\__________________/ \_________
/MREQ ___________________ ______________________________
\________/
/RD ___________________ ______________________________
\________/
A0..A7
__ XXXXXXXXX ___#00___ ___#00___ XXXXXXXXX XXXXXXXXX ___#01___
Bus de-multiplexor, external memory, 8-bit computer such as ZX Spectrum.
Alternatively the RP2040 on the TinyTapeout test PCB can be used to simulate RAM and I/O.
# | Input | Output | Bidirectional |
---|---|---|---|
0 | /WAIT | /M1, A0, A8 | D0 |
1 | /INT | /MREQ, A1, A9 | D1 |
2 | /NMI | /IORQ, A2, A10 | D2 |
3 | /BUSRQ | /RD, A3, A11 | D3 |
4 | /WR, A4, A12 | D4 | |
5 | /RFSH, A5, A13 | D5 | |
6 | MUX -- address lo/hi bits on the output pins | /HALT, A6, A14 | D6 |
7 | MUX -- control signals on the output pins | /BUSAK, A7, A15 | D7 |