SNES Images
The SNES builds its picture from tiled background layers under the control of the PPU. Eight background modes trade the number of layers against the colours each layer can show, and one of them, Mode 7, is a single layer the hardware can rotate and scale. Everything is drawn from tiles held in VRAM, coloured through a 256-entry palette in CGRAM.
Overview
The display is 256×224 pixels in the normal NTSC setup. The picture is not a single bitmap; it is assembled every scanline from up to four scrolling background layers plus the object layer. Each background is a grid of 8×8 tiles, arranged by a tilemap, coloured from a shared 256-colour palette. The chosen background mode decides how many layers exist and how deep their colour is.
| Property | Value |
|---|---|
| Resolution | 256 × 224 (up to 512 × 448 interlaced) |
| Tile size | 8 × 8 pixels (16 × 16 selectable) |
| Colour depths | 2bpp, 4bpp, 8bpp |
| VRAM | 64 KB |
| Palette (CGRAM) | 256 colours, 15-bit BGR |
| Background layers | 1 to 4, by mode |
Background modes
The PPU offers eight background modes, numbered 0 to 7. A mode fixes how many background layers are active and how many colours each can use. More layers means fewer colours per layer, because deeper tiles cost more VRAM and more per-pixel fetches. The table gives every mode with its layers and their colour depth.
| Mode | Layers | Colours per layer | Notes |
|---|---|---|---|
| 0 | 4 | 4 (2bpp) on all four | Each layer uses its own set of palettes. |
| 1 | 3 | 16, 16, 4 | Two 4bpp layers and one 2bpp; the common game mode. |
| 2 | 2 | 16, 16 | Two 4bpp layers with per-column offset (offset-per-tile). |
| 3 | 2 | 256, 16 | One 8bpp layer and one 4bpp. |
| 4 | 2 | 256, 4 | One 8bpp and one 2bpp, with offset-per-tile. |
| 5 | 2 | 16, 4 | High-resolution 512-wide mode. |
| 6 | 1 | 16 | High-resolution 4bpp with offset-per-tile. |
| 7 | 1 | 256 | Single affine layer with rotation and scaling. |
Modes 0 to 6 differ only in the layer and depth mix; the tile and tilemap machinery is the same. Mode 1 is the workhorse for most games, giving two richly coloured layers and a third for text or a status bar.
Mode 7
Mode 7 replaces the tiled layers with one large background the PPU can transform. It is a single 8bpp layer, 128×128 tiles at most, wrapped or clamped, that the hardware multiplies through a 2×2 matrix each scanline. That matrix can rotate, scale and shear the layer, producing the tilting floors, spinning maps and racing roads the machine is known for.
| Register | Role |
|---|---|
| M7A, M7B, M7C, M7D | The four 16-bit matrix coefficients |
| M7X, M7Y | Centre of rotation and scaling |
| M7HOFS, M7VOFS | Scroll offset of the transformed layer |
Changing the matrix values between scanlines, usually with a raster interrupt, bends the transform down the screen and gives the perspective effect of a ground plane receding to the horizon.
Tile character format
A tile, also called a character, is an 8×8 block of pixels. Its colour depth is set by the mode and layer: 2bpp for 4 colours, 4bpp for 16, or 8bpp for 256. The pixels are stored as bitplanes. A 2bpp tile is two planes, 16 bytes; each pair of bytes holds one row, the two planes giving the two bits of each of the eight pixels. Deeper tiles simply add more planes.
| Depth | Colours | Planes | Bytes per tile |
|---|---|---|---|
| 2bpp | 4 | 2 | 16 |
| 4bpp | 16 | 4 | 32 |
| 8bpp | 256 | 8 | 64 |
In a 4bpp tile the first two planes are stored interleaved by row, then the next two planes follow as a second block. Colour index 0 is transparent, so it shows the backdrop or a lower layer. The final on-screen colour is that index plus the palette offset chosen by the tilemap entry.
Palette and CGRAM
All colour on the SNES comes from CGRAM, a 512-byte palette RAM holding 256 colours, two bytes each. A colour is a 15-bit value with five bits per channel in blue-green-red order, so the top bit of the 16-bit word is unused.
| Bit | 15 | 14–10 | 9–5 | 4–0 |
|---|---|---|---|---|
| Meaning | unused | Blue (0–31) | Green (0–31) | Red (0–31) |
The 256 colours are shared out among the layers. A 4bpp layer draws from one of sixteen 16-colour sub-palettes, chosen per tile by the tilemap; an 8bpp layer or Mode 7 uses the whole 256 at once. Objects take the upper 128 colours as eight object palettes.
Video memory
The PPU owns three separate memories. VRAM holds the tiles and tilemaps, CGRAM holds the palette, and OAM holds the sprites. The CPU cannot see VRAM directly; it writes through the PPU data ports, usually driven by DMA during the vertical blank.
| Memory | Size | Contents |
|---|---|---|
| VRAM | 64 KB (32K words) | Tile character data and tilemaps. |
| CGRAM | 512 bytes | 256 colours, 15-bit BGR. |
| OAM | 544 bytes | The 128 sprite entries. |
Because VRAM is only 64 KB, deep tiles and large tilemaps compete for space, so a game balances how many 8bpp characters it keeps against the size of its scrolling maps.