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
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.

Note that, having no following entry, the number of palettes associate with tileset 31 cannot be determined in this manner. But it is known that tileset 31 has a full 8 palettes through observing the usage of those palettes in Magicant.

Tileset number Tileset description 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 Indoors 1 8
11 Indoors 1a 8
12 Indoors 1b 8
13 Winters 4
14 Indoors 1c 8
15 Indoors 1d 8
16 Indoors 1e 4
17 Indoors 1f 8
18 Scaraba 1
19 Indoors 4 7
20 Stores 1 8
21 Indoors 2 5
22 Indoors 2a 5
23 Indoors 2b 4
24 Stores 2 5
25 Indoors 3 8
26 Caves 2 6
27 Caves 1 5
28 Caves 1a 6
29 Caves 1b 6
30 Caves 1c 3
31 Extra Palettes 8