Content deleted Content added
The overflow flag is set when more than 8 sprites appear on a scanline (or at least that was the intention - at least the NTSC NES PPU's overflow flag is buggy) |
Backgrounds and sprites are not tiles - they're composed of them |
||
Line 23:
As noted above, some games (mostly early MMC1 titles such as Legend of Zelda and Castlevania) store their graphics data in the main PRG ROM. These have a CHR RAM chip instead of a ROM and pass the data from the PRG ROM to the CHR RAM, the main purpose of this being to produce animated background tiles. The arrival of the MMC3 mapper in 1988 eliminated the need for this as animated tiles could now be banked from the CHR ROM on the fly. As the PPU has a 14-bit address bus, it can access up to 16k of CHR ROM or RAM at once.
Essentially, the PPU supports two different kinds of drawable objects: movable (sprites) and non-movable (background). Both
Sprite data is stored in a special memory called the "Sprite-RAM" or "SPR-RAM" for short, which is a 256-byte memory built into the PPU core. The data stored here is 4 bytes; the position, color and tile, for each of the 64 sprites. This data is used by the PPU to place the sprite when it [[Rendering (computer graphics)|renders]] the frame. Background objects, however, are stored in a much less exclusive way, which is more like the way characters are stored in [[text mode]] on [[Personal computer|PCs]]. A background is defined by a simple data structure called a nametable, which is essentially a two dimensional array. The integer value in each array slot corresponds to a tile number, and the index values of this slot correspond to the tile's intended x/y position on screen. The PPU has, without the use of memory mappers, two nametables, so smooth scrolling between backgrounds is possible.
|