# Backgrounds Depending on the current [video mode](graphics.md#video-modes), three different types of backgrounds are available. They are: ### Text Backgrounds These are tile-based backgrounds that descend from the usage of tiles to display characters in text modes of a PC or workstation. They are made up of 8x8 tiles, the bitmaps of which are stored at the tile data address. The address of this data is set using registers [REG_BG0CNT - REG_BG3CNT](registers.md#REG_BGCNT). The [HOFS / VOFS](registers.md#REG_BGOFS) registers can be used to scroll around a larger area of up to 512x512 pixels (or 64 x 64 tiles). In text backgrounds, the data for each pixel is stored as an 8 or 4 bit palette index. In 8-bit mode, the [palette](memory.md#palette-ram) at `0x05000000` stores a 15-bit color value for each of the 256 palette entries. In 4-bit mode, the the map index contains a 4-bit value indicating which of 16 16-color palettes to use for each tile. Each of these palettes is 32 bytes long and can be found at `0x05000000`, `0x05000020`, etc. ### Scale/Rotate Backgrounds These backgrounds are also tile-based, and operate similarly to Text Backgrounds. However, these backgrounds may also be [scaled or rotated](registers.md#background-rotation-scaling-registers). Additionally they may only use an 8-bit palette, and can vary in size from 128 to 1024 pixels across. The palette is at `0x05000000`, and contains 256 16-bit [color entries](graphics.md#color-format) ### Bitmapped Backgrounds These backgrounds vary depending on the [video mode](graphics.md#video-modes), but in all cases they rely on a single buffer upon which the image is drawn, either using an 8-bit palette or 16-bit color entries themsevles. Bitmap backgrounds are treated as BG2 for purposes of rotation, scaling, and blending. In the bitmap modes the frame buffer data extends into the obj tile data region, limiting it to the range from `0x06014000` - `0x06018000` (sprite indices 512 - 1024). ## Background Map Entry Format ### Text Background Map Format The tile map, which stores the layout of the tiles on screen, begins at the tile map address found for a particular background, detrmined by [REG_BG0CNT - REG_BG3CNT](registers.md#REG_BG0). It has a selectable size up to 512x512. The tile map contains a 16-bit entry for each tile, which has the following format:
F E D C B A 9 8 7 6 5 4 3 2 1 0 L L L L V H T T T T T T T T T T
7 6 5 4 3 2 1 0 T T T T T T T T| Bits | Description | |---------|---------------------------------------------------------| | 0-7 (T) | The tile number Rotational backgrounds do not divide tile maps into blocks.