Changes

Line 56: Line 56:  
*** "06_UNSMJ3.002.lua": This is the "ROMPATCH" Lua file referenced by the .meta.
 
*** "06_UNSMJ3.002.lua": This is the "ROMPATCH" Lua file referenced by the .meta.
 
*** "07_UNSMJ3.002.ppl": This is the "PIPELINE" file referenced by the .meta.
 
*** "07_UNSMJ3.002.ppl": This is the "PIPELINE" file referenced by the .meta.
 +
 +
== EmuSystemJITPlugin ==
 +
This section documents the [[JIT_services|JIT]] plugin.
 +
 +
First, [[JIT_services#Control|Control]] is used with a 0xEB0-byte struct for the InBuffer, and cmd in_u64=0. The OutBuffer is unused. This does initialization, and copies the input struct to workmem+0x0.
 +
 +
The u64 for [[JIT_services#GenerateCode|GenerateCode]] is the type: 1-4 are valid. Type1 is used first, then type2.
 +
 +
* Type1: Struct32 and InBuffer are unused. Generates the entry code which can be called for running the rest of the code in the CodeMemory. After the generated code finishes setup, it jumps to x0.
 +
* Type2: Struct32 and InBuffer are unused. Generates the code for returning from CodeMemory, which is used by the rest of the generated code.
 +
* Type3: ...
 +
* Type4: ...
 +
 +
0xC-bytes are copied to the OutBuffer with type1/type2, these come from workmem. These 3 u32s are left at all-zero, except for +0 which is the generated_code_size (which is then copied to the output CodeRange size).
    
= SuperMarioSunshine =
 
= SuperMarioSunshine =