How much the extra wait states cost to the performance?

A project log for Tek V2

Version 2 of PS/2 keyboard adapter for Zeddies

danjovicdanjovic 09/28/2019 at 06:150 Comments

The keyboard is read 9 times at each video frame (60/50Hz). I did expected that would be only 8, but I think that the extra reading might be to check the 50/60 Hz selection bit at D6.

The keyboard reading pulse takes about 4.42us with the extra wait states and 0.75us (750ns) without them. The difference is 3,67us, being the total difference of 9 times this value or 33.03us lost at each frame.

Some measurements performed showed that the ZX81 running at 60Hz has only 4.4ms (from a frame of 16.67ms) for drawing and within such time the video synchronization circuit generates 62 wait states taking 6us each (by the video synchronization circuit) .

Doing the math...

Then the cost of adding Tek V2 in CPU available time is a mere 0.8% decrease.