Switch 2: Compatibility Mode: Difference between revisions

Add at least some basic info of nnCompatTrampoline instead of leaving it empty...
 
(6 intermediate revisions by 2 users not shown)
Line 8: Line 8:


= NPDM Adjustments =
= NPDM Adjustments =
* Game has access to SVC 0x80 even though it's not in the game NPDM.
* Game has access to SVC 0x54, 0x80 even though it's not in the game NPDM.
* Game has CoreMask 0x3F (so access to core0-5) even though the game NPDM only has CoreMask 0x7.
* Game has CoreMask 0x3F (so access to core0-5) even though the game NPDM only has CoreMask 0x7.
* It's unknown if the service whitelist is updated for the game when running in Compatibility mode.
* It's unknown if the service whitelist is updated for the game when running in Compatibility mode.
Line 20: Line 20:


Below is a breakdown what some of the hooks and what their purpose is.
Below is a breakdown what some of the hooks and what their purpose is.
== Modules ==
Rtld is identical besides the extra page at the end of .bss for [[#CompatibilityParameter|CompatibilityParameter]].
The compat modules are loaded between the main module and the (sub)sdk* modules.
The existing modules are not directly modified.


== CompatibilityParameter ==
== CompatibilityParameter ==
Line 71: Line 78:
|-
|-
|}
|}
= ApplicationCompatibilityInfo =
The [[Switch 2: Title list|ApplicationCompatibilityInfo]] SystemData contains "ApplicationCompatibilityInfo.json".
The json "records" contains an array, each object entry then contains the following:
* "application_id": "0x<lowercase hex ApplicationId>"
* "target_max_version": <value> (normally u32-max)
* "application_layer_info": This object contains various number fields, only fields needed by the current entry are present. "graphics_config", "misc_config", ...
** The data from here is likely passed as input to [[#CompatibilityParameter|CompatibilityParameter]].


= nnCompatTrampoline =
= nnCompatTrampoline =
This module contains, in particular, game-specific patches for at least 5 games. They follow a pattern of "nnCompatPatchFor****", where the last 5 digits are the game code (for example, "nnCompatPatchForAyl8a" for Metroid: Dread).


= nnCompatThin =
= nnCompatThin =
Line 124: Line 141:
|-
|-
| nn::vi::* || Translation layer because vi:u was removed?
| nn::vi::* || Translation layer because vi:u was removed?
|-
| nn::pl::IsRunningOnOunce || Returns 1 instead of 0.
|}
|}