Maybe somebody can help me out with this one. Nimai Malle's pce_doc says that 16 pixel wide sprites are aligned as 32 pixel wide, does that mean that the system thinks the sprites are 32 wide no matter what? The sprite per scanline limit is supposed to be 16, but if the HuC6270 sees them all as 32 pixels wide does that mean that the real limit is 8 sprites per scanline?
The number of sprites per line is a maximum of 16, in a
specific and best optimized
situation. Because the width of the sprite is variable (not fixed, like 8bit consoles), the maximum number of sprites per scanline is also variable. This isn't unlike the SNES or the Genesis either in that respect. It's easier to think of sprite "cells" per line, rather than actual sprite
entries per line. The smallest sprite cell on the TG/PCE is 16 pixels wide. The maximum sprite cells per scanline (normal conditions, excluding funky dual scanline per normal scanline modes - as they are mostly useless) is 16. 16pixels x 16 = 256 pixels (scanline buffer). It's this scanline buffer that prevents more cells from being shown on a single scanline. If you have 240 pixels of the buffer used up on a given scanline (fifteen sprite cells) and you place a 32 wide sprite on that same line, then the last cell of that 32 wide sprite will drop off. You'll only see the first 16 pixels of that 32pixel wide sprite. Because sprite sizes are made up of sprite cells, not real *different* sprite width rows and columns. The Genesis and SNES are exactly like this too. It's easiest to think of this as a chain of connected sprite cells that's done in hardware, rather than software. It also makes a smaller SAT (sprite attribute table) more efficient. A single SAT entry can use a sprite configuration of 32x64. That saves the SAT of 7 additional entries if you did it by software (which WOULD make 64 total sprite entries much more limiting without this hardware feature).
So, sixteen 16 wide pixel sprite cells per scanline. The number of "SAT" sprites per scanline is variable when you start mixing sprite sizes. The
minimum would be 8 sprites per scanline if all you ever used were 32 wide sprites. Relative to the Genesis and SNES, they use a sprite cell size of 8 pixels wide. The Genesis has more in between sprite sizes. Bonk for examples, takes about 24 pixels wide for the widest frames - yet he is drawn on a 32 pixel wide setup on the PCE - you've got 8 pixels of blank space that's eating into scanline buffer limit. On the Genesis, you can select a specific size of 24 pixels (three 8pixels wide cells) and be more efficient with the sprite bandwidth per scanline (though the scanline buffer is still the same; the width of the screen: 256 pixels). Though the Genesis has more limitations in the fetch design, making the number of sprites per line more complicated than the PCE. Regardless of the sprite "width", the Genesis VDP will
only show 16 sprite per scanline in low res mode (20 per high res mode). So the advantage isn't as automatic as you think it would be, though high res mode is more flexible on the Genesis than its low res mode. The SNES also uses 8 pixel wide sprite cells, but the maximum sprite cells per scanline is higher than the scanline width itself - it's 34 eight pixel wide sprite cells per scanline. The number of SAT (Nintendo calls it OAM) entries are 32 per scanline. So the SNES could optimize for more smaller objects per scanline than both the Genesis or TG16 and that's why the SAT(OAM) size is a total of 128 entries (seen as 128 sprites per screen in specs). It's needed for when you have a lot of 8x8 sprites on screen. The problem is the overheard of that on the processor. That and you can
only have two sprite sizes selected per screen at a time, unlike the TG16 and Genesis. So choose a flexible 16x16 and 32x16 set size and kill alot of your advantage of that SNES sprite cell size, or go with a 8x8 & 16x16 and
eat/burn through your processor resource and OAM table (sprites per screen).
Of the three system's sprite per scanline limit, the PCE is easiest to understand/visualize(no pun intended). There's another system that's similar enough to compare with the PCE's sprite setup. The X68000 computer. It has a SAT of 128 entries (double PCE's). It also has a sprite
cell size of 16x16, just like the PCE. But it has a sprite scanline buffer of 512 pixels or 32 sprite cells (double the PCE's). This might sound pretty good, and it is, but there's a downfall to the X68k. It only has a sprite size in the SAT of
16x16. It can only use the base cell size and nothing larger. This means you'll eat through the SAT pretty quickly because you need to make the 32x32 objects or larger, in 4 or more SAT entries. It also means more overhead on the CPU (software meta-sprite handling). It also directly limits
how much sprite pixels you can have on screen: 128 SAT entries * 256 pixels (16x16 sprite cell) = 32768 pixel coverage (not square). To put that into a square, that's a
maximum single 181x181 window/area (or 256x128 as an easier number to visualize). Now put that into the context of a game running in 384 pixel mode on the X68k (768 pixel mode with half dot clock speed setting). Pixel per screen width ratio becomes even more of a limitation for sprites coverage in that resolution (vs 256 pixel mode) where the 16x16 sprite cells are now 1/3rd their original width in display (seems a lot of games on the X68 use the higher 384 res mode for games).
In contrast, the PCE's maximum sprite pixel coverage is 131072 pixels (all 64 SAT entries using 32x64 sprites) or a
maximum single 362x362 pixel area (more than what can be shown onscreen). A typical 32x32 configuration yield is 65536 pixel coverage or 256x256 pixel area (still larger than the low res screen mode of 256x240). The X68k is also hard segmented for sprite and BG addresses in vram (unlike the PCE's place it anywhere/make up your own vram segmentation rules). It's a pretty big difference between the two. It's an interesting comparison because if you look at the systems; one has a much better sprite system (PCE) but with a weaker scanline buffer and the other has a poor sprite setup but with a stronger scanline buffer
and an additional BG layer. I always thought the x68k was pretty similar to the CPS1 hardware, but now I know it's nowhere near as close.