Static 16-color background display in Mode 1 (4bpp). More...
Functions | |
| int | main (void) |
| Entry point – load a 4bpp tileset and display a static Mode 1 image. | |
Static 16-color background display in Mode 1 (4bpp).
Displays a single full-screen tiled background using Mode 1, the most commonly used SNES video mode. Mode 1 provides two 4bpp layers (BG1 and BG2, each up to 16 colors) plus one 2bpp layer (BG3, 4 colors). This example uses only BG1 with a 16-color tileset and tilemap converted from a PNG by gfx4snes.
This is a direct port of the PVSnesLib "Mode1" example.
| int main | ( | void | ) |
Entry point – load a 4bpp tileset and display a static Mode 1 image.
Demonstrates the typed asset bundle: tileset, palette, tilemap, color depth and map size all travel together in a single BgAsset. A single bgLoad() does the same work as a manual bgSetMapPtr + bgInitTileSet + dmaCopyVram triple, with the color-mode / size pairing locked at declaration time.
The VRAM layout places the tilemap at $0000 and tile graphics at $4000 to avoid overlap (each tilemap is up to 2KB, tile data can be many KB).