Line 75: |
Line 75: |
| | | |
| 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). | | 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). |
| + | |
| + | The 0xEB0-byte controldata struct has the following structure (all addrs/data are from the emulator user-process): |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 || 0x8 || Data addr: g_pGPR |
| + | |- |
| + | | 0x8 || 0x8 || Data addr: g_pFPR |
| + | |- |
| + | | 0x10 || 0x8 || Data addr: g_pCP0 |
| + | |- |
| + | | 0x18 || 0x8 || Data addr: g_nRegHi |
| + | |- |
| + | | 0x20 || 0x8 || Data addr: g_nRegLo |
| + | |- |
| + | | 0x28 || 0x8 || Data addr. |
| + | |- |
| + | | 0x30 || 0x8 || Data addr: g_nFCSR |
| + | |- |
| + | | 0x38 || 0x8 || Data addr: g_bN64CpuCmpEndCheck |
| + | |- |
| + | | 0x40 || 0x8 || Data addr: g_nN64CpuPC |
| + | |- |
| + | | 0x48 || 0x8 || Data addr: g_nN64CpuJmpPC |
| + | |- |
| + | | 0x50 || 0x8 || Data addr. |
| + | |- |
| + | | 0x58 || 0x8 || Data addr: g_nN64CpuHaveExp |
| + | |- |
| + | | 0x60 || 0x658 || Array of funcptrs. |
| + | |- |
| + | | 0x6B8 || 0x8 || Funcptr: <code>n64CPUProcInstCOP1Check()</code> |
| + | |- |
| + | | 0x6C0 || 0x8 || Funcptr. |
| + | |- |
| + | | 0x6C8 || 0x8 || Funcptr. |
| + | |- |
| + | | 0x6D0 || 0x8 || Funcptr: <code>n64CPUSetRegisterCP0(int, unsigned int)</code> |
| + | |- |
| + | | 0x6D8 || 0x8 || Funcptr: <code>n64CPUGetRegisterCP0(int)</code> |
| + | |- |
| + | | 0x6E0 || 0x20 || Funcptrs for reading data: <code>n64MemDefaultRead{bitsize}(unsigned int)</code>, where bitsize is {8, 16, 32, 64} (32 uses <code>n64MemDefaultRead32WithDestLog</code>). |
| + | |- |
| + | | 0x700 || 0x20 || Funcptrs for reading Special data: <code>n64MemDefaultReadSpecial{bitsize}(unsigned int)</code>, where bitsize is {8, 16, 32, 64}. |
| + | |- |
| + | | 0x720 || 0x20 || Funcptrs for writing data: <code>n64MemDefaultWrite{bitsize}(unsigned int, ...)</code>, where bitsize is {8, 16, 32, 64} (32 uses <code>n64MemDefaultWrite32WithDestLog</code>). |
| + | |- |
| + | | 0x740 || 0x20 || Funcptrs for reading data via the WithDestLog version: <code>n64MemDefaultRead{bitsize}WithDestLog(unsigned int)</code>, where bitsize is {8, 16, 32, 64}. |
| + | |- |
| + | | 0x760 || 0x20 || Funcptrs for writing data via the WithDestLog version: <code>n64MemDefaultWrite{bitsize}WithDestLog(unsigned int, ...)</code>, where bitsize is {8, 16, 32, 64}. |
| + | |- |
| + | | 0x780 || 0x8 || Funcptr: <code>n64CPU_CallLuaAfterInst(unsigned int, unsigned int)</code> |
| + | |- |
| + | | 0x788 || 0x8 || Funcptr: <code>n64CPU_CallLuaBeforeInst(unsigned int, unsigned int)</code> |
| + | |- |
| + | | 0x790 || 0x8 || Funcptr. |
| + | |- |
| + | | 0x798 || 0x4 || Array count for the the following array. |
| + | |- |
| + | | 0x79C || 0x180 || Array data with the above count, each entry is 0xC-bytes. |
| + | |- |
| + | | 0x91C || 0x4 || Array count for the the following array. |
| + | |- |
| + | | 0x920 || 0x500 || Array data with the above count, each entry is 0x14-bytes. |
| + | |- |
| + | | 0xE20 || 0x4 || Array count for the the following array. |
| + | |- |
| + | | 0xE24 || 0x8 || Array data with the above count, each entry is 0x8-bytes. |
| + | |- |
| + | | 0xEA4 || 0x4 || Set to 0 by default, then if available the emulator sets bit flags here depending on the content of the config for <code>"Cmp", "g_nN64CpuCmpTLBCheckLevel"</code>. |
| + | |- |
| + | | 0xEA8 || 0x4 || Set to 0 by default by the emulator. With config <code>"Cmp", "CodeMultiAddr"</code> this is set to 1, and with config <code>"Cmp", "BlockDynamicPC"</code> this is set to 2. The plugin only checks whether this ==2 or !=2, so values 0-1 are basically the same. |
| + | |- |
| + | | 0xEAC || 0x4 || Padding |
| + | |} |
| | | |
| = SuperMarioSunshine = | | = SuperMarioSunshine = |