Page 1 of 1

How does the sprite limit "work"?

Posted: Fri Jul 13, 2012 1:15 pm
by greatkreator
Can anyone please describe a little how does VDP exactly limits sprite display?
Thanks a lot.

Posted: Fri Jul 13, 2012 3:03 pm
by TmEE co.(TM)
VDP has internal line buffer to hold sprite pixels which it caches in huring HBL, there is only room for 20 sprites and 320 sprite pixels when it comes to processing, so you get those 2 kind of effects. Sprite pixels are buffered so active line can be dedicated for fetching and showing background planes.

Posted: Sat Jul 14, 2012 7:08 am
by greatkreator
tänan väga

Posted: Sat Jul 14, 2012 6:05 pm
by slobu
Does that mean 320 sprite pixels in a row? So, only 20 16x16 sprites per scanline?

Posted: Sat Jul 14, 2012 6:16 pm
by djcouchycouch
slobu wrote:Does that mean 320 sprite pixels in a row? So, only 20 16x16 sprites per scanline?
Either 20 sprites or 320 pixels. You could also have ten 32x32 sprites and hit the 320 pixel limit.

Posted: Sat Jul 14, 2012 7:25 pm
by Stef
I was sure this has been already discussed :
viewtopic.php?t=15

Posted: Sat Jul 14, 2012 7:26 pm
by djcouchycouch
"The topic or post you requested does not exist"

:)

Posted: Sat Jul 14, 2012 7:28 pm
by Stef
Sériously ?? It does work for me... but i can copy back the content here :)

Edit:

Here are the limits in 320px mode:
-32 sprites per line max
-320 pixels of sprites per line max (10 sprites of 32pixels width, for exemple)
-80 sprites browsed per line.

Here are the limits in 256px mode:
-24 sprites per line max
-256 pixels of sprites per line max
-64 sprites browsed per line.

Posted: Sat Jul 14, 2012 7:56 pm
by greatkreator
What does it mean per line? What is line? A line of horizontal pixels?

Posted: Sat Jul 14, 2012 8:35 pm
by Stef
greatkreator wrote:What does it mean per line? What is line? A line of horizontal pixels?
Yep, by line we *always* mean a scanline and so a horizontal line as this is a sort of timing base for the VDP.
Generally speaking, we have a limitation of 80 sprites per frame in 320 px mode and 64 sprites per frame in 256 px mode. But that limitation really apply on scanline, for instance if you change sprite data between scanlines you can display more than 80 sprites on a single frame.
So all limitations really apply on a scanline basis.