Changes

Jump to navigation Jump to search
613 bytes added ,  17:31, 16 December 2020
no edit summary
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 the storage following this one ([[#ControllerSupportArg]] or [[#ControllerFirmwareUpdateArg]]).
+
| 0x4 || 0x4 || Size of the storage following this one ([[#ControllerSupportArg]] or [[#ControllerFirmwareUpdateArg]]). With ShowControllerKeyRemappingForSystem, this is the size of [[#ControllerSupportArg]] even though the actual storage is [[#ControllerKeyRemappingArg]].
 
|-
 
|-
 
| 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 103: Line 105:  
| 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 142: Line 146:  
|-
 
|-
 
| 0x4 || 0x4 || u32 selectedId, NpadId.
 
| 0x4 || 0x4 || u32 selectedId, NpadId.
 +
|}
 +
 +
== 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
 
|}
 
|}
    
== Usage ==
 
== Usage ==
User-processes should push a common arguments struct, an [[#ControllerSupportArgPrivate]], then [[#ControllerSupportArg]] or [[#ControllerFirmwareUpdateArg]].
+
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:

Navigation menu