The current URL is datacrystal.tcrf.net.
EarthBound/Map Data/Tile Animation Properties Table: Difference between revisions
mNo edit summary |
(Add a note about (lack of) limitations on animation destination addresses.) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox table|name=Map Data: Tile Animation Properties Table | |||
{{Infobox table|name= | |||
|game=EarthBound | |game=EarthBound | ||
|loc=ROM | |loc=ROM | ||
|start=0x2F146B | |start=<tt>0x2F146B</tt> | ||
|end=0x2F153E | |end=<tt>0x2F153E</tt> | ||
|numentries=20 | |numentries=20 | ||
|entrylength= | |entrylength=Varies | ||
|totallength=211 bytes (0xD3) | |totallength=211 bytes (<tt>0xD3</tt>) | ||
}} | }} | ||
The ''' | 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 [[EarthBound:Map_Data:Tile_Animation_Properties_Pointer_Table|Tile Animation Properties Pointer Table]]. | ||
==Format== | |||
===Num Subentries=== | |||
{{table el||len=1 byte|loc=<tt>0x00</tt>|valrange=0-8 (<tt>0x00-0x08</tt>)|}} | |||
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 [[EarthBound:Map_Tile_Animation_Data|Map Tile Animation Data]]), but no tileset seems to use more than 6. | |||
===Subentry Format=== | |||
====Num Animation Cycles==== | |||
{{table el||len=1 byte|loc=<tt>0x00</tt>|valrange=1-255 (<tt>0x01-0xFF</tt>)|}} | |||
The number of different animation frames that the animation will cycle through. | |||
====Frame Delay==== | |||
{{table el||len=1 byte|loc=<tt>0x01</tt>|valrange=<tt>0x01-0xFF</tt> (~0.017s to ~4.25s)|}} | |||
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 <code>delay_in_seconds = frame_delay / 60</code>. | |||
====Transfer Size<span class="anchor" id="Transfer_Size"></span>==== | |||
{{table el||len=2 bytes|loc=<tt>0x02</tt>|valrange=<tt>0x0000-0x2000</tt> (0-256 tile characters)|}} | |||
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 <tt>0x2000</tt> bytes in the silly scenario where the animation consists of a single animation cycle using all available tile characters. | |||
====Initial Transfer Source Offset==== | |||
{{table el||len=2 bytes|loc=<tt>0x04</tt>|valrange=<tt>0x0000-0x1FE0</tt>|}} | |||
Byte offset into the decompressed map animation tile characters stored at <tt>$7EC000-$7EDFFF</tt> to use for the transfer source for the first animation cycle. On each cycle, the source offset will be incremented by [[#Transfer_Size|Transfer Size]] (and reset after cycling through all animation frames). | |||
= | ====Transfer Destination Address==== | ||
{{table el||len=2 bytes|loc=<tt>0x06</tt>|valrange=<tt>0x0000-0x37F0</tt>|}} | |||
VRAM word address of the first tile character to be replaced on each animation cycle. Map tile characters occupy addresses <tt>$0000-$37FF</tt> (word addresses) of VRAM. | |||
''Note: Technically, the destination address could point outside the tile characters portion of VRAM to allow replacing/animating anything stored in VRAM. Nothing checks that tile animation is only used to replace/animate tile character data. But it would be difficult to make work for anything else because nothing else stays loaded into a dedicated portion of VRAM for the entire time the tileset is loaded with its animations running. E.g., it would be difficult to animate a certain place on the tilemap because tilemap entries are loaded and replaced as the player moves around the map.'' | |||
= | ==Entries== | ||
{| border=1 cellspacing=0 cellpadding=3 | |||
! Entry start !! Tileset name !! Tileset index !! Num animation subentries | |||
|- | |||
| <tt>0x2F146B</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#LostUnderworld|Lost Underworld]] || <tt>00</tt> || 5 | |||
|- | |||
| <tt>0x2F1494</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Onett|Onett]] || <tt>01</tt> || 2 | |||
|- | |||
| <tt>0x2F14A5</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Twoson|Twoson]] || <tt>02</tt> || 0 | |||
|- | |||
| <tt>0x2F14A6</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Threed|Threed]] || <tt>03</tt> || 0 | |||
|- | |||
| <tt>0x2F14A7</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Fourside|Fourside]] || <tt>04</tt> || 0 | |||
|- | |||
| <tt>0x2F14A8</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Magicant|Magicant]] || <tt>05</tt> || 1 | |||
|- | |||
| <tt>0x2F14B1</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Outdoors|Outdoors]] || <tt>06</tt> || 2 | |||
|- | |||
| <tt>0x2F14C2</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Summers|Summers]] || <tt>07</tt> || 2 | |||
|- | |||
| <tt>0x2F14D3</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#DustyDunes|Dusty Dunes Desert]] || <tt>08</tt> || 1 | |||
|- | |||
| <tt>0x2F14DC</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Dalaam|Dalaam]] || <tt>09</tt> || 0 | |||
|- | |||
| <tt>0x2F14DD</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors1|Indoors 1]] || <tt>10</tt> || 0 | |||
|- | |||
| <tt>0x2F14DE</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors2|Indoors 2]] || <tt>11</tt> || 0 | |||
|- | |||
| <tt>0x2F14DF</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Stores1|Stores 1]] || <tt>12</tt> || 1 | |||
|- | |||
| <tt>0x2F14E8</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Caves1|Caves 1]] || <tt>13</tt> || 1 | |||
|- | |||
| <tt>0x2F14F1</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors3|Indoors 3]] || <tt>14</tt> || 0 | |||
|- | |||
| <tt>0x2F14F2</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Stores2|Stores 2]] || <tt>15</tt> || 0 | |||
|- | |||
| <tt>0x2F14F3</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Indoors4|Indoors 4]] || <tt>16</tt> || 6 | |||
|- | |||
| <tt>0x2F1524</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Winters|Winters]] || <tt>17</tt> || 1 | |||
|- | |||
| <tt>0x2F152D</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Scaraba|Scaraba]] || <tt>18</tt> || 1 | |||
|- | |||
| <tt>0x2F1536</tt> || [[EarthBound:Map_Data:Global_Tileset/Palette_Table#Caves2|Caves 2]] || <tt>19</tt> || 1 | |||
|} | |||
''Note: All entries are in order by tileset index, but because EarthBound always accesses the entries by pointer, there is no known reason why they would need to be in any particular order.'' | |||
=External Links= | ==External Links== | ||
*[http://pkhack.fobby.net/misc/txt/tileset_anim.txt Tile Animation Properties Table Documentation] | *[http://pkhack.fobby.net/misc/txt/tileset_anim.txt Tile Animation Properties Table Documentation] | ||
Line 40: | Line 100: | ||
*[http://pkhack.fobby.net/misc/txt/2F146Bdump.txt Dump of this Table] | *[http://pkhack.fobby.net/misc/txt/2F146Bdump.txt Dump of this Table] | ||
[[Category:EarthBound:Map_Data| | [[Category:EarthBound:Map_Data|Tile Animation Properties Table]] |
Latest revision as of 06:08, 11 May 2024
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
- Length: 1 byte
- Offset within entry: 0x00
- Range of values: 0-8 (0x00-0x08)
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
- Length: 1 byte
- Offset within entry: 0x00
- Range of values: 1-255 (0x01-0xFF)
The number of different animation frames that the animation will cycle through.
Frame Delay
- Length: 1 byte
- Offset within entry: 0x01
- Range of values: 0x01-0xFF (~0.017s to ~4.25s)
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
- Length: 2 bytes
- Offset within entry: 0x02
- Range of values: 0x0000-0x2000 (0-256 tile characters)
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
- Length: 2 bytes
- Offset within entry: 0x04
- Range of values: 0x0000-0x1FE0
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
- Length: 2 bytes
- Offset within entry: 0x06
- Range of values: 0x0000-0x37F0
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.
Note: Technically, the destination address could point outside the tile characters portion of VRAM to allow replacing/animating anything stored in VRAM. Nothing checks that tile animation is only used to replace/animate tile character data. But it would be difficult to make work for anything else because nothing else stays loaded into a dedicated portion of VRAM for the entire time the tileset is loaded with its animations running. E.g., it would be difficult to animate a certain place on the tilemap because tilemap entries are loaded and replaced as the player moves around the map.
Entries
Entry start | Tileset name | Tileset index | Num animation subentries |
---|---|---|---|
0x2F146B | Lost Underworld | 00 | 5 |
0x2F1494 | Onett | 01 | 2 |
0x2F14A5 | Twoson | 02 | 0 |
0x2F14A6 | Threed | 03 | 0 |
0x2F14A7 | Fourside | 04 | 0 |
0x2F14A8 | Magicant | 05 | 1 |
0x2F14B1 | Outdoors | 06 | 2 |
0x2F14C2 | Summers | 07 | 2 |
0x2F14D3 | Dusty Dunes Desert | 08 | 1 |
0x2F14DC | Dalaam | 09 | 0 |
0x2F14DD | Indoors 1 | 10 | 0 |
0x2F14DE | Indoors 2 | 11 | 0 |
0x2F14DF | Stores 1 | 12 | 1 |
0x2F14E8 | Caves 1 | 13 | 1 |
0x2F14F1 | Indoors 3 | 14 | 0 |
0x2F14F2 | Stores 2 | 15 | 0 |
0x2F14F3 | Indoors 4 | 16 | 6 |
0x2F1524 | Winters | 17 | 1 |
0x2F152D | Scaraba | 18 | 1 |
0x2F1536 | Caves 2 | 19 | 1 |
Note: All entries are in order by tileset index, but because EarthBound always accesses the entries by pointer, there is no known reason why they would need to be in any particular order.