EarthBound/Map Data/Compressed Tileset Character Data

From Data Crystal
< EarthBound
Revision as of 02:41, 24 January 2024 by Xkeeper (talk | contribs) (Xkeeper moved page EarthBound:Map Data:Compressed Tileset Character Data to EarthBound/Map Data/Compressed Tileset Character Data: normalize subpages and titles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Data blocks storing compressed raw graphics for map tilesets. Data for a given map tileset is found using the Tileset Pointer Table.

Blocks

Block 1

Map Data: Compressed Tileset Character Data, Block 1
Game EarthBound
Start Address 0x19D052
End Address 0x19FE17
# of Entries 1
Entry Length Varies, 28673 bytes (0x7001) after decompression
Total Length 11718 bytes (0x2dc6), 28673 bytes (0x7001) after decompression
Back to the ROM map
Address Tileset name Tileset index Compressed length
0x19D052 Caves 1 13 11718 bytes (0x2dc6)

Block 2

Map Data: Compressed Tileset Character Data, Block 2
Game EarthBound
Start Address 0x1CB223
End Address 0x1CD836
# of Entries 1
Entry Length Varies, 28673 bytes (0x7001) after decompression
Total Length 9748 bytes (0x2614), 28673 bytes (0x7001) after decompression
Back to the ROM map
Address Tileset name Tileset index Compressed length
0x1CB223 Indoors 3 14 9748 bytes (0x2614)

Block 3

Map Data: Compressed Tileset Character Data, Block 3
Game EarthBound
Start Address 0x1D0200
End Address 0x1E00CD
# of Entries 6
Entry Length Varies, 28673 bytes (0x7001) after decompression
Total Length 65230 bytes (0xFECE), 172038 bytes (0x02A006) after decompression
Back to the ROM map
Address Tileset name Tileset index Compressed length
0x1D0200 Lost Underworld 00 12948 bytes (0x3294)
0x1d3494 Onett 01 11395 bytes (0x2C83)
0x1d6117 Dalaam 09 10891 bytes (0x2A8B)
0x1d8ba2 Threed 03 11823 bytes (0x2E2F)
0x1db9d1 Fourside 04 10090 bytes (0x276A)
0x1de13b Magicant 05 8083 bytes (0x1F93)

Block 4

Map Data: Compressed Tileset Character Data, Block 4
Game EarthBound
Start Address 0x1E0200
End Address 0x1EF2E6
# of Entries 6
Entry Length Varies, 28673 bytes (0x7001) after decompression
Total Length 61671 bytes (0xF0E7), 172038 bytes (0x02A006) after decompression
Back to the ROM map
Address Tileset name Tileset index Compressed length
0x1E0200 Outdoors 06 13001 bytes (0x32C9)
0x1e34c9 Summers 07 8566 bytes (0x2176)
0x1e563f Dusty Dunes Desert 08 8255 bytes (0x203F)
0x1e767e Twoson 02 11395 bytes (0x2C83)
0x1ea301 Indoors 1 10 11577 bytes (0x2D39)
0x1ed03a Indoors 2 11 8877 bytes (0x22AD)

Block 5

Map Data: Compressed Tileset Character Data, Block 5
Game EarthBound
Start Address 0x1F0200
End Address 0x1FC442
# of Entries 6
Entry Length Varies, 28673 bytes (0x7001) after decompression
Total Length 49731 bytes (0xC243), 172038 bytes (0x02A006) after decompression
Back to the ROM map
Address Tileset name Tileset index Compressed length
0x1F0200 Stores 1 12 10552 bytes (0x2938)
0x1f2b38 Indoors 4 16 10226 bytes (0x27F2)
0x1f532a Winters 17 6846 bytes (0x1ABE)
0x1f6de8 Scaraba 18 5539 bytes (0x15A3)
0x1f838b Caves 2 19 7628 bytes (0x1DCC)
0x1fa157 Stores 2 15 8940 bytes (0x22EC)

Format

Data for each map tileset is individually compressed. See Compression Format.

Decompressed Format

Each entry, once decompressed, consists of 896 tileset characters, each a 4-bits-per-pixel 8x8 SNES graphics tile (sometimes referred to as a "minitile" by EarthBound modders). Each entry ends with a single null byte (0x00). At 32 bytes per character plus the final null byte, each entry is a total of 28673 bytes (0x7001) after decompression.

The first 512 characters represent background tiles that will be loaded into SNES background layer 1 (BG1) and appear behind sprites. The remaining 384 characters represent foreground tiles that will be loaded into SNES background layer 2 (BG2) with the BG priority bit set and may appear in front of sprites, depending on the collision flags of the tile the sprite entity is positioned on. The characters at indices 000 and 512 (the first background tile and the first foreground tile) are always completely transparent.

EarthBound ROM tilemap data does not specify the background vs foreground tiles separately. Instead, character indices are always specified between [000, 512) to specify both tiles jointly. If a tilemap specifies a character with index less than 384, both background and forground tiles are loaded using that index into the respective sections of the tileset characters, and the foreground tile is loaded with the BG priority bit set. If a tilemap specifies a character index greater than or equal to 384 only a background tile will be loaded. (Technically, for an index greater than or equal to 384, EarthBound will still load a character into BG2 using character index 000 from the foreground section of tileset characters (overall character index 512), which is always completely transparent, and will additionally not set the BG priority bit, thus rendering that BG2 character behind BG1 and behind any sprites.)