User:Kevsprksky/Wii U Address Notes: Difference between revisions

Jump to navigation Jump to search
revise and add some more data
imported>Kevsprksky
(add some notes)
 
imported>Kevsprksky
(revise and add some more data)
Line 15: Line 15:


=== AI/Event System ===
=== AI/Event System ===
To map a symbol name string into a native function address, the game searches through a table composed of entries containing a CRC32 hash of the name and the function pointer.
As event flows are read, internal representations of the instructions are created. There are 4 tables in the binary mapping CRC32 hashes of a symbol's name to a function pointer. This function builds that memory structure.


Inside RootTask::calc, there are 4 calls to functions which register these tables.
Inside RootTask::calc, there are 4 calls to functions which register these tables.
Line 30: Line 30:
|-
|-
| 02b083ac || 101aaa38 || Queries
| 02b083ac || 101aaa38 || Queries
|}
Internal instruction structure (only checked for actions - not sure if used for other symbol types or not)
{| class="wikitable"
|-
! Offset !! Length !! Explanation
|-
| 0x00 || 0 || I think this is the target actor? For example, when EventSystemActor.Demo_PlayerWarp is called, this points to the "ActorData" structure representing EventSystemActor
|-
| 0x04 || 4 || I think this is the source actor (or null if N/A?).
|-
| 0x08 || 2 || This is set to (short)(the second 4 bytes pointed at by the second parameter to the build function). Not sure what it is yet.
|-
| 0x0A || 1 || This is set to (char)(the third 4 bytes pointed at by the third parameter to the build function). Not sure what it is yet.
|-
| 0x0B || 1 || Set to 0?
|-
| 0x0C || 4 || Pointer to the structure representing the symbol (we'll call it SymbolData)
|-
| 0x10 + X || ? || Parameter data (plus more??)
|}
SymbolData:
{| class="wikitable"
|-
! Offset !! Length !! Explanation
|-
| 0x54 || 4 || Pointer to the function to call for the given action IF it has no parameters? (Ex: AppearNumKorokNuts, DisappearNumKorokNuts)
|-
| 0x64 || 4 || Pointer to the function to call for the given action IF it does have parameters? (Ex: NPCTalk, PlayerWarp)
|}
|}


Anonymous user

Navigation menu