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/Palette Pointer Table

From Data Crystal
< EarthBound
Revision as of 03:36, 16 June 2023 by Esorth (talk | contribs) (Document number of palettes per tileset)
Jump to navigation Jump to search

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

Palette Pointer Table
Game EarthBound
Start Address 0x2F12FB
End Address 0x2F137A
# of Entries 32
Entry Length 4 bytes (0x4)
Total Length 128 bytes (0x80)
Back to the ROM map

Table mapping between tileset numbers (from the Global_Tileset/Palette_Table) and map palettes for that tileset.

Format

Each entry is a (little-endian) SNES address pointer into the map palettes ($DA7CA7 or ROM offset 0x1A7EA7), representing the start of the block of palettes for a tileset. Entries are indexed by tileset number (from the Global_Tileset/Palette_Table), so the pointer for a particular tileset can be found using the formula palette_pointer_address = $ef10fb + tileset_number * 4 or palette_pointer_offset = 0x2f12fb + tileset_number * 4. There are 32 valid tileset numbers, giving the Palette Pointer Table a total of 32 entries and 128 bytes.

Number of palettes per tileset

The number of palettes associated with each tileset varies, but because the pointer table points to a contiguous block of palettes, all in order by tileset, and each palette is a consistent 0xc0 bytes, the pointer table values can be used to determine the number of palettes associated with each tileset. The determination can be made using the formula num_palettes = (tileset_plus_one_table_pointer_value - tileset_table_pointer_value) / 0xc0.

Tileset number Tileset name Num associated palettes
00 Lost Underworld 4
01 Onett 3
02 Twoson 4
03 Threed 2
04 Fourside 2
05 Magicant 4
06 Outdoors 7
07 Summers 1
08 Dusty Dunes Desert 2
09 Dalaam 6
10 ?? 8
11 ?? 8
12 ?? 8
13 ?? 4
14 ?? 8
15 ?? 8
16 ?? 4
17 ?? 8
18 ?? 1
19 ?? 7
20 ?? 8
21 ?? 5
22 ?? 5
23 ?? 4
24 ?? 5
25 ?? 8
26 ?? 6
27 ?? 5
28 ?? 6
29 ?? 6
30 ?? 3
31 ?? ??