Home /Modules/cpu/TIMING.md

TIMING.md

lib/cpu/z80/TIMING.md · 43 line(s) · markdown

Z80 Timing

M and T cycles

The Z80 timing model is explicitly cycle based:

Zilog documents basic memory and I/O operations as taking multiple T cycles and permits WAIT to lengthen them.

SLeeLa timing record

cycle = { machine, t, operation, address, data, wait, phase }

This lets the model distinguish clock speed, instruction latency, and bus transaction latency.

External synchronization

WAIT is represented as an external timing condition rather than an assumed fixed delay. This is important for period-correct emulation and for modeling slower memory/peripherals.

Expert timing, voltages, and variable clocks (shared across all CPU models)

The per-CPU timing above is the architectural/behavioral view for this part. The adjustable, quality-first timing system is shared by every CPU model in lib/cpu and is documented once, in the package guide:

Every CPU model (this one included) inherits the clock/overclock surface from SLCPURuntime and can be assembled with those shared expert-timing, voltage, and component options; they are a build-layer concern, not re-declared per CPU.