Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Raster line cycle 0 != cycle where raster irq is triggered?
2012-04-03 10:34
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?
 
... 10 posts hidden. Click here to view all posts....
 
2012-04-04 07:42
Fresh

Registered: Jan 2005
Posts: 101
Yes, you can consider a fixed delay of 2 cycles due to the way 6510 schedules interrupts in the execution flow.
Once an irq is called 2 cycles are *always* skipped then it depends on where the cpu finds itself and you get the overmentioned 0-7 delay. As MaverValp's stated you may consider 0-8 with illegal opcodes (DCP x indexed IIRC).
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Fred/Channel 4
theK/ATL
Luca/FIRE
Peacemaker/CENSOR/Hi..
rexbeng
Isildur/Samar
Guests online: 96
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.037 sec.