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 > Sprite Timing
2006-11-03 08:32
Sasq

Registered: Apr 2004
Posts: 156
Sprite Timing

One thing that is not entirly clear from the VIC-article is exactly how sprites affect the timing. There are many combinations possible and the article only brings up 2 cases - is there any other place that documents it clearer?

(It seems the first and subsequent lines are timed differently, and if you combine that with bad lines and 0-8 sprites turned on there's a lot of possible combinations...)
2006-11-03 10:02
itch

Registered: Aug 2006
Posts: 24
Me and minksler had to use the 4 upper sprites ( 4,5,6 & 7 ) in order to get a stabile side border opening. So i understand you :) If we used sprite 0-3 the border opening would not work properly. ( in the case of using 4 sprites ofcouse ).
2006-11-03 10:38
Danzig

Registered: Jun 2002
Posts: 440
ever tried sprite 1-4? ;)
2006-11-03 10:53
Style

Registered: Jun 2004
Posts: 498
its actually pretty easy to understand once you study the timing diagrams and understand the BA line.

2006-11-03 11:55
Devia

Registered: Oct 2004
Posts: 401
I wouldn't say it's easy to understand, but if you stare long enough at those fancy ASCII timing diagrams it eventually starts making sence.
2006-11-05 12:36
Sasq

Registered: Apr 2004
Posts: 156
OK I've looked a bit more at the chart and it seems like this:

When BA goes low VIC takes the bus 3 cycles later which is bascially overhead so if you only use continuous sprite numbers, each scanline would be shortened by 3+2*s cycles, where s is number of sprites used (allthough depending on the last opcode that may not be strictly true).

It also seems sprite data is fetched one line before it is displayed which means the last line of the sprite will be a normal scanline ? Or does a sprite affect 25 scanlines ?

It also means using sprites 0-3 or 4-7 should not affect how many cycles you have in a line, only where in the line the cycles are lost?

2006-11-05 12:42
Style

Registered: Jun 2004
Posts: 498
Almost exactly right, except sprites 0-3 grab cycles on the line before they are displayed, but not 4-7 (from memory). This is why you get sprite glitches in the sideborders.

yes, you should use sprites in sequence, for the very reason you mention. If you skip one, you lose the 2 cycles anyway because the BA line takes 3 anyway, so the CPU is never restarted before being stopped again.

See? clear as mud!
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
psenough
sln.pixelrat
iceout/Avatar/HF
syntaxerror
The MeatBall
t0m3000/hf^boom!^ibx
Ramon B5/DESiRE
Codey/Second Dimension
E$G/HF ⭐ 7
XmikeX
Guests online: 136
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 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (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.043 sec.