Game Boy Color Map
The Game Boy Color draws its background from a tile map, the same 32×32 grid of tile indices the Game Boy uses. What is new is a parallel attribute map, one byte per cell in the second video RAM bank, that gives every tile its own palette, its own tile bank, a horizontal and vertical flip, and a background priority. So colour and orientation are per tile, not shared across the whole screen.
Overview
The visible screen is 20×18 tiles of 160×144 pixels. Behind it sits a 32×32 tile map, 256×256 pixels, that wraps, so a game scrolls the small map as a window and rewrites the edge it exposes. Each cell is two bytes: a tile index in video RAM bank 0, and an attribute in bank 1 at the same address. The attribute's bank bit and the two tile banks together give 512 distinct tiles on screen.
| Property | Value |
|---|---|
| Visible screen | 20 × 18 tiles |
| Tile map | 32 × 32 cells, wraps at 256 pixels |
| Bytes per cell | 1 index (bank 0) + 1 attribute (bank 1) |
| Distinct tiles | 512 (256 × 2 banks), the Background mode's tile count |
| Background palettes | 8, of 4 colours each, per tile |
| Layers | Background and Window |
The background tile map
The tile map lives in video RAM bank 0, in one of two 1 KB regions, $9800 and $9C00, chosen by the display control register. Each is 32 rows of 32 bytes; the cell at column cx, row cy is byte cy × 32 + cx, and its value is a tile index. The addressing mode selects which 256-tile window of tile data the index reads, exactly as on the Game Boy.
| Offset | Size | Contents |
|---|---|---|
| $9800–$9BFF | 1 KB | Tile map 0, 32 × 32 indices. |
| $9C00–$9FFF | 1 KB | Tile map 1, 32 × 32 indices. |
The attribute map
Video RAM bank 1 holds a byte for every cell of the tile map, at the same address as its index. This attribute colours and orients the tile: it picks one of the eight background palettes, chooses which tile bank the index reads, flips the tile on either axis, and sets a background priority over objects.
| Bit | Meaning |
|---|---|
| 0–2 | Background palette 0–7. |
| 3 | Tile VRAM bank, 0 or 1. |
| 5 | Horizontal flip. |
| 6 | Vertical flip. |
| 7 | Background-to-object priority. |
So the tile index says which shape, and the attribute says how it is coloured and turned. Colour is per cell, unlike the Game Boy, whose whole background shares one four-shade palette.
Scrolling the map
Two registers, SCX and SCY, set the top-left pixel of the visible window into the 256×256 map, and both wrap. To scroll a world larger than the map, the game moves the scroll a pixel at a time and, as a fresh row or column of tiles comes into view, writes its indices into bank 0 and its attributes into bank 1 at the wrapped edge. The wrap makes the tile map a treadmill; the writes happen in the vertical blank, which caps how fast a detailed screen can scroll.
The window map
The Window is a second tilemap layer that draws over the background from a fixed position, set by WX and WY, without scrolling. It reads the other tile map region and the same attribute map, so a heads-up display or a status bar sits above the scrolling world. It is the same Window the Game Boy has, now coloured per tile.