Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Jedfox ! (Registered 2024-05-28) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Cycle count in upperborder
2008-09-23 11:00
Barbarossa

Registered: May 2007
Posts: 31
Cycle count in upperborder

Hi guys,

When trying to put together some timing scheme I noticed something I cannot explain.

When I singlestep trace my rasterinterrupt (I use CCS64) which triggers at raster $000, on the first line everything behaves fine. But on the second line ($001) and furtherdown, the cycle counter jumps from 56-58 to 8-10 as if sprites were active.

Sprites are active on the screen however only from Y=$36 to Y=$76.

What I am missing here? There cannot be bad lines in the border, and I am certain there are no sprites active. Why is the VIC stealing my cycles?

Some insight will be greatly appreciated.

Thanks.

John
2008-09-23 11:18
Scout

Registered: Dec 2002
Posts: 1568
Quote:

Why is the VIC stealing my cycles?


*Insert random seal picture here*


(Sorry for the thread hijack ;-)
2008-09-23 12:10
Ninja

Registered: Jan 2002
Posts: 407
One possible answer:

Sprite y position is 8 bit only. So, if you already set the sprite y to $36 before, VIC will display the sprites also beginning with $136 (PAL reaches this line) for the next 21 lines, which will also cover the top of the screen. So, actually this should happen on line 0 as well(can you recheck? could also be an emulator problem, you never know...).
2008-09-23 13:19
Barbarossa

Registered: May 2007
Posts: 31
Ninja,

Learning all the time... It looks to me your answer might be the right one, so I did a test. I moved my sprites to $06c. Obviously there can never be a $16c rasterline so in theory the delay should be gone. And... it was.

One question remains, why is it not there on rasterline $000? Maybe $000 is a special case because you cannot put a sprite on that line as well (I think it is not possible, since sprite Y = raster + 1).

Also it seems weird (allthough logical) that a sprite can steals cycles twice a frame.

John
2008-09-23 13:22
Barbarossa

Registered: May 2007
Posts: 31
So the delay is not there on $000, in both cases.
2008-09-23 13:52
Ninja

Registered: Jan 2002
Posts: 407
Have you checked on a real c64? It might as well be an emulator bug. Can't tell, I never checked this. But if a sprite started before $0, I would assume it will be fetched also in 0. If not, abuse it, give it a fancy name and make a demo part out of it :)
2008-09-23 15:03
Barbarossa

Registered: May 2007
Posts: 31
I have not checked it on a real C64.
Maybe the users of Vice can confirm if this behaviour does or doesn't occur on that emulator?
2008-09-23 15:05
assiduous
Account closed

Registered: Jun 2007
Posts: 343
better check in Hoxs64 if you want to be on a safe side and cannot check on a C64.
2008-09-23 15:09
Ninja

Registered: Jan 2002
Posts: 407
Naaah, nothing besides a real C64 can serve as a reference (by defintion, so to say ;)). Maybe someone else is willing to check this...
2008-09-23 15:23
Barbarossa

Registered: May 2007
Posts: 31
I can check it, but you know how does things go. Digging up the C64 out of a closet and plugging it on takes some time :-) And then I have to write some program to check, because there is not such thing as a cycle monitor on the real thing.

It could be a bug, however I doubt it. I have seen most things work like a charme on CCS64.
2008-09-23 16:22
Ninja

Registered: Jan 2002
Posts: 407
CCS is good, no doubt. Still "most things" is way not enough for a reference, especially as this issue qualifies as a corner-case. I think you get my point :)
 
... 8 posts hidden. Click here to view all posts....
 
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
DeMOSic/HF^MS^BCC^LSD
Twoflower/ΤRIΛD
BroneCk/Samar^BooM!
Elder0010/G★P
The Syndrom/TIA/Pret..
encore
Guests online: 139
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Aliens in Wonderland  (9.6)
6 Edge of Disgrace  (9.6)
7 No Bounds  (9.6)
8 Comaland 100%  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Happy Birthday Dr.J  (9.8)
2 Layers  (9.6)
3 It's More Fun to Com..  (9.6)
4 Cubic Dream  (9.6)
5 Party Elk 2  (9.6)
6 Copper Booze  (9.6)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Rainbow Connection  (9.5)
9 Dawnfall V1.1  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Stinsen  (9.7)
3 Jeroen Tel  (9.6)
4 Linus  (9.6)
5 psych858o  (9.6)

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