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: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
No edit summary
m (Xkeeper moved page EarthBound:Map Data:Palette Pointer Table to EarthBound/Map Data/Palette Pointer Table: normalize subpages and titles)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{subpage|game=EarthBound:ROM map}}
{{Infobox table|name=Palette Pointer Table
{{Infobox table|name=Palette Pointer Table
|game=EarthBound
|game=EarthBound
Line 9: Line 11:
}}
}}


Each entry is a (little-endian) SNES address pointer to a group of tileset palettes located at offset [[EarthBound:Map_Data:Palettes|0x1A7EA7]]. There are 32 such groups, each of which contains varying numbers of palettes. In addition, each of those palettes hosts 6 subpalettes.
Table mapping between tileset numbers (from the [[EarthBound:Map_Data:Global_Tileset/Palette_Table|Global_Tileset/Palette_Table]]) and map palettes for that tileset.
 
==Format<span class="anchor" id="Format"></span>==
 
Each entry is a (little-endian) SNES address pointer into the [[EarthBound:Map_Data:Palettes|map palettes]] (<tt>$DA7CA7</tt> or ROM offset <tt>0x1A7EA7</tt>), representing the start of the block of palettes for a tileset. Entries are indexed by tileset number (from the [[EarthBound:Map_Data:Global_Tileset/Palette_Table|Global_Tileset/Palette_Table]]), so the pointer for a particular tileset can be found using the formula <code>palette_pointer_address = $ef10fb + tileset_number * 4</code> or <code>palette_pointer_offset = 0x2f12fb + tileset_number * 4</code>. 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 <tt>0xc0</tt> 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 <code>num_palettes = (tileset_plus_one_table_pointer_value - tileset_table_pointer_value) / 0xc0</code>.
 
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.


{{error|Some of this information is blind speculation, but I know certain parties have this figured out. Please correct/verify/elaborate.|decaheximal}}
{| border=1 cellspacing=0 cellpadding=3
! Tileset number !! Tileset description !! Num associated palettes
|-
| <tt>00</tt> || Lost Underworld || 4
|-
| <tt>01</tt> || Onett || 3
|-
| <tt>02</tt> || Twoson || 4
|-
| <tt>03</tt> || Threed || 2
|-
| <tt>04</tt> || Fourside || 2
|-
| <tt>05</tt> || Magicant || 4
|-
| <tt>06</tt> || Outdoors || 7
|-
| <tt>07</tt> || Summers || 1
|-
| <tt>08</tt> || Dusty Dunes Desert || 2
|-
| <tt>09</tt> || Dalaam || 6
|-
| <tt>10</tt> || Indoors 1 || 8
|-
| <tt>11</tt> || Indoors 1a || 8
|-
| <tt>12</tt> || Indoors 1b || 8
|-
| <tt>13</tt> || Winters || 4
|-
| <tt>14</tt> || Indoors 1c || 8
|-
| <tt>15</tt> || Indoors 1d || 8
|-
| <tt>16</tt> || Indoors 1e || 4
|-
| <tt>17</tt> || Indoors 1f || 8
|-
| <tt>18</tt> || Scaraba || 1
|-
| <tt>19</tt> || Indoors 4 || 7
|-
| <tt>20</tt> || Stores 1 || 8
|-
| <tt>21</tt> || Indoors 2 || 5
|-
| <tt>22</tt> || Indoors 2a || 5
|-
| <tt>23</tt> || Indoors 2b || 4
|-
| <tt>24</tt> || Stores 2 || 5
|-
| <tt>25</tt> || Indoors 3 || 8
|-
| <tt>26</tt> || Caves 2 || 6
|-
| <tt>27</tt> || Caves 1 || 5
|-
| <tt>28</tt> || Caves 1a || 6
|-
| <tt>29</tt> || Caves 1b || 6
|-
| <tt>30</tt> || Caves 1c || 3
|-
| <tt>31</tt> || Extra Palettes || 8
|}


{{stub}}
[[Category:EarthBound:Map_Data|Palette Pointer Table]]

Latest revision as of 02:41, 24 January 2024

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