Changes

no edit summary
Line 12: Line 12:  
= Details =
 
= Details =
 
Like [[Super_Mario_3D_All-Stars#SuperMario64|SM3DAS]], this uses [[JIT_services|JIT]] for running the emulated executable. The game archives also contains an AOT NRO. A NRO does get loaded, however actual usage is currently not enabled. When the emu PC physical address is not located in DRAM (code prior to this will handle triggering a N64 exception if the PC vaddr is invalid), the code is interpreted instead of using JIT, with the code instruction being loaded with n64MemDefaultRead32 (handler funcptr is called from a table, mem-access with these use the non-WithDestLog funcs. TLB validation is done by those funcs before mem-access, triggering a N64 exception if needed). Patches are applied at runtime with the config/lua files from the game archives.
 
Like [[Super_Mario_3D_All-Stars#SuperMario64|SM3DAS]], this uses [[JIT_services|JIT]] for running the emulated executable. The game archives also contains an AOT NRO. A NRO does get loaded, however actual usage is currently not enabled. When the emu PC physical address is not located in DRAM (code prior to this will handle triggering a N64 exception if the PC vaddr is invalid), the code is interpreted instead of using JIT, with the code instruction being loaded with n64MemDefaultRead32 (handler funcptr is called from a table, mem-access with these use the non-WithDestLog funcs. TLB validation is done by those funcs before mem-access, triggering a N64 exception if needed). Patches are applied at runtime with the config/lua files from the game archives.
 +
 +
TLB validation for mem-access done by JIT'd code is only done if the corresponding flag in "g_nN64CpuCmpTLBCheckLevel" is set, see below. There are currently no games which set this config. Note that the various Read/Write funcs will do nothing if the specified address is invalid, with 0 being returned for the Read funcs.
    
A maximum of 0x1000-bytes are loaded from the [[Applet_Manager_services#PopLaunchParameter|launch-parameter]], with buf[read_size]=0. Hence, this is a string. When available, this seems to be used to select which game to launch.
 
A maximum of 0x1000-bytes are loaded from the [[Applet_Manager_services#PopLaunchParameter|launch-parameter]], with buf[read_size]=0. Hence, this is a string. When available, this seems to be used to select which game to launch.
Line 127: Line 129:  
Flags defaults to 0. If config for "NoRunTime" is value 1, flags bit0 is set.
 
Flags defaults to 0. If config for "NoRunTime" is value 1, flags bit0 is set.
 
|-
 
|-
| 0xDF8 || 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>.
+
| 0xDF8 || 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>. Each bit corresponds to a mem-access instruction, when handling an instruction with a bit set TLB validation is done by generating code which calls the funcptr at controldata+0x710.
 
|-
 
|-
 
| 0xDFC || 0x4 || Set to 0 by default by the emulator. With config <code>"Cmp", "CodeMultiAddr"</code> this is set to 1. Config <code>"Cmp", "BlockDynamicPC"</code> from [[Super_Mario_3D_All-Stars|SM3DAS]] is not supported. The plugin doesn't use this field, since support for "BlockDynamicPC" was removed. All code which used to use this now assumes val!=2, with code for ==2 being removed.
 
| 0xDFC || 0x4 || Set to 0 by default by the emulator. With config <code>"Cmp", "CodeMultiAddr"</code> this is set to 1. Config <code>"Cmp", "BlockDynamicPC"</code> from [[Super_Mario_3D_All-Stars|SM3DAS]] is not supported. The plugin doesn't use this field, since support for "BlockDynamicPC" was removed. All code which used to use this now assumes val!=2, with code for ==2 being removed.