4MHz Z80 timing and PAL video generation

Im trying to get some nice colored lines on some old Z80 system synced to the PAL screen, but having some sort of a problem. First I just need to know if my facts are right.

I know that on Commodore 64 it takes 19656 cycles to complete a PAL videoframe: (63 cycles a scanline of a total 312 scanlines, gives: 63*312 = 19656 cycles). The 6502 processor is 0.985 MHz for PAL.

But What IF, my computer have a 4 Mhz Zilog Z80A CPU inside. Would an instruction that take 4 cycles run 4 times faster than an instruction running on an 1 Mhz processor?

Can I then say that I can use 256 processor cycles to complete one scanline? Instead of 64? If one scanline use 64 cycles to complete, on a Z80 system it would use 256 cycles? Or are processor cycles fixed at microseconds such that its the same amount on a PAL screen?

LDA \$0000 on 6502 take 4 cycles. NOP on Zilog Z80 take 4 cycles.

but four NOPs on Z80 use the same time as one LDA \$0000 on 6502?

And this is wrong or? So basically when the beam is at the leftmost position I can use 256/4 = 64 NOPS before the beam has retraced to the leftmost position again (using Zilog Z80 4MHz)? (On the C64 that would take approx 32 NOPS) Or am I missing something?

• You can't compare Z80 clock cycles with 6502 clock cycles, because their internal "machineries" work differently. A 4 MHz Z80 is roughly comparable with a 1 MHz 6502, depending on code executed. -- It would help if you tell us about the system you are using, and to reword your post by editing to ask something that can be answered concisely. Apr 5, 2020 at 17:36
• is there any contention present? if yes your CPU can be stopped for few T-states meanning you can not count on exact timing unless some specific conditions are met ... Apr 8, 2020 at 13:46
• @thebusybee What would be the point of telling what exact system I am using, you probably wouldn't have heard of it. There is not much documentation available for it. The question is specifically towards Z80A processor Apr 8, 2020 at 15:19