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 > Stable Raster via Timer
2003-12-28 19:40
Copyfault

Registered: Dec 2001
Posts: 478
Stable Raster via Timer

Maybe some of you advanced coders can help me with the following oddity. I'll keep out the basic routine for stabilizing rasters with the timer method, as it is presumably known to everyone!

If we ignore Illegal Ops for the moment, the max. number of cycles occuring in the main prog is 7 (when executing an indexed RMW). When it comes to the different values the variance can take, there should also be 7 (0 to 6 cycles). I wrote some (working!) routines, but I always end up having 8 different variance values. Of course one can live with it, but I wonder where this 8th state comes from!

If necessary, I'll deliver more details. I'd be really happy to understand this behaviour!

Yours, Copyfault
2003-12-29 12:59
Graham
Account closed

Registered: Dec 2002
Posts: 990
you're wrong with 7 cycles max per opcode. illegal RMW instructions with indexed indirect zeropage addressing use 8 cycles.

http://oxyron.net/graham/opcodes02.html
2003-12-29 13:30
Copyfault

Registered: Dec 2001
Posts: 478
Yes, but the LEGAL Opcodes won't eat more than 7 cycles, will they? I am definitly NOT using any IllegalOps in my maincode, but I do get 8 different values for the variance! On some systems this can easily be verified by the following main prog:

MAIN
INC $adr,X
JMP MAIN

On other systems I had to fiddle around to get a more or less complicated loop, consisting only of legal Ops, that also delivered 8 variance vals. I must admit that I didn't try to use an 8-cycle-Illegal-Op - will there be 9 values for the variance then?
2003-12-29 20:06
Graham
Account closed

Registered: Dec 2002
Posts: 990
i only get 7 different delays on that one.
2003-12-29 21:50
Copyfault

Registered: Dec 2001
Posts: 478
This "easy" main rout has been tested on a plain C=128 and delivered 8 values - I think Ninja tested it, too, and can confirm this!

If you're interested and like to help me, I could send you the sourcecode of the "complicated loop" (as I named it above) via mail. This should work on most C=64's and give 8 different values for the variance.
2003-12-30 09:20
HCL

Registered: Feb 2003
Posts: 728
Finally one interesting topic here at CSDB ;). Sorry i cannot contribute with anything intelligent. It seems like it's not 0-6 cykles, but 0-7 cycles you get for LEGAL op-codes. It's kinda strange..
2003-12-30 11:40
Stryyker

Registered: Dec 2001
Posts: 468
Has there been a decent bit of theory written about using timers for stable raster interrupts? Or did I miss it in C= Hacking?
2003-12-30 12:01
Graham
Account closed

Registered: Dec 2002
Posts: 990
still, here there's only 7 different delays for a main program using that opcode, tested on a C128DCR.

you are using timers? i hope that you know that there are different CIAs in different machines, and some of them have a delay of 1 cycle on IRQs while others have not.
2003-12-30 12:11
Copyfault

Registered: Dec 2001
Posts: 478
Quote: Has there been a decent bit of theory written about using timers for stable raster interrupts? Or did I miss it in C= Hacking?

Marko Mäkelä wrote an article for c=hacking, issue 10! Basically it deals with stabilizing rasters on a VIC-20, but I think it quite ok to understand the theory. You can find it on his homepage

http://www.hut.fi/Misc/cbm/vic20-demos.html
2003-12-30 12:24
Copyfault

Registered: Dec 2001
Posts: 478
@Graham: this means one generally has to take 0-7 cycles of variance into consideration in order to avoid troubles on machines with those Delay-Cia's?

When does such a delay-cycle occur? It can't be constant, because this would only lead to (by one cycle) shifted variance values - but in fact we got 8 different ones.
2003-12-30 13:17
Graham
Account closed

Registered: Dec 2002
Posts: 990
it is a stable delay, so either you have it or you don't. so on one machine you will only get 7 different delays. maybe there's some other delay playing in? i can assure you that with a max 7 cycles opcode you will have max 7 cycles irq delay.
 
... 65 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 - 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
Krill/Plush
zscs
Epyx/TSA
Chesser/Blazon
iAN CooG/HVSC
A3/AFL
theK/ATL
Moloch/TRIAD
The Syndrom/TIA/Pret..
Freeze/Blazon
LightSide
grasstust/Hoaxers
Magic/Nah-Kolor
psych
Guests online: 90
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 Triad  (9.3)
5 Censor Design  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.6)
5 Facet  (9.6)

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