The current URL is datacrystal.tcrf.net.
EarthBound/Map Data/Palettes: Difference between revisions
(→Format: Further document the format) |
(→Format: Document the entry ordering) |
||
Line 22: | Line 22: | ||
gggrrrrr 0bbbbbgg | 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 <tt> | 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 <tt>0x0000</tt>, or does EarthBound sometimes use it for flags?'' | ||
Finally, each palette is stored as 6 subpalettes in a row (192 bytes). | Finally, each palette is stored as 6 subpalettes in a row (192 bytes). | ||
===Entry Ordering=== | |||
Palettes are ordered first by tileset number (from the [[EarthBound:Map_Data:Global_Tileset/Palette_Table|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 [[EarthBound:Map_Data:Palette_Pointer_Table|Palette Pointer Table]] is used to find a pointer to the first palette for any given tileset. | |||
[[Category:EarthBound:Map_Data|Palettes]] | [[Category:EarthBound:Map_Data|Palettes]] | ||
Revision as of 02:13, 23 June 2023
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.