Mode 3 full-color (256-color, 8bpp) background. More...
Macros | |
| #define | MAP_ADDR 0x7000 |
| The picture, converted by the build from res/canal.png (res/canal.png.toml). | |
Functions | |
| int | main (void) |
| Entry point – load 256-color tileset and display Mode 3 image. | |
Mode 3 full-color (256-color, 8bpp) background.
Displays a 256-color background using Mode 3, the highest color-depth tiled mode on the SNES: a city canal at night, 253 colours, its haze a gradient no 16-colour palette could hold. Each tile is 64 bytes (8 bitplanes), so this tileset (770 tiles, 48 KB) is larger than a ROM bank: the converter writes it in two parts, canal_tiles and canal_tiles_1, and the linker places each where it has room. The generated canal_tiles_load() copies both with dmaCopyVram(), whose pointer carries the bank byte, so each part is taken wherever it landed.
This began as the PVSnesLib "Mode3" example.
| #define MAP_ADDR 0x7000 |
The picture, converted by the build from res/canal.png (res/canal.png.toml).
VRAM word address of the tilemap, past the 770 tiles (770 x 32 words = $6040)
| int main | ( | void | ) |
Entry point – load 256-color tileset and display Mode 3 image.
Forces blank, DMAs the 8bpp tile data (two parts, each at most a ROM bank), the tilemap and the 256-color palette into VRAM/CGRAM, then configures Mode 3 and turns on the screen. BG1 has 256 colors per tile (8 bitplanes), the richest color depth of any tiled SNES mode; the tradeoff is one such layer, plus a 16-color BG2 that is unused here.