Controller Applet: Difference between revisions
No edit summary |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 16: | Line 16: | ||
|- | |- | ||
| [8.0.0+] || 0x7 | | [8.0.0+] || 0x7 | ||
|- | |||
| [11.0.0+] || 0x8 | |||
|} | |} | ||
Line 31: | Line 33: | ||
| 0x0 || 0x4 || Size of this ControllerSupportArgPrivate struct. | | 0x0 || 0x4 || Size of this ControllerSupportArgPrivate struct. | ||
|- | |- | ||
| 0x4 || 0x4 || Size of | | 0x4 || 0x4 || Size of [[#ControllerSupportArg]]. | ||
|- | |- | ||
| 0x8 || 0x1 || Flag0 | | 0x8 || 0x1 || Flag0 | ||
Line 39: | Line 41: | ||
| 0xA || 0x1 || [[#ControllerSupportMode]] | | 0xA || 0x1 || [[#ControllerSupportMode]] | ||
|- | |- | ||
| 0xB || 0x1 || [[#ControllerSupportCaller]]. Always zero except with ShowControllerFirmwareUpdateForSystem, which sets this to the input param. | | 0xB || 0x1 || [[#ControllerSupportCaller]]. Always zero except with ShowControllerFirmwareUpdateForSystem/ShowControllerKeyRemappingForSystem, which sets this to the input param. | ||
|- | |- | ||
| 0xC || 0x4 || Output from [[HID_services#GetSupportedNpadStyleSet|GetSupportedNpadStyleSet]]. With ShowControllerSupportForSystem on pre-3.0.0 this is value 0. | | 0xC || 0x4 || Output from [[HID_services#GetSupportedNpadStyleSet|GetSupportedNpadStyleSet]]. With ShowControllerSupportForSystem on pre-3.0.0 this is value 0. | ||
Line 90: | Line 92: | ||
|- | |- | ||
| 0x1 || 0x3 || u8 padding[3]. | | 0x1 || 0x3 || u8 padding[3]. | ||
|} | |||
== ControllerKeyRemappingArg == | |||
This is "nn::hid::system::ControllerKeyRemappingArg". This is a 0x10-byte struct. | |||
The defaults for this is all-zero for the first 0xC-bytes. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 || 0x8 || | |||
|- | |||
| 0x8 || 0x4 || | |||
|- | |||
| 0xC || 0x4 || Padding | |||
|} | |} | ||
Line 103: | Line 123: | ||
| 1 || [3.0.0+] ShowControllerStrapGuide | | 1 || [3.0.0+] ShowControllerStrapGuide | ||
|- | |- | ||
| 2 || [3.0.0+] ShowControllerFirmwareUpdate | | 2 || [3.0.0+] ShowControllerFirmwareUpdate | ||
|- | |||
| 4 || [11.0.0+] ShowControllerKeyRemappingForSystem | |||
|} | |} | ||
Line 145: | Line 167: | ||
== Usage == | == Usage == | ||
User-processes should push a common arguments struct, an [[#ControllerSupportArgPrivate]], then [[#ControllerSupportArg]] | User-processes should push a common arguments struct, an [[#ControllerSupportArgPrivate]], then [[#ControllerSupportArg]] / [[#ControllerFirmwareUpdateArg]] / [[#ControllerKeyRemappingArg]]. | ||
On success, an output storage should be popped, with size 0xC being used to read from there (sdknso ignores the actual storage size). When [[#ControllerSupportArg]] was previously used, the first 8-bytes are copied to the output [[#ControllerSupportResultInfo]] (which the user can ignore), otherwise it's ignored. The remaining u32 determines the Result: | On success, an output storage should be popped, with size 0xC being used to read from there (sdknso ignores the actual storage size). When [[#ControllerSupportArg]] was previously used, the first 8-bytes are copied to the output [[#ControllerSupportResultInfo]] (which the user can ignore), otherwise it's ignored. The remaining u32 determines the Result: |