How does the sprite limit "work"?

For anything related to VDP (plane, color, sprite, tiles)

Moderators: BigEvilCorporation, Mask of Destiny

Post Reply
greatkreator
Very interested
Posts: 158
Joined: Sat May 12, 2012 7:37 pm
Location: Ukraine

How does the sprite limit "work"?

Post by greatkreator » Fri Jul 13, 2012 1:15 pm

Can anyone please describe a little how does VDP exactly limits sprite display?
Thanks a lot.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Fri Jul 13, 2012 3:03 pm

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.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

greatkreator
Very interested
Posts: 158
Joined: Sat May 12, 2012 7:37 pm
Location: Ukraine

Post by greatkreator » Sat Jul 14, 2012 7:08 am

tänan väga

slobu
Very interested
Posts: 85
Joined: Tue Apr 03, 2012 6:02 pm

Post by slobu » Sat Jul 14, 2012 6:05 pm

Does that mean 320 sprite pixels in a row? So, only 20 16x16 sprites per scanline?

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Sat Jul 14, 2012 6:16 pm

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.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sat Jul 14, 2012 7:25 pm

I was sure this has been already discussed :
viewtopic.php?t=15

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Sat Jul 14, 2012 7:26 pm

"The topic or post you requested does not exist"

:)

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sat Jul 14, 2012 7:28 pm

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.

greatkreator
Very interested
Posts: 158
Joined: Sat May 12, 2012 7:37 pm
Location: Ukraine

Post by greatkreator » Sat Jul 14, 2012 7:56 pm

What does it mean per line? What is line? A line of horizontal pixels?

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Sat Jul 14, 2012 8:35 pm

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.

Post Reply