We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

Sprite (hardware): Difference between revisions

From SnesLab
Jump to: navigation, search
(→‎Reference: bullet points -> numbering)
(→‎References: paragraph num)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
On the [[SNES]] hardware, a sprite is an image drawn at a specific part of the screen. Unlike regular layers, each sprite image can move independently from each other. Furthermore, sprites also always use 4bpp graphics, no matter which [[BG mode]] is used. Only two different sprite sizes can be used at the same time, the two size available depend on bits 5, 6 and 7 of $2101. In [[SMW]], the two sizes used are 8x8 and 16x16. The sprite data is stored in [[OAM]], the graphics for them are stored in [[VRAM]] and the palette in [[CGRAM]].
On the [[SNES]] hardware, a sprite is an image drawn at a specific part of the screen. Unlike regular layers, each sprite image can move independently from each other. Furthermore, sprites also always use 4bpp graphics, no matter which [[BG mode]] is used. Only two different sprite sizes can be used at the same time - the two sizes available depend on bits 5, 6 and 7 of $2101. In [[SMW]], the two sizes used are 8x8 and 16x16. The sprite data is stored in [[OAM]], the graphics for them are stored in [[VRAM]] and the palette in [[CGRAM]].


{| class="wikitable"
{| class="wikitable"
!colspan="2"|OBJ Size Select
!colspan="3"|OBJ Size Combination Select
|+
|+
| 000 || 8x16
| 000 || 8 dot || 16 dot
|+
|+
| 001 || 8x32
| 001 || 8 dot || 32 dot
|+
|+
| 010 || 8x64
| 010 || 8 dot || 64 dot
|+
|+
| 011 || 16x32
| 011 || 16 dot || 32 dot
|+
|+
| 100 || 16x64
| 100 || 16 dot || 64 dot
|+
|+
| 101 || 32x64
| 101 || 32 dot || 64 dot
|+
| 110 || 16 dot x 32 dot || 32 dot x 64 dot
|+
| 111 ||| 16 dot x 32 dot || 32 dot x 32 dot
|}
|}
The last two non-square size combinations are not documented in the official dev manual.<sup>[2]</sup>


== Limitations ==
== Limitations ==
* Only 32 sprites can be used on the same [[scanline]] (this is refered to as '[[Range Over]]')
* Only 34 sprite tiles (8x8) can be used on the same scanline (this is refered to as '[[Time Over]]')
* The OAM can only hold up to 128 sprites.
* Sprites are never hi-res.
* [[Interlacing]] does not double the possible sprite vertical positions<sup>[3]</sup>


Only 32 sprites can be used on the same [[scanline]] (this is refered to as '[[Range Over]]')
=== See Also ===
 
{| class="wikitable"
Only 34 sprite tiles (8x8) can be used on the same scanline (this is refered to as '[[Time Over]]')
!colspan="7"|Other Layers
 
|+
The OAM can only hold up to 128 sprites.
| [[Backdrop Color]] || [[Layer 4]] || [[Layer 3]] || [[Layer 2]] || [[Layer 1]] || [[Sprite (hardware) | Sprite]] || [[BG3 High Priority Bit|BG3 High Prio]]
|}


Sprites are never hi-res.
=== References ===
# Chapter 2, "Object (OBJ)" on [https://archive.org/details/SNESDevManual/book1/page/n60 page 2-2-1 of Book I] of the official Super Nintendo development manual
# [https://archive.org/details/SNESDevManual/book1/page/n114 page 2-27-1 of Book I], lbid
# 18.3 OBJ on [https://archive.org/details/SNESDevManual/book1/page/n88 page 2-18-1 of Book I], lbid.


[[Category:Video]]
[[Category:Video]]
 
[[Category:Scene Slang]]
=== Reference ===
# [https://archive.org/details/SNESDevManual/book1/page/n59 page 2-2-1 of Book I] of the official Super Nintendo development manual
# [https://archive.org/details/SNESDevManual/book1/page/n114 page 2-27-1 of Book I] lbid

Latest revision as of 06:18, 18 August 2024

On the SNES hardware, a sprite is an image drawn at a specific part of the screen. Unlike regular layers, each sprite image can move independently from each other. Furthermore, sprites also always use 4bpp graphics, no matter which BG mode is used. Only two different sprite sizes can be used at the same time - the two sizes available depend on bits 5, 6 and 7 of $2101. In SMW, the two sizes used are 8x8 and 16x16. The sprite data is stored in OAM, the graphics for them are stored in VRAM and the palette in CGRAM.

OBJ Size Combination Select
000 8 dot 16 dot
001 8 dot 32 dot
010 8 dot 64 dot
011 16 dot 32 dot
100 16 dot 64 dot
101 32 dot 64 dot
110 16 dot x 32 dot 32 dot x 64 dot
111 16 dot x 32 dot 32 dot x 32 dot

The last two non-square size combinations are not documented in the official dev manual.[2]

Limitations

  • Only 32 sprites can be used on the same scanline (this is refered to as 'Range Over')
  • Only 34 sprite tiles (8x8) can be used on the same scanline (this is refered to as 'Time Over')
  • The OAM can only hold up to 128 sprites.
  • Sprites are never hi-res.
  • Interlacing does not double the possible sprite vertical positions[3]

See Also

Other Layers
Backdrop Color Layer 4 Layer 3 Layer 2 Layer 1 Sprite BG3 High Prio

References

  1. Chapter 2, "Object (OBJ)" on page 2-2-1 of Book I of the official Super Nintendo development manual
  2. page 2-27-1 of Book I, lbid
  3. 18.3 OBJ on page 2-18-1 of Book I, lbid.