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 Tile Animation Data

From Data Crystal
< EarthBound
Revision as of 22:54, 22 December 2023 by Esorth (talk | contribs) (Create page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is a sub-page of EarthBound.

Map Tile Animation Data
Game EarthBound
Start Address 0x7E43DC
End Address 0x7E445B
# of Entries up to 8
Entry Length 16 bytes(0x10)
Total Length 128 bytes (0x80)
Back to the RAM map

Stored/cached metadata concerning tile animation for the current map tileset.

Format

Tilesets may have a variable number of tile animation entries for concurrent animations. EarthBound allocates space for up to 8 entries, but no tileset seems to use more than 6.

Num Animation Cycles

The number of different animation frames that the animation will cycle through. As EarthBound allocates space for up to 256 decompressed tile characters for animation, that is the maximum number of cycles if only one tile character is replaced on each animation cycle.

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.

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.

Frames Until Cycle

Number of game frames remaining until the next animation cycle. EarthBound will decrement this each game frame, and on reaching zero, EarthBound will reset to Frame Delay (animation data offset 0x02) and initiate a transfer to VRAM to replace animated tile characters.

Current Animation Frame

Current animation frame number. EarthBound will increment this each animation cycle, and on reaching Num Animation Cycles (animation data offset 0x00), EarthBound will reset to zero and reset Current Transfer Source Offset (animation data offset 0x0E) to Initial Transfer Source Offset (animation data offset 0x06)

Current Transfer Source Offset

Byte offset into decompressed map animation tile characters stored at $7EC000-$7EDFFF to use for the transfer source for the next animation cycle. EarthBound will increment this by Transfer Size (animation data offset 0x04) after each animation cycle, and when Current Animation Frame (animation data offset 0x0C) reaches Num Animation Cycles (animation data offset 0x00), reset to Initial Transfer Source Offset (animation data offset 0x06).