Flavioweb
Registered: Nov 2011 Posts: 463 |
Raster line cycle 0 != cycle where raster irq is triggered?
I'm writing a raster irq routine where using this loop
lda #rasterline
cmp $d012
bne *-3
and the polling raster method to set up cia timer for raster stabilization.
During my debug section, on pal machine, i noticed that after my polling routine, if i put code to reach rasterline-after-polling+1 on 4th cycle of a lda $d012, i need 64 cycles in total.
This is perfect: 63 cycles of current line + 1 cycle in new line.
But if i try, on the line where raster irq is triggered, to reach next line, i have to use only about 56 cycles, but from raster trigger line+2 to +3 i must use 63 cycles in total again.
No code outside irq, of course.
Also taking care about 3 cycles jitter of an endless loop, this mean that first cycle of first opcode in irq routine isn't executed near first cycle of rasterline, but about 5-6 cycles after.
Or isn't it? |