Palettes in a nutshell
- There are 4 palettes, two per display.
- Sprites get one palette, and background layers another.
- Each palette has 256 halfword entries.
- Each entry contains 5 bits of red, 5 bits of green, 5 bits of blue, and an unused bit.
- PALETTE_BG1 is at 0x05000000 (background palette for 2D core A)
- PALETTE_FG1 is at 0x05000200 (sprite palette for 2D core A)
- PALETTE_BG2 is at 0x05000400 (background palette for 2D core B)
- PALETTE_FG2 is at 0x05000600 (sprite palette for 2D core B)
Color structure
| 15 | 14..10 | 9..5 | 4..0 |
| pad | blue | green | red |
|