CHARACTER FILE STRUCT DOCUMENTATION - Main character file/definition struct - this appears to be the main struct used to define a character size 0x74 note: 0x24 contains 0x0000D320 for mario, which is the size of all of his files added together (including shared files) offset short description extra notes 0x00 file id (attribute file) This file loads all of the others via req tables. It may be considered the primary character file. 0x04 file id (primary moveset data file) The character's primary moveset data file. 0x08 file id (secondary moveset data file) MetalM, GiantDK and Polygons use this for their parent moveset file. Only MetalM has a primary file as well. 0x0C file id (character/model file) The file containing the character model and stock icons. 0x10 file id (unknown) 0x12A for Mario. This is Mario's only file I don't have an understanding of. 0x14 file id (projectile data) Usually contains the hitbox data for the character's projectile(s?) 0x18 file id (entry animation) Usually contains special models for entry animations, may also contain unique graphics (falcon kick) 0x1C file id (special graphic) Usually contains display lists/textures for unique graphics (projectiles, falcon punch, etc.) 0x20 file id (special graphic 2) Only used by Fox. Contains display list/vertex data for his laser projectile. 0x24 character segment size Updates on character load. Total size of all character files, most likely used for memory allocation. 0x28 attribute file pointer address Defines the address of a dynamic pointer to the file id in 0x00(this struct) 0x2C primary moveset data file pointer address Defines the address of a dynamic pointer to the file id in 0x04(this struct) 0x30 secondary moveset data file pointer address Defines the address of a dynamic pointer to the file id in 0x08(this struct) 0x34 character/model file pointer address Defines the address of a dynamic pointer to the file id in 0x0C(this struct) 0x38 unknown file pointer Updates on character load. Dynamic pointer to the unknown file in 0x10(this struct) 0x3C projectile data file pointer address Defines the address of a dynamic pointer to the file id in 0x14(this struct) 0x40 entry animation file pointer address Defines the address of a dynamic pointer to the file id in 0x18(this struct) 0x44 special graphic 1 file pointer address Defines the address of a dynamic pointer to the file id in 0x1C(this struct) 0x48 special graphic 2 file pointer address Defines the address of a dynamic pointer to the file id in 0x20(this struct) 0x4C unknown value address Defines the address of the return value of subroutines 801159F8 and 801159B0. Used by Yoshi, Kirby, Ness 0x50 unknown argument Argument(a0) passed to subroutines 801159F8 and 801159B0. These subroutines are only called when 0x50(this struct) != 0. 0x54 unknown argument (1/3) 0x54 - 0x5C are arguments(a1,a2,a3) passed to subroutine 801159F8 when 0x50 != 0. 0x58 unknown argument (2/3) The value at the address defined by 0x4C(this struct) is used by Yoshi's up special egg when it explodes (hard coded lw) 0x5C unknown argument (3/3) It's used by kirby when he transforms to/from his rock state (hard coded lw). Not sure how Ness uses it. 0x60 attribute offset Offset of the character's attributes within the attribute file. 0x64 action parameter array (aka attack table) Address of the primary action parameter struct array. Action struct formats are detailed at the bottom of this document. 0x68 secondary action parameter array Address of the secondary action parameter struct array. Used outside of matches (character select, results screen, etc.) 0x6C parimary action parameter array length Length of the primary action parameter array (multiply by 0xC). 0x70 secondary action parameter array length address? Points to the end of the secondary action parameter array. Seems to contain the length of the array. 0x74 animation segment size Updates on character load. Size of the largest animation file in the action parameter array. Used for memory allocation. the end of this struct is padded to nearest 0x10 CHARACTER FILE STRUCT TABLE - Table of pointers to character file structs - HARD CODED, this table should not be moved size: 0x6C rom: 0x92610 address: 0x80116E10 offset value rom character 0x00 80117810 0x93010 mario 0x04 801196F4 0x94EF4 fox 0x08 8011AC8C 0x9648C donkey kong 0x0C 8011CC78 0x98478 samus 0x10 8011E0A0 0x998A0 luigi 0x14 8011F520 0x9AD20 link 0x18 801209D0 0x9C1D0 yoshi 0x1C 80121E98 0x9D698 c. falcon 0x20 80123680 0x9EE80 kirby 0x24 80124CE4 0xA04E4 pikachu 0x28 8012617C 0xA197C jigglypuff 0x2C 801276A0 0xA2EA0 ness 0x30 80128C7C 0xA447C master hand 0x34 80118220 0x93A20 metal mario 0x38 80118C30 0x94430 polygon mario 0x3C 8011A1B4 0x959B4 polygon fox 0x40 8011B76C 0x96F6C polygon donkey kong 0x44 8011D698 0x98E98 polygon samus 0x48 8011EAB0 0x9A2B0 polygon luigi 0x4C 8011FF90 0x9B790 polygon link 0x50 80121410 0x9CC10 polygon yoshi 0x54 80122918 0x9E118 polygon falcon 0x58 8012427C 0x9FA7C polygon kirby 0x5C 8012572C 0xA0F2C polygon pikachu 0x60 80126BCC 0xA23CC polygon jigglypuff 0x64 80128170 0xA3970 polygon ness 0x68 8011C24C 0x97A4C giant donkey kong CHARACTER ASSEMBLY DOCUMENTATION - Special move starting subroutines - When starting a special move an asm subroutine is loaded from a table of subroutine addresses. The offset is calculated by multiplying the character id by 4 and then added to the table address. The table addresses are hard coded into asm functions, noted below. These subroutines run once at the start of the special move and are responsible for setting the character's action, as well as other general setup like initializing any variables used by the action. All of these tables use the same character id based format, so I've included a single reference table at the bottom of this section. kirby copied aerial neutral special asm 0x80150EDC table rom 0x103490 table address 0x80188A50 (refer to reference table) aerial neutral special asm 0x80151024 table rom 0x1034FC table address 0x80188ABC (refer to reference table) aerial up special asm 0x80150F74 table rom 0x103568 table address 0x80188B28 (refer to reference table) aerial down special asm 0x80150FB8 table rom 0x1035D4 table address 0x80188B94 (refer to reference table) kirby copied aerial neutral special asm 0x8015106C table rom 0x103640 table address 0x80188C00 (refer to reference table) ground neutral special asm 0x80151120 table rom 0x1036AC table address 0x80188C6C (refer to reference table) ground up special asm 0x801511A4 table rom 0x103720 table address 0x80188CE0 (refer to reference table) ground down special asm 0x80151228 table rom 0x103790 table address 0x80188D50 (refer to reference table) - Unique action behavior array table - If the character begins an action with a value higher than 0xDC (asm check @ 0x800E73C0), they will redirected via the unique action behavior array table. This is a table of pointers to each character's unique action behavior array. The unique action behavior array contains action behaviour structs starting with action 0xDC. All actions beyond 0xDC are character specific (e.g. specials, third jab, dk cargo hold). Shared actions like normal attacks are loaded from a shared action behavior array at 0x80128DD8, rom 0x145D8 (this array contains behaviour structs for actions 0x00 - 0xDB). http://opensa.dantarion.com/wiki/Actions_(64) action IDS are somewhat documented on this page unique action array table asm 0x800E73D0 table rom 0xA6F40 table address 0x8012B740 (refer to reference table) reference table size: 0x6C id offset character 0x00 0x00 mario 0x01 0x04 fox 0x02 0x08 donkey kong 0x03 0x0C samus 0x04 0x10 luigi 0x05 0x14 link 0x06 0x18 yoshi 0x07 0x1C c. falcon 0x08 0x20 kirby 0x09 0x24 pikachu 0x0A 0x28 jigglypuff 0x0B 0x2C ness 0x0C 0x30 master hand 0x0D 0x34 metal mario 0x0E 0x38 polygon mario 0x0F 0x3C polygon fox 0x10 0x40 polygon donkey kong 0x11 0x44 polygon samus 0x12 0x48 polygon luigi 0x13 0x4C polygon link 0x14 0x50 polygon yoshi 0x15 0x54 polygon falcon 0x16 0x58 polygon kirby 0x17 0x5C polygon pikachu 0x18 0x60 polygon jigglypuff 0x19 0x64 polygon ness 0x1A 0x68 giant donkey kong ACTION STRUCT DOCUMENTATION These are the structs used to define character actions. The "action behaviour struct" is the primary struct. -it us used to define the basic behaviours for an action, like physics and collision it is also defines which "action parameter struct" will be used The "action parameter struct" is a secondary struct referenced by the behaviour struct. it is used to define which animation file the action loads it also defines the starting address of a moveset command list - action parameter struct (primary array, used for matches) - offset value description 0x0 0000XXXX animation file id 0x4 YYYYYYYY moveset command list offset (in moveset file) 0x80000000 = disabled 0x8 ZZZZZZZZ animation/other flags (still not fully understood) - action parameter struct (secondary array, used outside of matches) - offset value description 0x0 0000XXXX animation file id 0x4 YYYYYYYY pointer to moveset command list 0x80000000 = disabled 0x8 ZZZZZZZZ animation/other flags (still not fully understood) some more info on animation/other flags setting the top byte to 0x40 = translate character using top joint & update x/y/z position setting the type byte to 0x80 = translate character using top joint, don't update position setting the bottom byte to 0x10 = read from secondary moveset file - action behavior struct - offset value description 0x00 XXXXYYYY XXXX = OOOO OOOO OOSS SSSS (binary) O = offset of action parameter struct ((offset * 12) + primary parameter array)) S = staling ID (used to determine stale moves, actions which share this id will share staling) YYYY = currently unknown (seems to have many uses, should be able to just copy values for cloned actions) 0x04 AAAAAAAA ASM subroutine. Seemingly main subroutine. Determines what action is transitioned into when the animation ends. 0x08 BBBBBBBB ASM subroutine. Usually determines interruptibility but has other uses too. Often goes unused. 0x0C CCCCCCCC ASM subroutine. Usually applies physics like gravity, and determines whether player input is allowed to influence physics (e.g. moving left/right in air). 0x10 DDDDDDDD ASM subroutine. Usually determines what happens when the character collides with floors/walls/ceilings or moves off of floors.