Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

EarthBound/Map Data/Palettes

From Data Crystal
< EarthBound
Revision as of 02:13, 23 June 2023 by Esorth (talk | contribs) (→‎Format: Document the entry ordering)
Jump to navigation Jump to search

This is a sub-page of EarthBound/Map Data.

Map Palettes
Game EarthBound
Start Address 0x1A7EA7
End Address 0x1AFCA6
# of Entries 168
Entry Length 192 bytes (0xC0)
Total Length 32256 bytes (0x7E00)
Back to the ROM map

Data block of the palette data used for game maps.

Format

Each entry represents palette data for use by EarthBound map graphics. Each entry is itself comprised of 6 subpalettes, each comprised of 16 colors.

Terminology Note: What the EarthBound modding community generally refers to as a "subpalette" is itself referred to in the SNES development guide as a "palette", and therefore the grouping of 6 of those, which is generally referred to in EarthBound modding as a "palette" (at least in the context of map changes), would in general SNES development be a group of palettes.

Colors are stored as little endian (2 bytes):

gggrrrrr 0bbbbbgg

Each subpalette is stored as 16 colors in a row (32 bytes). The first color in each subpalette is always treated as transparent. Is that first color always stored as 0x0000, or does EarthBound sometimes use it for flags?

Finally, each palette is stored as 6 subpalettes in a row (192 bytes).

Entry Ordering

Palettes are ordered first by tileset number (from the Global Tileset/Palette Table), then within each tileset by the palette number (also from the Global Tileset/Palette Table). Because different tilesets have different numbers of palettes, a lookup to the Palette Pointer Table is used to find a pointer to the first palette for any given tileset.