Switch 2: Compatibility Mode: Difference between revisions
Created page with "When a Switch 1 game is running on the Switch 2, it is loaded together with 3 new modules: * nnCompatTrampoline * nnCompatThin * nnCompat These binaries are compiled with PAC enabled. = Hooking = Backwards-compatibility is achieved by (ab)using dynamic linking to selectively hook API functions. Three compatibility libraries are mapped into the game process. They provide symbols which override the original sdk co..." |
|||
Line 18: | Line 18: | ||
== CompatibilityParameter == | == CompatibilityParameter == | ||
The system puts an additional information block in the ProgramArgument parameter | The system puts an additional information block in the ProgramArgument parameter for the process. This block contains certain extra information and overrides, which allows customization of the compatibility hooks depending on the game. | ||
To retrieve this pointer, [[#nnCompatThin|nnCompatThin]] intercepts the nnosInitialize function and retrieves it from there. Normally, a game doesn't use the ProgramParameter so it doesn't care this parameter was passed. | To retrieve this pointer, [[#nnCompatThin|nnCompatThin]] intercepts the nnosInitialize function and retrieves it from there. Normally, a game doesn't use the ProgramParameter so it doesn't care this parameter was passed. | ||
= nnCompatTrampoline = | = nnCompatTrampoline = |