The current URL is datacrystal.tcrf.net.
EarthBound/Map Data/Compressed Tile Arrangement Data: Difference between revisions
(→Blocks: Inventory of block contents) |
m (Xkeeper moved page EarthBound:Map Data:Compressed Tile Arrangement Data to EarthBound/Map Data/Compressed Tile Arrangement Data: normalize subpages and titles) |
||
(7 intermediate revisions by one other user not shown) | |||
Line 14: | Line 14: | ||
|end=<tt>0x17FDE7</tt> | |end=<tt>0x17FDE7</tt> | ||
|numentries=1 | |numentries=1 | ||
|entrylength=Varies | |entrylength=Varies | ||
|totallength=13800 bytes (<tt>0x35E8</tt>), | |totallength=13800 bytes (<tt>0x35E8</tt>), 26624 bytes (<tt>0x6800</tt>) after decompression | ||
}} | }} | ||
{| border=1 cellspacing=0 cellpadding=3 | {| border=1 cellspacing=0 cellpadding=3 | ||
! Address !! Tileset name !! Tileset index !! Compressed length | ! Address !! Tileset name !! Tileset index !! Compressed length !! Decompressed length !! Num chunks | ||
|- | |- | ||
| <tt>0x17C800</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#LostUnderworld|Lost Underworld]] || <tt>00</tt> || 13800 bytes (<tt>0x35E8</tt>) | | <tt>0x17C800</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#LostUnderworld|Lost Underworld]] || <tt>00</tt> || 13800 bytes (<tt>0x35E8</tt>) || 26624 bytes (<tt>0x6800</tt>) || 832 | ||
|} | |} | ||
Line 33: | Line 33: | ||
|end=<tt>0x19D051</tt> | |end=<tt>0x19D051</tt> | ||
|numentries=4 | |numentries=4 | ||
|entrylength=Varies | |entrylength=Varies | ||
|totallength=52818 bytes (<tt>0xCE52</tt>), | |totallength=52818 bytes (<tt>0xCE52</tt>), 100192 bytes (<tt>0x018760</tt>) after decompression | ||
}} | }} | ||
{| border=1 cellspacing=0 cellpadding=3 | {| border=1 cellspacing=0 cellpadding=3 | ||
! Address !! Tileset name !! Tileset index !! Compressed length | ! Address !! Tileset name !! Tileset index !! Compressed length !! Decompressed length !! Num chunks | ||
|- | |- | ||
| <tt>0x190200</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Onett|Onett]] || <tt>01</tt> || 13545 bytes (<tt>0x34E9</tt>) | | <tt>0x190200</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Onett|Onett]] || <tt>01</tt> || 13545 bytes (<tt>0x34E9</tt>) || 27040 bytes (<tt>0x69A0</tt>) || 845 | ||
|- | |- | ||
| <tt>0x1936E9</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Twoson|Twoson]] || <tt>02</tt> || 13250 bytes (<tt>0x33C2</tt>) | | <tt>0x1936E9</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Twoson|Twoson]] || <tt>02</tt> || 13250 bytes (<tt>0x33C2</tt>) || 26464 bytes (<tt>0x6760</tt>) || 827 | ||
|- | |- | ||
| <tt>0x196AAB</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Threed|Threed]] || <tt>03</tt> || 9514 bytes (<tt>0x252A</tt>) | | <tt>0x196AAB</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Threed|Threed]] || <tt>03</tt> || 9514 bytes (<tt>0x252A</tt>) || 16768 bytes (<tt>0x4180</tt>) || 524 | ||
|- | |- | ||
| <tt>0x198FD5</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Fourside|Fourside]] || <tt>04</tt> || 16509 bytes (<tt>0x407D</tt>) | | <tt>0x198FD5</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Fourside|Fourside]] || <tt>04</tt> || 16509 bytes (<tt>0x407D</tt>) || 29920 bytes (<tt>0x74E0</tt>) || 935 | ||
|} | |} | ||
Line 58: | Line 58: | ||
|end=<tt>0x1A7EA6</tt> | |end=<tt>0x1A7EA6</tt> | ||
|numentries=3 | |numentries=3 | ||
|entrylength=Varies | |entrylength=Varies | ||
|totallength=31911 bytes (<tt>0x7CA7</tt>), | |totallength=31911 bytes (<tt>0x7CA7</tt>), 61152 bytes (<tt>0xEEE0</tt>) after decompression | ||
}} | }} | ||
{| border=1 cellspacing=0 cellpadding=3 | {| border=1 cellspacing=0 cellpadding=3 | ||
! Address !! Tileset name !! Tileset index !! Compressed length | ! Address !! Tileset name !! Tileset index !! Compressed length !! Decompressed length !! Num chunks | ||
|- | |- | ||
| <tt>0x1A0200</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Magicant|Magicant]] || <tt>05</tt> || 4930 bytes (<tt>0x1342</tt>) | | <tt>0x1A0200</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Magicant|Magicant]] || <tt>05</tt> || 4930 bytes (<tt>0x1342</tt>) || 9184 bytes (<tt>0x23E0</tt>) || 287 | ||
|- | |- | ||
| <tt>0x1A1542</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Outdoors|Outdoors]] || <tt>06</tt> || 15201 bytes (<tt>0x3B61</tt>) | | <tt>0x1A1542</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Outdoors|Outdoors]] || <tt>06</tt> || 15201 bytes (<tt>0x3B61</tt>) || 28000 bytes (<tt>0x6D60</tt>) || 875 | ||
|- | |- | ||
| <tt>0x1A50A3</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Summers|Summers]] || <tt>07</tt> || 11780 bytes (<tt>0x2E04</tt>) | | <tt>0x1A50A3</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Summers|Summers]] || <tt>07</tt> || 11780 bytes (<tt>0x2E04</tt>) || 23968 bytes (<tt>0x5DA0</tt>) || 749 | ||
|} | |} | ||
Line 81: | Line 81: | ||
|end=<tt>0x1BF4EA</tt> | |end=<tt>0x1BF4EA</tt> | ||
|numentries=6 | |numentries=6 | ||
|entrylength=Varies | |entrylength=Varies | ||
|totallength=62187 bytes (<tt>0xF2EB</tt>), | |totallength=62187 bytes (<tt>0xF2EB</tt>), 124096 bytes (<tt>0x01E4C0</tt>) after decompression | ||
}} | }} | ||
{| border=1 cellspacing=0 cellpadding=3 | {| border=1 cellspacing=0 cellpadding=3 | ||
! Address !! Tileset name !! Tileset index !! Compressed length | ! Address !! Tileset name !! Tileset index !! Compressed length !! Decompressed length !! Num chunks | ||
|- | |- | ||
| <tt>0x1B0200</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#DustyDunes|Dusty Dunes Desert]] || <tt>08</tt> || 9921 bytes (<tt>0x26C1</tt>) | | <tt>0x1B0200</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#DustyDunes|Dusty Dunes Desert]] || <tt>08</tt> || 9921 bytes (<tt>0x26C1</tt>) || 20096 bytes (<tt>0x4E80</tt>) || 628 | ||
|- | |- | ||
| <tt>0x1B28C1</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Dalaam|Dalaam]] || <tt>09</tt> || 15038 bytes (<tt>0x3ABE</tt>) | | <tt>0x1B28C1</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Dalaam|Dalaam]] || <tt>09</tt> || 15038 bytes (<tt>0x3ABE</tt>) || 29856 bytes (<tt>0x74A0</tt>) || 933 | ||
|- | |- | ||
| <tt>0x1B637F</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors4|Indoors 4]] || <tt>16</tt> || 6819 bytes (<tt>0x1AA3</tt>) | | <tt>0x1B637F</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors4|Indoors 4]] || <tt>16</tt> || 6819 bytes (<tt>0x1AA3</tt>) || 12480 bytes (<tt>0x30C0</tt>) || 390 | ||
|- | |- | ||
| <tt>0x1B7E22</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Winters|Winters]] || <tt>17</tt> || 5622 bytes (<tt>0x15F6</tt>) | | <tt>0x1B7E22</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Winters|Winters]] || <tt>17</tt> || 5622 bytes (<tt>0x15F6</tt>) || 10976 bytes (<tt>0x2AE0</tt>) || 343 | ||
|- | |- | ||
| <tt>0x1B9418</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors1|Indoors 1]] || <tt>10</tt> || 13492 bytes (<tt>0x34B4</tt>) | | <tt>0x1B9418</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors1|Indoors 1]] || <tt>10</tt> || 13492 bytes (<tt>0x34B4</tt>) || 27872 bytes (<tt>0x6CE0</tt>) || 871 | ||
|- | |- | ||
| <tt>0x1BC8CC</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors2|Indoors 2]] || <tt>11</tt> || 11295 bytes (<tt>0x2C1F</tt>) | | <tt>0x1BC8CC</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors2|Indoors 2]] || <tt>11</tt> || 11295 bytes (<tt>0x2C1F</tt>) || 22816 bytes (<tt>0x5920</tt>) || 713 | ||
|} | |} | ||
Line 110: | Line 110: | ||
|end=<tt>0x1CB222</tt> | |end=<tt>0x1CB222</tt> | ||
|numentries=6 | |numentries=6 | ||
|entrylength=Varies | |entrylength=Varies | ||
|totallength=45091 bytes (<tt>0xB023</tt>), | |totallength=45091 bytes (<tt>0xB023</tt>), 85472 bytes (<tt>0x014DE0</tt>) after decompression | ||
}} | }} | ||
{| border=1 cellspacing=0 cellpadding=3 | {| border=1 cellspacing=0 cellpadding=3 | ||
! Address !! Tileset name !! Tileset index !! Compressed length | ! Address !! Tileset name !! Tileset index !! Compressed length !! Decompressed length !! Num chunks | ||
|- | |- | ||
| <tt>0x1C0200</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Stores1|Stores 1]] || <tt>12</tt> || 8138 bytes (<tt>0x1FCA</tt>) | | <tt>0x1C0200</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Stores1|Stores 1]] || <tt>12</tt> || 8138 bytes (<tt>0x1FCA</tt>) || 14784 bytes (<tt>0x39C0</tt>) || 462 | ||
|- | |- | ||
| <tt>0x1C21CA</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Caves1|Caves 1]] || <tt>13</tt> || 14706 bytes (<tt>0x3972</tt>) | | <tt>0x1C21CA</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Caves1|Caves 1]] || <tt>13</tt> || 14706 bytes (<tt>0x3972</tt>) || 28224 bytes (<tt>0x6E40</tt>) || 882 | ||
|- | |- | ||
| <tt>0x1C5B3C</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors3|Indoors 3]] || <tt>14</tt> || 3903 bytes (<tt>0x0F3F</tt>) | | <tt>0x1C5B3C</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors3|Indoors 3]] || <tt>14</tt> || 3903 bytes (<tt>0x0F3F</tt>) || 6496 bytes (<tt>0x1960</tt>) || 203 | ||
|- | |- | ||
| <tt>0x1C6A7B</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Stores2|Stores 2]] || <tt>15</tt> || 2629 bytes (<tt>0x0A45</tt>) | | <tt>0x1C6A7B</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Stores2|Stores 2]] || <tt>15</tt> || 2629 bytes (<tt>0x0A45</tt>) || 4576 bytes (<tt>0x11E0</tt>) || 143 | ||
|- | |- | ||
| <tt>0x1C74C0</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Scaraba|Scaraba]] || <tt>18</tt> || 7050 bytes (<tt>0x1B8A</tt>) | | <tt>0x1C74C0</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Scaraba|Scaraba]] || <tt>18</tt> || 7050 bytes (<tt>0x1B8A</tt>) || 14240 bytes (<tt>0x37A0</tt>) || 445 | ||
|- | |- | ||
| <tt>0x1C904A</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Caves2|Caves 2]] || <tt>19</tt> || 8665 bytes (<tt>0x21D9</tt>) | | <tt>0x1C904A</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Caves2|Caves 2]] || <tt>19</tt> || 8665 bytes (<tt>0x21D9</tt>) || 17152 bytes (<tt>0x4300</tt>) || 536 | ||
|} | |} | ||
Line 134: | Line 134: | ||
==Format== | ==Format== | ||
===Decompressed Format=== | Tile arrangement data for each map tileset is individually compressed. See [[EarthBound:ASM:Decompression_Routine#CompressionFormat|Compression Format]]. | ||
===Decompressed Format<span class="anchor" id="Decompressed_Format"></span>=== | |||
Each entry, once decompressed, consists of a variable number of tile arrangements (four-tile-by-four-tile chunks), each 32 bytes. Arrangements are found from an index using the formula <code>arrangement_offset = arrangement_index * 32</code>. The [[EarthBound:Decompressed_Tile_Arrangement_Data|decompression buffer]] has capacity for up to 960 arrangements (30720 bytes), but in an unmodified EarthBound ROM, no entry contains more than 935 arrangements. | |||
Each arrangement contains 16 tilemap entries, each 2 bytes. The 16 tilemap entries represent a 4x4 grid of background tiles with each row in left-to-right order, followed by the next row, etc. Thus, within a tile arrangement, the tilemap entry for a given <tt>0-3/0-3</tt> x/y coordinate can be found using the formula <code>entry_offset = x * 2 + y * 8</code>. | |||
===Tilemap Entry Format=== | |||
See [https://snes.nesdev.org/wiki/Tilemaps SNES Background Tilemap]. | |||
<code>VH0PPP0CCCCCCCCC</code> | |||
* <tt>V</tt> (bit <tt>0x8000</tt>): Vertical flip. If set, tile will be flipped vertically from how it is stored in [[EarthBound:Map_Data:Compressed_Tileset_Character_Data|Tileset Character Data]]. | |||
* <tt>H</tt> (bit <tt>0x4000</tt>): Horizontal flip. If set, tile will be flipped horizontally from how it is stored in [[EarthBound:Map_Data:Compressed_Tileset_Character_Data|Tileset Character Data]]. | |||
* <tt>0</tt> (bit <tt>0x2000</tt>): Always zero in tile arrangement data loaded from ROM. This represents the BG Priority Bit once loaded into the tilemap, but the EarthBound engine sets it automatically when loading foreground/background paired tileset characters. See [[EarthBound:Map_Data:Compressed_Tileset_Character_Data#DecompressedFormat|Tileset Character Data Decompressed Format]]. | |||
* <tt>PPP</tt> (bits <tt>0x1C00</tt>): Palette selection. Always between 2 and 7 (inclusive), as those indices are where EarthBound loads map palettes into CGRAM. A palette selection value can be determined from an [[EarthBound:Map_Data:Palettes|EarthBound map subpalette number]] using the formula <code>palette_selection = subpalette_number + 2</code>. | |||
* <tt>0CCCCCCCCC</tt> (bits <tt>0x03FF</tt>): Tileset character selection. Character index into the currently loaded map tileset of a background tile. Always between 0 and 511 (inclusive) as those are the characters that EarthBound uses as background tiles. For characters paired with a foreground character, EarthBound will automatically generate the tilemap entry for the paired foreground tile. See [[EarthBound:Map_Data:Compressed_Tileset_Character_Data#DecompressedFormat|Tileset Character Data Decompressed Format]]. | |||
[[Category:EarthBound:Map_Data|Compressed Tile Arrangement Data]] | [[Category:EarthBound:Map_Data|Compressed Tile Arrangement Data]] |
Latest revision as of 02:41, 24 January 2024
This is a sub-page of EarthBound/Map Data.
Data blocks storing arrangements of four-tile-by-four-tile chunks for map tilesets. Data for a given map tileset is found using the Tile Arrangement Pointer Table.
Terminology note: In EarthBound modding, these four-tile-by-four-tile chunks are often referred to ambiguously as "tiles", while the individual 8x8 pixel tiles making up the tile chunks are often referred to as "minitiles".
Blocks
Block 1
Map Data: Compressed Tile Arrangement Data, Block 1 | |
Game | EarthBound |
Start Address | 0x17C800 |
End Address | 0x17FDE7 |
# of Entries | 1 |
Entry Length | Varies |
Total Length | 13800 bytes (0x35E8), 26624 bytes (0x6800) after decompression |
Back to the ROM map |
Address | Tileset name | Tileset index | Compressed length | Decompressed length | Num chunks |
---|---|---|---|---|---|
0x17C800 | Lost Underworld | 00 | 13800 bytes (0x35E8) | 26624 bytes (0x6800) | 832 |
Block 2
Map Data: Compressed Tile Arrangement Data, Block 2 | |
Game | EarthBound |
Start Address | 0x190200 |
End Address | 0x19D051 |
# of Entries | 4 |
Entry Length | Varies |
Total Length | 52818 bytes (0xCE52), 100192 bytes (0x018760) after decompression |
Back to the ROM map |
Address | Tileset name | Tileset index | Compressed length | Decompressed length | Num chunks |
---|---|---|---|---|---|
0x190200 | Onett | 01 | 13545 bytes (0x34E9) | 27040 bytes (0x69A0) | 845 |
0x1936E9 | Twoson | 02 | 13250 bytes (0x33C2) | 26464 bytes (0x6760) | 827 |
0x196AAB | Threed | 03 | 9514 bytes (0x252A) | 16768 bytes (0x4180) | 524 |
0x198FD5 | Fourside | 04 | 16509 bytes (0x407D) | 29920 bytes (0x74E0) | 935 |
Block 3
Map Data: Compressed Tile Arrangement Data, Block 3 | |
Game | EarthBound |
Start Address | 0x1A0200 |
End Address | 0x1A7EA6 |
# of Entries | 3 |
Entry Length | Varies |
Total Length | 31911 bytes (0x7CA7), 61152 bytes (0xEEE0) after decompression |
Back to the ROM map |
Address | Tileset name | Tileset index | Compressed length | Decompressed length | Num chunks |
---|---|---|---|---|---|
0x1A0200 | Magicant | 05 | 4930 bytes (0x1342) | 9184 bytes (0x23E0) | 287 |
0x1A1542 | Outdoors | 06 | 15201 bytes (0x3B61) | 28000 bytes (0x6D60) | 875 |
0x1A50A3 | Summers | 07 | 11780 bytes (0x2E04) | 23968 bytes (0x5DA0) | 749 |
Block 4
Map Data: Compressed Tile Arrangement Data, Block 4 | |
Game | EarthBound |
Start Address | 0x1B0200 |
End Address | 0x1BF4EA |
# of Entries | 6 |
Entry Length | Varies |
Total Length | 62187 bytes (0xF2EB), 124096 bytes (0x01E4C0) after decompression |
Back to the ROM map |
Address | Tileset name | Tileset index | Compressed length | Decompressed length | Num chunks |
---|---|---|---|---|---|
0x1B0200 | Dusty Dunes Desert | 08 | 9921 bytes (0x26C1) | 20096 bytes (0x4E80) | 628 |
0x1B28C1 | Dalaam | 09 | 15038 bytes (0x3ABE) | 29856 bytes (0x74A0) | 933 |
0x1B637F | Indoors 4 | 16 | 6819 bytes (0x1AA3) | 12480 bytes (0x30C0) | 390 |
0x1B7E22 | Winters | 17 | 5622 bytes (0x15F6) | 10976 bytes (0x2AE0) | 343 |
0x1B9418 | Indoors 1 | 10 | 13492 bytes (0x34B4) | 27872 bytes (0x6CE0) | 871 |
0x1BC8CC | Indoors 2 | 11 | 11295 bytes (0x2C1F) | 22816 bytes (0x5920) | 713 |
Block 5
Map Data: Compressed Tile Arrangement Data, Block 5 | |
Game | EarthBound |
Start Address | 0x1C0200 |
End Address | 0x1CB222 |
# of Entries | 6 |
Entry Length | Varies |
Total Length | 45091 bytes (0xB023), 85472 bytes (0x014DE0) after decompression |
Back to the ROM map |
Address | Tileset name | Tileset index | Compressed length | Decompressed length | Num chunks |
---|---|---|---|---|---|
0x1C0200 | Stores 1 | 12 | 8138 bytes (0x1FCA) | 14784 bytes (0x39C0) | 462 |
0x1C21CA | Caves 1 | 13 | 14706 bytes (0x3972) | 28224 bytes (0x6E40) | 882 |
0x1C5B3C | Indoors 3 | 14 | 3903 bytes (0x0F3F) | 6496 bytes (0x1960) | 203 |
0x1C6A7B | Stores 2 | 15 | 2629 bytes (0x0A45) | 4576 bytes (0x11E0) | 143 |
0x1C74C0 | Scaraba | 18 | 7050 bytes (0x1B8A) | 14240 bytes (0x37A0) | 445 |
0x1C904A | Caves 2 | 19 | 8665 bytes (0x21D9) | 17152 bytes (0x4300) | 536 |
Format
Tile arrangement data for each map tileset is individually compressed. See Compression Format.
Decompressed Format
Each entry, once decompressed, consists of a variable number of tile arrangements (four-tile-by-four-tile chunks), each 32 bytes. Arrangements are found from an index using the formula arrangement_offset = arrangement_index * 32
. The decompression buffer has capacity for up to 960 arrangements (30720 bytes), but in an unmodified EarthBound ROM, no entry contains more than 935 arrangements.
Each arrangement contains 16 tilemap entries, each 2 bytes. The 16 tilemap entries represent a 4x4 grid of background tiles with each row in left-to-right order, followed by the next row, etc. Thus, within a tile arrangement, the tilemap entry for a given 0-3/0-3 x/y coordinate can be found using the formula entry_offset = x * 2 + y * 8
.
Tilemap Entry Format
VH0PPP0CCCCCCCCC
- V (bit 0x8000): Vertical flip. If set, tile will be flipped vertically from how it is stored in Tileset Character Data.
- H (bit 0x4000): Horizontal flip. If set, tile will be flipped horizontally from how it is stored in Tileset Character Data.
- 0 (bit 0x2000): Always zero in tile arrangement data loaded from ROM. This represents the BG Priority Bit once loaded into the tilemap, but the EarthBound engine sets it automatically when loading foreground/background paired tileset characters. See Tileset Character Data Decompressed Format.
- PPP (bits 0x1C00): Palette selection. Always between 2 and 7 (inclusive), as those indices are where EarthBound loads map palettes into CGRAM. A palette selection value can be determined from an EarthBound map subpalette number using the formula
palette_selection = subpalette_number + 2
. - 0CCCCCCCCC (bits 0x03FF): Tileset character selection. Character index into the currently loaded map tileset of a background tile. Always between 0 and 511 (inclusive) as those are the characters that EarthBound uses as background tiles. For characters paired with a foreground character, EarthBound will automatically generate the tilemap entry for the paired foreground tile. See Tileset Character Data Decompressed Format.