Overclocking the C128 Z80 to 8MHz
The Commodore 128’s Z80 processor normally runs at a modest speed during its phase of the system clock. But with a simple daughterboard using a GAL and 74LS74, we can run it at dot clock frequency (almost 8MHz), effectively doubling the speed.
Background
There was a message sent to the cbm-hackers mailing list back in 2002 about a PCB for C128 that boosted Z80 to 8MHz. Unfortunately that device was never fully reverse-engineered and was never heard from again.
This project recreates that functionality with modern tools and documentation.
The Results
Basic benchmarks written in Turbo Pascal show that the system is indeed about twice as fast. CP/M is visibly snappier, to the point of being actually usable for serious work.
The circuit is stable — during testing it ran for several hours continuously, busy with drawing fractals and calculating pi using Monte Carlo method. The CPU doesn’t even get warm to the touch.
How It Works
The normal timing of Z80 in C128 has VIC generating two clock ticks for Z80 during the system clock’s low phase. This circuit uses the DOT CLOCK signal instead to pass four ticks, then waits for the next proper cycle.
Whenever Z80 wants to read or write to/from memory or I/O, we stop it until the start of the next 1MHz clock low phase. The 74LS74 latch holds the /WAIT line low until the end of the current low phase of CLK1MHZ.
Hardware Requirements
- Z84C0020PEC Z80 processor (CMOS, rated 20MHz) — drop-in replacement for the original
- ATF22V10 GAL (or 16V8 with pin adaptation)
- 74LS74 dual D flip-flop
- Daughterboard PCB with KiCad files included
Circuit Diagram
The KiCad project is in the z80-dotclock-gal-and-latch/ folder. Schematic is available in PDF form.
Logic Equations
PLD files for WinCUPL are included for both GAL22V10 and GAL16V8. The JED files are ready to be flashed to GAL devices.
Files Available
- Gerber files for PCB (fits C128 and C128DCR)
- GAL equations for both 22V10 and 16V8
- KiCad schematic and PCB files
- Full documentation
Open Questions
- How can we keep it simple but run at full speed all the time and stall only on memory and I/O access?
- Can we eliminate the 74LS74 by using the GAL’s asynchronous reset more effectively?
- What’s the issue with the 16MHz clock option? Should we double the dot clock to keep things in sync?
Build Notes
I replaced the original Z80B with a Z84C0020 that uses much less energy. The modifications can be done using bent Z80 pins and soldering to the mainboard, but having a daughterboard keeps everything tidy.
We need to isolate the /WAIT input (pin 24) from the mainboard because it’s tied to /NMI there. We also disconnect the onboard CLK signal and use the GAL to generate a new clock switched between original and fast modes.
Conclusion
This project successfully doubles the Z80 performance in the C128, making CP/M actually usable. The circuit is stable, well-documented, and reproducible.
All schematics, gerbers, and firmware are available in the project repository.