| |
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...)
|
|
| |
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 ).
|
| |
Danzig
Registered: Jun 2002 Posts: 440 |
ever tried sprite 1-4? ;) |
| |
Style
Registered: Jun 2004 Posts: 498 |
its actually pretty easy to understand once you study the timing diagrams and understand the BA line.
|
| |
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.
|
| |
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?
|
| |
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!
|