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 sync question.
2012-01-05 11:35
Flavioweb

Registered: Nov 2011
Posts: 463
Raster sync question.

i'm writing a -reverse timer- raster sync routine.
In my routine the kernal is switched off and i use $fffe/f as irq vector.
Also all cia irq are switched off.
The main loop is an endless self jmp to avoid opcode cycles problem.
All routines work 'in irq' so i can omit the registers saving part. Every routine start just after the irq trigger.
The cia timer setup is in the initial sei/cli routine but the timer is started using a first raster irq call where the first 2 instructions are lda/sta $d019.
Timer is set up to cycle counter with $07 as value.
The stable irq part is stabilized with $dc04 eor #$07 and the result used to branch into a lda #$a9 part as in most stable irq routines.
To test i use an inc $d021 just to see where/if stable code work.
And it work... But not always at same point!
Sometimes the inc start under border and some others start after it!
The position change if routine is restarted. When run, the position never change.
How can i fix this making inc been executed always at same position?
 
... 10 posts hidden. Click here to view all posts....
 
2012-01-08 19:59
ChristopherJam

Registered: Aug 2004
Posts: 1409
@Flavioweb, this doesn't directly answer your question, but you should be able to adapt it to your needs; I've just done a post on Stablising raster IRQ with DMA
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
rikib80
CreaMD/React
Andy/AEG
Erol
DeMOSic/MS^LSD^ONS
The Syndrom/TIA/Pret..
Nordischsound/Hokuto..
psych
Guests online: 107
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.056 sec.