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 Data/Palette Animation Secondary Pointer/Data Table: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(A full write up of what I know about the Palette Animation Secondary Pointer/Data Table, which is one of the more bizarre things I've seen in the EB ROM.)
 
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{subpage|game=EarthBound:ROM map}}
{{Infobox table|name=Map Data:Palette Animation Secondary Pointer/Data Table
{{Infobox table|name=Map Data:Palette Animation Secondary Pointer/Data Table
|game=EarthBound
|game=EarthBound
Line 7: Line 9:
|entrylength=5 bytes(0x5) to 13 bytes(0xD)
|entrylength=5 bytes(0x5) to 13 bytes(0xD)
|totallength=190 bytes (0xBE)
|totallength=190 bytes (0xBE)
}}Points to locations on the [[EarthBound:Map Data:Palette Animation Table]].
}}
 
Points to compressed map palette animation data (in the [[EarthBound:Map Data:Compressed Palette Animation Data|Compressed Palette Animation Data]]) and also contains metadata about the palette animations. Entries are found by first doing a lookup by [[EarthBound:Map_Data:Palettes#PaletteAnimationIndex|Palette Animation Index]] in the [[EarthBound:Map_Data:Palette_Animation_Pointer_Table|Palette Animation Pointer Table]].
{{clear}}
{{clear}}


=Format=
==Format==
 
===Data Pointer===
{{table el||len=4 bytes(<tt>0x4</tt>)|loc=<tt>0x00</tt>|valrange=<tt>0x00000000-0x00FFFFFF</tt> (long pointer)}}
 
Long pointer to the start of the compressed map palette animation data. In unmodified EarthBound, this will point into [[EarthBound:Map Data:Compressed Palette Animation Data|Compressed Palette Animation Data]].
 
===Number of Palettes<span class="anchor" id="NumberOfPalettes"></span>===
{{table el||len=1 byte(<tt>0x1</tt>)|loc=<tt>0x04</tt>|valrange=<tt>0x00-0x08</tt>}}
 
Number of palettes in the decompressed animation data. EarthBound will not attempt to decompress the animation data if this value is zero.
 
Also number of bytes used for the following variable-length data. Can be up to 8 or it will overfill the buffer set aside to load the data.
 
===Number of Frames per Palette===
{{table el||len=varies|loc=<tt>0x05</tt>|valrange=<tt>0x01-0xff</tt>}}
 
For each animation palette, one byte to represent the number of frames that palette will be active before cycling to the next.
 
==Entries==
There are 9 different entries, but the 9th gets used 23 times.  The 9th entry is just a pointer, which seems to be pointing at the
There are 9 different entries, but the 9th gets used 23 times.  The 9th entry is just a pointer, which seems to be pointing at the
Audio block at 0x1FEE46.  The other 8 entries have pointers to the Palette Animation Table, but are also followed by a line of code
Audio block at 0x1FEE46.  The other 8 entries have pointers to the Palette Animation Table, but are also followed by a line of code
of different lengths.  The 9th entry has 00(NULL) included after the pointer.
of different lengths.  The 9th entry has 00(NULL) included after the pointer.


==Entry 1(0x1FE75D to 0x1FE765)==
===Entry 1(0x1FE75D to 0x1FE765)===
{{table el||len=9 bytes(0x9)|loc=0x00|valrange=0x00-0xFF|}}
{{table el||len=9 bytes(0x9)|loc=0x00|valrange=0x00-0xFF|}}
  1b e6 df 00 Pointer  04 0a 0a 0a 0a            Code
  1b e6 df 00 Pointer  04 0a 0a 0a 0a            Code


==Entry 2(0x1FE766 to 0x1FE76E)==
===Entry 2(0x1FE766 to 0x1FE76E)===
{{table el||len=9 bytes(0x9)|loc=0x0A|valrange=0x00-0xFF|}}
{{table el||len=9 bytes(0x9)|loc=0x0A|valrange=0x00-0xFF|}}
  b2 e6 df 00 Pointer  04 0f 0f 0f 0f            Code
  b2 e6 df 00 Pointer  04 0f 0f 0f 0f            Code


==Entry 3(0x1FE76F to 0x1FE779)==
===Entry 3(0x1FE76F to 0x1FE779)===
{{table el||len=11 bytes(0xB)|loc=0x13|valrange=0x00-0xFF|}}
{{table el||len=11 bytes(0xB)|loc=0x13|valrange=0x00-0xFF|}}
  3d e7 df 00 Pointer  06 14 14 14 14 14 14      Code
  3d e7 df 00 Pointer  06 14 14 14 14 14 14      Code


==Entry 4(0x1FE77A to 0x1FE781)==
===Entry 4(0x1FE77A to 0x1FE781)===
{{table el||len=8 bytes(0x9)|loc=0x00|valrange=0x00-0xFF|}}
{{table el||len=8 bytes(0x9)|loc=0x00|valrange=0x00-0xFF|}}
  e0 e8 df 00 Pointer  03 0f 0f 14                Code
  e0 e8 df 00 Pointer  03 0f 0f 14                Code


==Entry 5(0x1FE782 to 0x1FE78A)==
===Entry 5(0x1FE782 to 0x1FE78A)===
{{table el||len=9 bytes(0x9)|loc=0x00|valrange=0x00-0xFF|}}
{{table el||len=9 bytes(0x9)|loc=0x00|valrange=0x00-0xFF|}}
  6c e9 df 00 Pointer  04 0f 0f 0f 0f            Code
  6c e9 df 00 Pointer  04 0f 0f 0f 0f            Code


==Entry 6(0x1FE78B to 0x1FE792)==
===Entry 6(0x1FE78B to 0x1FE792)===
{{table el||len=8 bytes(0x8)|loc=0x00|valrange=0x00-0xFF|}}
{{table el||len=8 bytes(0x8)|loc=0x00|valrange=0x00-0xFF|}}
  56 ea df 00 Pointer  03 0f 0f 0f                Code
  56 ea df 00 Pointer  03 0f 0f 0f                Code


==Entry 7(0x1FE793 to 0x1FE79A)==
===Entry 7(0x1FE793 to 0x1FE79A)===
{{table el||len=8 bytes(0x8)|loc=0x00|valrange=0x00-0xFF|}}
{{table el||len=8 bytes(0x8)|loc=0x00|valrange=0x00-0xFF|}}
  31 eb df 00 Pointer  03 3c 08 08                Code
  31 eb df 00 Pointer  03 3c 08 08                Code


==Entry 8(0x1FE79B to 0x1FE7A7)==
===Entry 8(0x1FE79B to 0x1FE7A7)===
{{table el||len=9 bytes(0x9)|loc=0x00|valrange=0x00-0xFF|}}
{{table el||len=9 bytes(0x9)|loc=0x00|valrange=0x00-0xFF|}}
  ac eb df 00 Pointer  08 1e 0a 0a 0a 0a 0a 0a 0a Code
  ac eb df 00 Pointer  08 1e 0a 0a 0a 0a 0a 0a 0a Code


==Entry 9(0x1FE7A8 to 0x1FE81A)==
===Entry 9(0x1FE7A8 to 0x1FE81A)===
{{table el||len=5 bytes(0x5)|loc=0x00|valrange=0x00-0xFF|}}
{{table el||len=5 bytes(0x5)|loc=0x00|valrange=0x00-0xFF|}}
  46 ec df 00 Pointer  00                        Code
  46 ec df 00 Pointer  00                        Code


===A note about this pointer===
====A note about this pointer====
Rather than list the same pointer over and over, I've just listed it once.  Entries 9-31 of the [[EarthBound:Map Data:Palette Animation Pointer Table]] all point to 23 seperate entries on this table, but all 23 have the exact same 5 byte pointer to
Rather than list the same pointer over and over, it has just been listed here once.  Entries 9-31 of the [[EarthBound:Map Data:Palette Animation Pointer Table]] all point to 23 seperate entries on this table, but all 23 have the exact same 5 byte pointer to <tt>$dfec46</tt>. This pointer is unused because EarthBound will not attempt to load it when the number of palettes byte is zero.
0x1FE81B. I believe some of the following data isn't actually part of the Audio block following the [[EarthBound:Map Data:Palette Animation Table]].
 
===0x1FEE46 to 0x1FEE52===
This small area here is most likely the target of the 23 pointers.  But given the way all sections of the Palette Animation Table
have an FF terminator and FF interspersed in the blocks, it could be longer.
22 05 00 48 3e 48 1e 48 0e 48 2e 48 ff
 
===0x1FEE53 to ???===
This is the next location of the FF terminator, but the area could run past that.
00 04 48 00 00 4e 48 56 48 5e 48 74 48 96 48
9f 48 a7 48 00 00 c0 48 eb 48 f6 48 2b 49 57
49 63 49 73 49 00 00 8f 49 a5 49 ad 49 c3 49
d5 49 dc 49 e4 49 00 00 f1 49 10 4a 2d 4a 63
4a 74 4a 87 4a 9b 4a 00 00 ef a0 4a 01 60 c9
c9 00 ef c6 4a 01 ef d9 4a 02 18 2d 98 c9 18
0d ab c9 ef eb 4a 02 18 2d 98 c9 18 0d ab 18
2d 98 ed 6e 24 6d 89 0c 3d 89 30 6d 86 ef ff


[[Category:EarthBound:ROM map]]
[[Category:EarthBound:Map_Data|Palette Animation Secondary Pointer/Data Table]]

Latest revision as of 02:41, 24 January 2024

This is a sub-page of EarthBound/Map Data/Palette Animation Secondary Pointer.

Map Data:Palette Animation Secondary Pointer/Data Table
Game EarthBound
Start Address 0x1FE75D
End Address 0x1FE81A
# of Entries 31
Entry Length 5 bytes(0x5) to 13 bytes(0xD)
Total Length 190 bytes (0xBE)
Back to the ROM map

Points to compressed map palette animation data (in the Compressed Palette Animation Data) and also contains metadata about the palette animations. Entries are found by first doing a lookup by Palette Animation Index in the Palette Animation Pointer Table.

Format

Data Pointer

Long pointer to the start of the compressed map palette animation data. In unmodified EarthBound, this will point into Compressed Palette Animation Data.

Number of Palettes

Number of palettes in the decompressed animation data. EarthBound will not attempt to decompress the animation data if this value is zero.

Also number of bytes used for the following variable-length data. Can be up to 8 or it will overfill the buffer set aside to load the data.

Number of Frames per Palette

For each animation palette, one byte to represent the number of frames that palette will be active before cycling to the next.

Entries

There are 9 different entries, but the 9th gets used 23 times. The 9th entry is just a pointer, which seems to be pointing at the Audio block at 0x1FEE46. The other 8 entries have pointers to the Palette Animation Table, but are also followed by a line of code of different lengths. The 9th entry has 00(NULL) included after the pointer.

Entry 1(0x1FE75D to 0x1FE765)

1b e6 df 00 Pointer   04 0a 0a 0a 0a             Code

Entry 2(0x1FE766 to 0x1FE76E)

b2 e6 df 00 Pointer   04 0f 0f 0f 0f             Code

Entry 3(0x1FE76F to 0x1FE779)

3d e7 df 00 Pointer   06 14 14 14 14 14 14       Code

Entry 4(0x1FE77A to 0x1FE781)

e0 e8 df 00 Pointer   03 0f 0f 14                Code

Entry 5(0x1FE782 to 0x1FE78A)

6c e9 df 00 Pointer   04 0f 0f 0f 0f             Code

Entry 6(0x1FE78B to 0x1FE792)

56 ea df 00 Pointer   03 0f 0f 0f                Code

Entry 7(0x1FE793 to 0x1FE79A)

31 eb df 00 Pointer   03 3c 08 08                Code

Entry 8(0x1FE79B to 0x1FE7A7)

ac eb df 00 Pointer   08 1e 0a 0a 0a 0a 0a 0a 0a Code

Entry 9(0x1FE7A8 to 0x1FE81A)

46 ec df 00 Pointer   00                         Code

A note about this pointer

Rather than list the same pointer over and over, it has just been listed here once. Entries 9-31 of the EarthBound:Map Data:Palette Animation Pointer Table all point to 23 seperate entries on this table, but all 23 have the exact same 5 byte pointer to $dfec46. This pointer is unused because EarthBound will not attempt to load it when the number of palettes byte is zero.