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?