EarthBound/Map Data/Tile Animation Properties Table

From Data Crystal
< EarthBound
Revision as of 05:54, 24 December 2023 by Esorth (talk | contribs) (→‎Num Subentries: Clarify max num subentries)
Jump to navigation Jump to search

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

Map Data: Tile Animation Properties Table
Game EarthBound
Start Address 0x2F146B
End Address 0x2F153E
# of Entries 20
Entry Length Varies
Total Length 211 bytes (0xD3)
Back to the ROM map

The Tile Animation Properties Table contains metadata properties controlling the animation of map tiles for a given tileset. The entry for a given tileset is found using a lookup to the Tile Animation Properties Pointer Table.

Format

Num Subentries

Each entry begins with a single byte to specify the number of subentries to follow, representing different tile animations that will run concurrently for the tileset. EarthBound allocates space to load up to 8 concurrent animations to RAM (in the Map Tile Animation Data), but no tileset seems to use more than 6.

Subentry Format

Num Animation Cycles

The number of different animation frames that the animation will cycle through.

Frame Delay

Number of game frames to hold each animation frame before cycling to the next. As an NTSC SNES runs at approximately 60 FPS, this means the time delay can be calculated as delay_in_seconds = frame_delay / 60.

Transfer Size

Size in bytes of the tile characters to be replaced on each animation cycle. As EarthBound allocates space for up to 256 decompressed tile characters for animation, each 32 bytes, that gives a maximum transfer size of 0x2000 bytes in the silly scenario where the animation consists of a single animation cycle using all available tile characters.

Initial Transfer Source Offset

Byte offset into the decompressed map animation tile characters stored at $7EC000-$7EDFFF to use for the transfer source for the first animation cycle. On each cycle, the source offset will be incremented by Transfer Size (and reset after cycling through all animation frames).

Transfer Destination Address

VRAM word address of the first tile character to be replaced on each animation cycle. Map tile characters occupy addresses $0000-$37FF (word addresses) of VRAM.

External Links