Schrijver
| Z80 timing
|
pitpan msx master Berichten: 1368 | Geplaatst: 20 Mei 2005, 12:56   |
Hi!
I have been trying to calculate the exact time that a routine takes to be fully executed on a regular Z80 at 3.5 MHz, but I haven't managed to do it accurately. What I do is just add the T-states that every instruction takes and then convert it to microseconds, knowing that 1 T-states takes 1/3.5M (of course, I am using more precise values).
What am I doing wrong? Of course, interrupts are disabled to prevent further problems. Is there an additional T-state to be added somewhere? I am using the T-state values calculated by Sean Young in his excellent "Z80 undocumented documented".
Help!!!?
|
|
Sonic_aka_T
 msx guru Berichten: 2262 | Geplaatst: 20 Mei 2005, 13:23   |
dunno, waitstates, like you said, and perhaps refresh also affects the timing?
|
|
Edwin msx professional Berichten: 594 | Geplaatst: 20 Mei 2005, 15:10   |
Sean Young's document gives the standard z80 timings. For MSX, you need to add 1 T-state for every M1 cycle (for memory refresh).
|
|
Grauw msx professional Berichten: 1002 | Geplaatst: 20 Mei 2005, 16:27   |
|
|
Tanni msx addict Berichten: 302 | Geplaatst: 20 Mei 2005, 16:33   |
The conditional jumps need to be distinguished if the condition fails or not. If it fails, it needs less
clock cycles than if the jump is performed. Also be carefully if you use block instructions, their execution
time depends on the size of the block moved or searched.
|
|
|
|
|