HID services: Difference between revisions

 
(42 intermediate revisions by 3 users not shown)
Line 13: Line 13:
|-
|-
| 21 || [[#ActivateMouse]]
| 21 || [[#ActivateMouse]]
|-
| 22 || [19.0.0+] AddMouseWheelDelta
|-
|-
| 26 || [16.0.0+] ActivateDebugMouse
| 26 || [16.0.0+] ActivateDebugMouse
Line 95: Line 97:
|-
|-
| 91 || [[#ActivateGesture]]
| 91 || [[#ActivateGesture]]
|-
| 92 || [18.0.0+] SetGestureOutputRanges
|-
|-
| 100 || [[#SetSupportedNpadStyleSet]]
| 100 || [[#SetSupportedNpadStyleSet]]
Line 147: Line 151:
|-
|-
| 136 || [8.0.0+] [[#ClearNpadCaptureButtonAssignment]]
| 136 || [8.0.0+] [[#ClearNpadCaptureButtonAssignment]]
|-
| 137 || [20.0.0+] SetNpadGcAnalogStick8bitRawValue
|-
| 138 || [S2]
|-
| 139 || [S2]
|-
|-
| 200 || [[#GetVibrationDeviceInfo]]
| 200 || [[#GetVibrationDeviceInfo]]
Line 173: Line 183:
|-
|-
| 212 || [11.0.0+] [[#SendVibrationValueInBool]]
| 212 || [11.0.0+] [[#SendVibrationValueInBool]]
|-
| 213 || [17.0.0+] SendVibrationValueInMode
|-
| 214 || [17.0.0+] SendVibrationValuesInMode
|-
| 220 || [S2]
|-
|-
| 300 || [3.0.0+] [[#ActivateConsoleSixAxisSensor]]
| 300 || [3.0.0+] [[#ActivateConsoleSixAxisSensor]]
Line 195: Line 211:
|-
|-
| 310 || [6.0.0+] [[#ResetSevenSixAxisSensorTimestamp]]
| 310 || [6.0.0+] [[#ResetSevenSixAxisSensorTimestamp]]
|-
| 311 || [17.0.0+] ForceActivateConsoleSixAxisSensor
|-
| 312 || [17.0.0+] ForceDeactivateConsoleSixAxisSensor
|-
| 320 || [21.0.0+] EnableNpadImu
|-
| 321 || [21.0.0+] DisableNpadImu
|-
|-
| 400 || [3.0.0+] [[#IsUsbFullKeyControllerEnabled]]
| 400 || [3.0.0+] [[#IsUsbFullKeyControllerEnabled]]
Line 273: Line 297:
|-
|-
| 529 || [8.0.0+] [[#SetDisallowedPalmaConnection]]
| 529 || [8.0.0+] [[#SetDisallowedPalmaConnection]]
|-
| 550 || [S2]
|-
|-
| 1000 || [[#SetNpadCommunicationMode]]
| 1000 || [[#SetNpadCommunicationMode]]
Line 281: Line 307:
|-
|-
| 1003 || [9.0.0+] [[#IsFirmwareUpdateNeededForNotification]]
| 1003 || [9.0.0+] [[#IsFirmwareUpdateNeededForNotification]]
|-
| 1004 || [20.0.0+] [[#SetTouchScreenOutputRanges|SetTouchScreenOutputRanges]] ([17.0.0-19.0.1] SetTouchScreenResolution)
|-
| 1005 || [20.0.0+] EnableNxTouchScreenEmulationForTouchEnter
|-
|-
| 2000 || [10.0.0+] [[#ActivateDigitizer]]
| 2000 || [10.0.0+] [[#ActivateDigitizer]]
Line 307: Line 337:
|-
|-
| 3011 || [15.0.0+] ResetFullKeyKeyboardMap
| 3011 || [15.0.0+] ResetFullKeyKeyboardMap
|-
| 3012 || [21.0.0+] GetDebugPadGenericPadMap
|-
| 3013 || [21.0.0+] SetDebugPadGenericPadMap
|-
| 3014 || [21.0.0+] GetDebugPadKeyboardMap
|-
| 3015 || [21.0.0+] SetDebugPadKeyboardMap
|-
| 3110 || [S2]
|-
| 3111 || [S2]
|-
| 3112 || [S2]
|-
| 3113 || [S2]
|-
| 3130 || [S2]
|-
| 3131 || [S2]
|-
| 3132 || [S2]
|-
| 3133 || [S2]
|-
| 3135 || [S2]
|-
| 3136 || [S2]
|-
| 3137 || [S2]
|-
| 3138 || [S2]
|-
| 3139 || [S2]
|-
| 3140 || [S2]
|-
| 3141 || [S2]
|-
| 3142 || [S2]
|-
| 3143 || [S2]
|-
| 3150 || [21.0.0+] SetMouseLibraryVersion
|}
|}


Line 533: Line 607:
* 0x2: [6.0.0+]
* 0x2: [6.0.0+]
* 0x3: [8.0.0+]
* 0x3: [8.0.0+]
* 0x5: [18.0.0+]


== SetNpadJoyHoldType ==
== SetNpadJoyHoldType ==
Line 598: Line 673:
== ClearNpadCaptureButtonAssignment ==
== ClearNpadCaptureButtonAssignment ==
Takes a PID, an [[AM_services|AppletResourceUserId]], no output.
Takes a PID, an [[AM_services|AppletResourceUserId]], no output.
== Cmd138 ==
This is exclusive to S2.
Takes a PID, two input u64s, no output.
== Cmd139 ==
This is exclusive to S2.
Takes a PID, an u64, returns an output u64.


== GetVibrationDeviceInfo ==
== GetVibrationDeviceInfo ==
Line 649: Line 734:


This is currently not exposed by sdknso.
This is currently not exposed by sdknso.
== Cmd220 ==
This is exclusive to S2.
Takes a PID, an u32, an u64, returns an output u8.


== ActivateConsoleSixAxisSensor ==
== ActivateConsoleSixAxisSensor ==
Line 947: Line 1,037:
== SetDisallowedPalmaConnection ==
== SetDisallowedPalmaConnection ==
Takes a PID, an [[AM_services|AppletResourceUserId]], a type-0x9 input buffer containing an array of [[Bluetooth_Driver_services#Address|Address]], no output.
Takes a PID, an [[AM_services|AppletResourceUserId]], a type-0x9 input buffer containing an array of [[Bluetooth_Driver_services#Address|Address]], no output.
== Cmd550 ==
This is exclusive to S2.
Takes a PID, an u32, an u64, returns two output u8s.


== SetNpadCommunicationMode ==
== SetNpadCommunicationMode ==
Line 967: Line 1,062:


sdknso passes hard-coded value 1 for the s32.
sdknso passes hard-coded value 1 for the s32.
== SetTouchScreenOutputRanges ==
Takes a PID, a s32 width, a s32 height, an [[AM_services|AppletResourceUserId]], no output.
This is used by user-processes prior to [[#ActivateTouchScreen|ActivateTouchScreen]], on newer versions.
User-processes can optionally specify input values for width/height during TouchScreen initiailization, with the default values being the relevant fixed width/height values for the platform which the user-process was built for.


== ActivateDigitizer ==
== ActivateDigitizer ==
Takes a PID and an [[AM_services|AppletResourceUserId]], no output.
Takes a PID and an [[AM_services|AppletResourceUserId]]. No output.
 
== Cmd3110 ==
This is exclusive to S2.


== IAppletResource ==
Takes a PID, a handle, an u64, an u64, no output.
This is "nn::hid::IAppletResource".


{| class="wikitable" border="1"
== Cmd3111 ==
|-
This is exclusive to S2.
! Cmd || Name
|-
| 0 || [[#GetSharedMemoryHandle]]
|}


=== GetSharedMemoryHandle ===
Takes a PID and an u64, no output.
No input. Returns a [[#SharedMemoryFormat|sharedmem]] handle.


== IActiveVibrationDeviceList ==
== Cmd3112 ==
This is "nn::hid::IActiveVibrationDeviceList".
This is exclusive to S2.
 
Takes a PID, an u32, an u64, no output.
 
== Cmd3113 ==
This is exclusive to S2.
 
Takes a PID, an u32, an u64, no output.
 
== Cmd3130 ==
This is exclusive to S2.
 
Takes a PID, a handle, an u8, two u32s, two u64s, no output.
 
== Cmd3131 ==
This is exclusive to S2.
 
Takes a PID and an [[AM_services|AppletResourceUserId]], no output.
 
== Cmd3132 ==
This is exclusive to S2.
 
Takes a PID, an u32, an u32, an u64, no output.
 
== Cmd3133 ==
This is exclusive to S2.
 
Takes a PID, an u64, returns two output u32s.
 
== Cmd3135 ==
This is exclusive to S2.
 
Takes a PID, a bool, an [[AM_services|AppletResourceUserId]], no output.
 
== Cmd3136 ==
This is exclusive to S2.
 
Takes a PID, an u64, an u64, no output.
 
== Cmd3137 ==
This is exclusive to S2.
 
Takes a PID, an u64, an u64, no output.
 
== Cmd3138 ==
This is exclusive to S2.
 
Takes a PID, an u32, an [[AM_services|AppletResourceUserId]], no output.
 
Official sw masks the u32 with bitmask 0x6.
 
== Cmd3139 ==
This is exclusive to S2.
 
Takes a PID, a TransferMemory handle, an u8, an u32 width, an u32 height, an u32, an [[AM_services|AppletResourceUserId]], an u64 tmem_size, no output.
 
The input TransferMemory is created with permissions = R--. The user-process later reads from the buffer used with this.
 
Official sw always (?) passes value 1 for the last u32.
 
This and the related nearby cmds are likely (?) for Joy-Con 2 Mouse Mode.
 
== Cmd3140 ==
This is exclusive to S2.
 
Takes a PID, two u32s, two u64s, no output.
 
== Cmd3141 ==
This is exclusive to S2.
 
Takes a PID, a bool, an [[AM_services|AppletResourceUserId]], an u64, no output.
 
== Cmd3142 ==
This is exclusive to S2.
 
Takes a PID, 4 floats, an [[AM_services|AppletResourceUserId]], no output.
 
== Cmd3143 ==
This is exclusive to S2.
 
Takes a PID, two u64s, no output.
 
== IAppletResource ==
This is "nn::hid::IAppletResource".
 
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 || [[#GetSharedMemoryHandle]]
|}
 
=== GetSharedMemoryHandle ===
No input. Returns a [[#SharedMemoryFormat|sharedmem]] handle.
 
== IActiveVibrationDeviceList ==
This is "nn::hid::IActiveVibrationDeviceList".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,025: Line 1,220:
|-
|-
| 17 || [13.0.0+] IsTouchScreenManaged
| 17 || [13.0.0+] IsTouchScreenManaged
|-
| 18 || [18.0.0+] SetTouchScreenAutoPilotStateWithAruid
|-
|-
| 20 || [[#DeactivateMouse]]
| 20 || [[#DeactivateMouse]]
Line 1,031: Line 1,228:
|-
|-
| 22 || [[#UnsetMouseAutoPilotState]]
| 22 || [[#UnsetMouseAutoPilotState]]
|-
| 23 || [21.0.0+] AddMouseSideWheelDelta
|-
|-
| 25 || [16.0.0+] SetDebugMouseAutoPilotState
| 25 || [16.0.0+] SetDebugMouseAutoPilotState
Line 1,113: Line 1,312:
|-
|-
| 152 || [10.0.0+] GetWhoAmI
| 152 || [10.0.0+] GetWhoAmI
|-
| 160 || [S2]
|-
| 161 || [S2]
|-
| 162 || [S2]
|-
| 170 || [S2]
|-
| 171 || [S2]
|-
| 172 || [S2]
|-
|-
| 201 || ActivateFirmwareUpdate
| 201 || ActivateFirmwareUpdate
Line 1,135: Line 1,346:
|-
|-
| 211 || [6.0.0+] StartFirmwareUpdateIndividual
| 211 || [6.0.0+] StartFirmwareUpdateIndividual
|-
| 212 || [19.0.0+] GetDetailFirmwareVersion
|-
| 213 || [20.0.0+] GetFirmwareVersionStringForDevMenu
|-
| 214 || [20.1.0+] GetDestinationFirmwareVersionStringForDevMenu
|-
|-
| 215 || [6.0.0+] SetUsbFirmwareForceUpdateEnabled
| 215 || [6.0.0+] SetUsbFirmwareForceUpdateEnabled
|-
|-
| 216 || [6.0.0+] SetAllKuinaDevicesToFirmwareUpdateMode
| 216 || [6.0.0+] SetAllKuinaDevicesToFirmwareUpdateMode
|-
| 217 || [17.0.0+] StartFirmwareUpdateFromImageSet
|-
|-
| 221 || [3.0.0+] [[#UpdateControllerColor]]
| 221 || [3.0.0+] [[#UpdateControllerColor]]
Line 1,201: Line 1,420:
|-
|-
| 251 || [12.0.0+] GetAnalogStickModuleParam
| 251 || [12.0.0+] GetAnalogStickModuleParam
|-
| 252 || [S2]
|-
| 253 || [19.0.0+] ClearStorageForShipment
|-
| 254 || [S2]
|-
| 255 || [S2]
|-
| 256 || [S2]
|-
| 261 || [21.0.0+] UpdateDesignInfo12
|-
| 266 || [21.0.0+] GetUniquePadButtonCount
|-
| 267 || [21.0.0+] SetAnalogStickCalibration
|-
| 268 || [21.0.0+] ResetAnalogStickCalibration
|-
|-
| 301 || [5.0.0-8.1.0] [[#GetAbstractedPadHandles]]
| 301 || [5.0.0-8.1.0] [[#GetAbstractedPadHandles]]
Line 1,233: Line 1,470:
|-
|-
| 350 || [5.0.0+] [[#AddRegisteredDevice]]
| 350 || [5.0.0+] [[#AddRegisteredDevice]]
|-
| 351 || [17.0.0-18.1.0] GetRegisteredDevicesCountDebug
|-
| 352 || [17.0.0-18.1.0] DeleteRegisteredDevicesDebug
|-
|-
| 400 || [6.0.0+] DisableExternalMcuOnNxDevice
| 400 || [6.0.0+] DisableExternalMcuOnNxDevice
Line 1,255: Line 1,496:
|-
|-
| 600 || [10.0.0+] ConvertPadState
| 600 || [10.0.0+] ConvertPadState
|-
| 601 || [18.0.0+] [[#IsButtonConfigSupported]]
|-
| 602 || [18.0.0+] [[#IsButtonConfigEmbeddedSupported]]
|-
| 603 || [18.0.0+] [[#DeleteButtonConfig]]
|-
| 604 || [18.0.0+] [[#DeleteButtonConfigEmbedded]]
|-
| 605 || [18.0.0+] [[#SetButtonConfigEnabled]]
|-
| 606 || [18.0.0+] [[#SetButtonConfigEmbeddedEnabled]]
|-
| 607 || [18.0.0+] [[#IsButtonConfigEnabled]]
|-
| 608 || [18.0.0+] [[#IsButtonConfigEmbeddedEnabled]]
|-
| 609 || [18.0.0+] [[#SetButtonConfigEmbedded]]
|-
| 610 || [18.0.0+] [[#SetButtonConfigFull]]
|-
| 611 || [18.0.0+] [[#SetButtonConfigLeft]]
|-
| 612 || [18.0.0+] [[#SetButtonConfigRight]]
|-
| 613 || [18.0.0+] [[#GetButtonConfigEmbedded]]
|-
| 614 || [18.0.0+] [[#GetButtonConfigFull]]
|-
| 615 || [18.0.0+] [[#GetButtonConfigLeft]]
|-
| 616 || [18.0.0+] [[#GetButtonConfigRight]]
|-
| 617 || [S2]
|-
| 618 || [S2]
|-
| 619 || [S2]
|-
| 620 || [S2]
|-
| 621 || [S2]
|-
| 622 || [S2]
|-
|-
| 650 || [12.0.0+] AddButtonPlayData
| 650 || [12.0.0+] AddButtonPlayData
Line 1,262: Line 1,547:
| 652 || [12.0.0+] StopButtonPlayData
| 652 || [12.0.0+] StopButtonPlayData
|-
|-
| 2000 || [10.0.0+] DeactivateDigitizer
| 700 || [21.0.0+] GetRailAttachEventCount
|-
| 2000 || [10.0.0+] [[#DeactivateDigitizer]]
|-
|-
| 2001 || [10.0.0+] SetDigitizerAutoPilotState
| 2001 || [10.0.0+] [[#SetDigitizerAutoPilotState]]
|-
|-
| 2002 || [10.0.0+] UnsetDigitizerAutoPilotState
| 2002 || [10.0.0+] [[#UnsetDigitizerAutoPilotState]]
|-
|-
| 3000 || [16.0.0+] ReloadFirmwareDebugSettings
| 3000 || [16.0.0+] ReloadFirmwareDebugSettings
Line 1,360: Line 1,647:


[9.0.0+] Now takes a total of 8-bytes of input, returns a total of 0x18-bytes of output.
[9.0.0+] Now takes a total of 8-bytes of input, returns a total of 0x18-bytes of output.
[18.0.0+] Now takes a total of 8-bytes of input, returns a total of 0x20-bytes of output.


== GetSixAxisSensorDriverStates ==
== GetSixAxisSensorDriverStates ==
Line 1,486: Line 1,775:


[11.0.0+] Takes an input [[#DebugRegisteredDevice]], no output.
[11.0.0+] Takes an input [[#DebugRegisteredDevice]], no output.
== DeactivateDigitizer ==
No input/output.
== SetDigitizerAutoPilotState ==
Takes an input [[#DigitizerAutoPilotState]]. No output.
== UnsetDigitizerAutoPilotState ==
No input/output.


= hid:sys =
= hid:sys =
Line 1,513: Line 1,811:
|-
|-
| 161 || [7.0.0+] GetPlatformConfig
| 161 || [7.0.0+] GetPlatformConfig
|-
| 171 || [S2]
|-
| 181 || [S2]
|-
|-
| 210 || AcquireNfcDeviceUpdateEventHandle
| 210 || AcquireNfcDeviceUpdateEventHandle
Line 1,522: Line 1,824:
| 213 || ActivateNfc
| 213 || ActivateNfc
|-
|-
| 214 || [4.0.0+] GetXcdHandleForNpadWithNfc
| 214 || [4.0.0-18.1.0] GetXcdHandleForNpadWithNfc
|-
|-
| 215 || [4.0.0+] IsNfcActivated
| 215 || [4.0.0+] IsNfcActivated
|-
| 216 || [19.0.0+] GetAbstractedPadIdForNpadWithNfc
|-
| 217 || [19.0.0+] [[#SetNfcEvent]]
|-
| 218 || [19.0.0+] [[#GetNfcInfo]]
|-
| 219 || [19.0.0+] StartNfcDiscovery
|-
| 220 || [19.0.0+] StopNfcDiscovery
|-
| 221 || [19.0.0+] StartNtagRead
|-
| 222 || [19.0.0+] StartNtagWrite
|-
| 223 || [19.0.0+] SendNfcRawData
|-
| 224 || [19.0.0+] RegisterMifareKey
|-
| 225 || [19.0.0+] ClearMifareKey
|-
| 226 || [19.0.0+] StartMifareRead
|-
| 227 || [19.0.0+] StartMifareWrite
|-
|-
| 230 || AcquireIrSensorEventHandle
| 230 || AcquireIrSensorEventHandle
Line 1,534: Line 1,860:
| 233 || [10.0.0+] GetXcdHandleForNpadWithIrSensor
| 233 || [10.0.0+] GetXcdHandleForNpadWithIrSensor
|-
|-
| 301 || ActivateNpadSystem
| 234 || [19.0.0+] GetNpadJoyHoldType
|-
|-
| 303 || ApplyNpadSystemCommonPolicy
| 241 || [19.0.0+] [[#GetDataFormat]]
|-
|-
| 304 || EnableAssigningSingleOnSlSrPress
| 242 || [19.0.0+] [[#SetDataFormat]]
|-
|-
| 305 || DisableAssigningSingleOnSlSrPress
| 243 || [19.0.0+] [[#GetMcuState]]
|-
|-
| 306 || GetLastActiveNpad
| 244 || [19.0.0+] [[#SetMcuState]]
|-
|-
| 307 || GetNpadSystemExtStyle
| 245 || [19.0.0+] [[#GetMcuVersionForNfc]]
|-
|-
| 308 || [5.0.0+] ApplyNpadSystemCommonPolicyFull
| 246 || [19.0.0+] [[#CheckNfcDevicePower]]
|-
|-
| 309 || [5.0.0+] GetNpadFullKeyGripColor
| 247 || [19.0.0+] [[#SetMcuStateImmediate]]
|-
|-
| 310 || [6.0.0+] [[#GetMaskedSupportedNpadStyleSet]]
| 251 || [S2]
|-
| 252 || [S2]
|-
| 253 || [S2]
|-
| 301 || ActivateNpadSystem
|-
| 303 || ApplyNpadSystemCommonPolicy
|-
| 304 || EnableAssigningSingleOnSlSrPress
|-
| 305 || DisableAssigningSingleOnSlSrPress
|-
| 306 || GetLastActiveNpad
|-
| 307 || GetNpadSystemExtStyle
|-
| 308 || [5.0.0+] ApplyNpadSystemCommonPolicyFull
|-
| 309 || [5.0.0+] GetNpadFullKeyGripColor
|-
| 310 || [6.0.0+] [[#GetMaskedSupportedNpadStyleSet]]
|-
|-
| 311 || SetNpadPlayerLedBlinkingDevice
| 311 || SetNpadPlayerLedBlinkingDevice
Line 1,589: Line 1,937:
|-
|-
| 330 || [14.0.0+] CheckAbstractedPadConnection
| 330 || [14.0.0+] CheckAbstractedPadConnection
|-
| 332 || [19.0.0+] ConvertAppletDetailedUiTypeFromPlayReportType
|-
| 333 || [20.0.0+] SetNpadUserSpgApplet
|-
| 334 || [20.0.0+] AcquireUniquePadButtonStateChangedEventHandle
|-
|-
| 500 || SetAppletResourceUserId
| 500 || SetAppletResourceUserId
|-
|-
| 501 || RegisterAppletResourceUserId
| 501 || [[#RegisterAppletResourceUserId|RegisterAppletResourceUserId]]
|-
|-
| 502 || UnregisterAppletResourceUserId
| 502 || UnregisterAppletResourceUserId
Line 1,627: Line 1,981:
|-
|-
| 525 || [11.0.0+] IsJoyConAttachedOnAllRail
| 525 || [11.0.0+] IsJoyConAttachedOnAllRail
|-
| 526 || [19.0.0+] IsInvertedControllerConnectedOnRail
|-
|-
| 540 || AcquirePlayReportControllerUsageUpdateEvent
| 540 || AcquirePlayReportControllerUsageUpdateEvent
Line 1,634: Line 1,990:
| 542 || AcquirePlayReportRegisteredDeviceUpdateEvent
| 542 || AcquirePlayReportRegisteredDeviceUpdateEvent
|-
|-
| 543 || GetRegisteredDevicesOld ([1.0.0-4.1.0] GetRegisteredDevices)
| 543 || [5.0.0-18.1.0] GetRegisteredDevicesOld ([1.0.0-4.1.0] GetRegisteredDevices)
|-
|-
| 544 || [3.0.0+] AcquireConnectionTriggerTimeoutEvent
| 544 || [3.0.0+] AcquireConnectionTriggerTimeoutEvent
Line 1,647: Line 2,003:
|-
|-
| 549 || [6.0.0+] GetConnectableRegisteredDevices
| 549 || [6.0.0+] GetConnectableRegisteredDevices
|-
| 550 || [S2]
|-
| 551 || [20.0.0+] GetRegisteredDevicesForControllerSupport
|-
|-
| 700 || ActivateUniquePad
| 700 || ActivateUniquePad
Line 1,653: Line 2,013:
|-
|-
| 703 || [[#GetUniquePadIds]]
| 703 || [[#GetUniquePadIds]]
|-
| 704 || [S2]
|-
| 705 || [S2]
|-
| 707 || [S2]
|-
| 711 || [20.0.0+] AcquireUniquePadConnectionOnHandheldForNsEventHandle
|-
| 712 || [20.0.0+] GetUniquePadColor12
|-
| 721 || [S2]
|-
| 722 || [S2]
|-
| 723 || [S2]
|-
| 724 || [S2]
|-
| 725 || [S2]
|-
| 726 || [S2]
|-
| 727 || [S2]
|-
| 728 || [S2]
|-
| 729 || [S2]
|-
| 730 || [S2]
|-
| 731 || [S2]
|-
| 732 || [S2]
|-
| 733 || [S2]
|-
| 734 || [S2]
|-
| 735 || [S2]
|-
| 736 || [S2]
|-
| 737 || [S2]
|-
| 738 || [S2]
|-
| 739 || [S2]
|-
| 740 || [S2]
|-
| 741 || [S2]
|-
| 742 || [S2]
|-
| 743 || [S2]
|-
| 744 || [S2]
|-
| 745 || [S2]
|-
| 746 || [S2]
|-
|-
| 751 || AcquireJoyDetachOnBluetoothOffEventHandle
| 751 || AcquireJoyDetachOnBluetoothOffEventHandle
Line 1,681: Line 2,103:
|-
|-
| 812 || [8.0.0+] GetConsoleUniqueSixAxisSensorHandle
| 812 || [8.0.0+] GetConsoleUniqueSixAxisSensorHandle
|-
| 813 || [18.0.0+] GetDeviceType
|-
|-
| 821 || StartAnalogStickManualCalibration
| 821 || StartAnalogStickManualCalibration
Line 1,741: Line 2,165:
|-
|-
| 1011 || [4.0.0+] DeactivateAudioControl
| 1011 || [4.0.0+] DeactivateAudioControl
|-
| 1012 || [20.0.0+] GetFirmwareVersionStringForUserSupportPage
|-
|-
| 1050 || [5.0.0+] IsSixAxisSensorAccurateUserCalibrationSupported
| 1050 || [5.0.0+] IsSixAxisSensorAccurateUserCalibrationSupported
Line 1,782: Line 2,208:
| 1157 || [10.0.0+] [[#CancelConnectionTrigger]]
| 1157 || [10.0.0+] [[#CancelConnectionTrigger]]
|-
|-
| 1200 || [10.0.0+] [[#IsButtonConfigSupported]]
| 1158 || [20.1.0+] SetConnectionLimitForSplay
|-
|-
| 1201 || [11.0.0+] [[#IsButtonConfigEmbeddedSupported]] ([10.0.0-10.2.0] [[#DeleteButtonConfig]])
| 1159 || [20.1.0+] ClearConnectionLimitForSplay
|-
|-
| 1202 || [11.0.0+] [[#DeleteButtonConfig]] ([10.0.0-10.2.0] [[#SetButtonConfigEnabled]])
| 1200 || [10.0.0-17.0.1] [[#IsButtonConfigSupported]]
|-
|-
| 1203 || [11.0.0+] [[#DeleteButtonConfigEmbedded]] ([10.0.0-10.2.0] [[#IsButtonConfigEnabled]])
| 1201 || [11.0.0-17.0.1] [[#IsButtonConfigEmbeddedSupported]] ([10.0.0-10.2.0] [[#DeleteButtonConfig]])
|-
|-
| 1204 || [11.0.0+] [[#SetButtonConfigEnabled]] ([10.0.0-10.2.0] [[#SetButtonConfigEmbedded]])
| 1202 || [11.0.0-17.0.1] [[#DeleteButtonConfig]] ([10.0.0-10.2.0] [[#SetButtonConfigEnabled]])
|-
|-
| 1205 || [11.0.0+] [[#SetButtonConfigEmbeddedEnabled]] ([10.0.0-10.2.0] [[#SetButtonConfigFull]])
| 1203 || [11.0.0-17.0.1] [[#DeleteButtonConfigEmbedded]] ([10.0.0-10.2.0] [[#IsButtonConfigEnabled]])
|-
|-
| 1206 || [11.0.0+] [[#IsButtonConfigEnabled]] ([10.0.0-10.2.0] [[#SetButtonConfigLeft]])
| 1204 || [11.0.0-17.0.1] [[#SetButtonConfigEnabled]] ([10.0.0-10.2.0] [[#SetButtonConfigEmbedded]])
|-
|-
| 1207 || [11.0.0+] [[#IsButtonConfigEmbeddedEnabled]] ([10.0.0-10.2.0] [[#SetButtonConfigRight]])
| 1205 || [11.0.0-17.0.1] [[#SetButtonConfigEmbeddedEnabled]] ([10.0.0-10.2.0] [[#SetButtonConfigFull]])
|-
|-
| 1208 || [11.0.0+] [[#SetButtonConfigEmbedded]] ([10.0.0-10.2.0] [[#GetButtonConfigEmbedded]])
| 1206 || [11.0.0-17.0.1] [[#IsButtonConfigEnabled]] ([10.0.0-10.2.0] [[#SetButtonConfigLeft]])
|-
|-
| 1209 || [11.0.0+] [[#SetButtonConfigFull]] ([10.0.0-10.2.0] [[#GetButtonConfigFull]])
| 1207 || [11.0.0-17.0.1] [[#IsButtonConfigEmbeddedEnabled]] ([10.0.0-10.2.0] [[#SetButtonConfigRight]])
|-
| 1208 || [11.0.0-17.0.1] [[#SetButtonConfigEmbedded]] ([10.0.0-10.2.0] [[#GetButtonConfigEmbedded]])
|-
| 1209 || [11.0.0-17.0.1] [[#SetButtonConfigFull]] ([10.0.0-10.2.0] [[#GetButtonConfigFull]])
|-
|-
| 1210 || [10.0.0-10.2.0] [[#GetButtonConfigLeft]]
| 1210 || [10.0.0-10.2.0] [[#GetButtonConfigLeft]]
|-
|-
| 1211 || [11.0.0+] [[#SetButtonConfigRight]] ([10.0.0-10.2.0] [[#GetButtonConfigRight]])
| 1211 || [11.0.0-17.0.1] [[#SetButtonConfigRight]] ([10.0.0-10.2.0] [[#GetButtonConfigRight]])
|-
|-
| 1212 || [11.0.0+] [[#GetButtonConfigEmbedded]]
| 1212 || [11.0.0-17.0.1] [[#GetButtonConfigEmbedded]]
|-
|-
| 1213 || [11.0.0+] [[#GetButtonConfigFull]]
| 1213 || [11.0.0-17.0.1] [[#GetButtonConfigFull]]
|-
|-
| 1214 || [11.0.0+] [[#GetButtonConfigLeft]]
| 1214 || [11.0.0-17.0.1] [[#GetButtonConfigLeft]]
|-
|-
| 1215 || [11.0.0+] [[#GetButtonConfigRight]]
| 1215 || [11.0.0-17.0.1] [[#GetButtonConfigRight]]
|-
|-
| 1250 || [10.0.0+] [[#IsCustomButtonConfigSupported]]
| 1250 || [10.0.0+] [[#IsCustomButtonConfigSupported]]
Line 1,898: Line 2,328:
| 1291 || [11.0.0+] [[#SetButtonConfigStorageRight]]
| 1291 || [11.0.0+] [[#SetButtonConfigStorageRight]]
|-
|-
| 12010 || [11.0.0+] [[#SetButtonConfigLeft]]
| 1292 || [S2]
|}
|-
 
| 1293 || [S2]
== SendKeyboardLockKeyEvent ==
|-
Takes an u32 BitFlagSet [[#KeyboardLockKeyEvent]], no output.
| 1294 || [S2]
 
|-
== AcquireHomeButtonEventHandle ==
| 1295 || [S2]
Takes a PID, an [[AM_services|AppletResourceUserId]], returns an output Event handle.
|-
 
| 1296 || [S2]
The EventClearMode used by sdknso is user-specified. The Event is signaled when [[#HomeButtonState]] is updated.
|-
 
| 1297 || [S2]
This is used by [[AM_services|AM]].
|-
 
| 1298 || [S2]
== ActivateHomeButton ==
|-
Takes a PID, an [[AM_services|AppletResourceUserId]], no output.
| 1299 || [S2]
 
|-
Activates the [[#HomeButtonSharedMemoryFormat|HomeButton]] sharedmem.
| 1300 || [S2]
 
|-
== AcquireSleepButtonEventHandle ==
| 1301 || [S2]
Takes a PID, an [[AM_services|AppletResourceUserId]], returns an output Event handle.
|-
 
| 1302 || [S2]
The EventClearMode used by sdknso is user-specified. The Event is signaled when [[#SleepButtonState]] is updated.
|-
 
| 1303 || [S2]
This is used by [[AM_services|AM]].
|-
 
| 1304 || [S2]
== ActivateSleepButton ==
|-
Takes a PID, an [[AM_services|AppletResourceUserId]], no output.
| 1305 || [S2]
 
|-
Activates the [[#SleepButtonSharedMemoryFormat|SleepButton]] sharedmem.
| 1306 || [S2]
 
|-
== AcquireCaptureButtonEventHandle ==
| 1307 || [S2]
Takes a PID, an [[AM_services|AppletResourceUserId]], returns an output Event handle.
|-
 
| 1308 || [18.0.0+] SetButtonConfigVisible
The EventClearMode used by sdknso is user-specified. The Event is signaled when [[#CaptureButtonState]] is updated.
|-
 
| 1309 || [18.0.0+] IsButtonConfigVisible
This is used by [[AM_services|AM]].
|-
 
| 1310 || [S2]
== ActivateCaptureButton ==
|-
Takes a PID, an [[AM_services|AppletResourceUserId]], no output.
| 1320 || [17.0.0+] WakeTouchScreenUp
 
|-
Activates the [[#CaptureButtonSharedMemoryFormat|CaptureButton]] sharedmem.
| 1321 || [17.0.0+] PutTouchScreenToSleep
 
|-
== GetMaskedSupportedNpadStyleSet ==
| 1322 || [20.0.0+] AcquireTouchScreenAsyncWakeCompletedEvent
Takes an input u64 AppletResourceUserId, returns an output u32 [[#NpadStyleTag]].
|-
 
| 1323 || [21.0.0+] StartTouchScreenAutoTuneForSystemSettings
Official sw uses the output from [[Applet_Manager_services|GetAppletResourceUserIdOfCallerApplet]] with this.
|-
 
| 1324 || [21.0.0+] AcquireTouchScreenAutoTuneCompletedEvent
== GetUniquePadsFromNpad ==
|-
Takes an input u32 [[#NpadIdType]], a type-0xA output buffer, and returns an output s64 for total output entries (which is copied to a s32 by official sw).
| 1325 || [21.0.0+] IsTouchScreenAutoTuneRequiredForRepairProviderReplacement
 
|-
The output buffer contains an array of [[#UniquePadId]].
| 1326 || [21.0.0+] SetTouchScreenOffset
 
|-
== SetVibrationMasterVolume ==
| 1327 || [22.0.0+]
Takes an input 32bit float.
|-
 
| 1350 || [S2]
== GetUniquePadIds ==
|-
Takes a type-0xA output buffer, and returns an output s64 for total output entries (which is copied to a s32 by official sw).
| 1351 || [S2]
 
|-
The output buffer contains an array of [[#UniquePadId]].
| 1352 || [S2]
 
|-
== GetUniquePadType ==
| 1360 || [S2]
Takes an input [[#UniquePadId]] and returns an output u64 [[#UniquePadType]].
|-
 
| 1361 || [S2]
== GetUniquePadSerialNumber ==
|-
Takes an input [[#UniquePadId]] and returns an output [[#UniquePadSerialNumber]].
| 1362 || [S2]
 
|-
== SetNotificationLedPattern ==
| 1380 || [S2]
Takes an input [[#NotificationLedPattern]] and an [[#UniquePadId]], no output.
 
The specified controller must have a HOME button.
 
This sends [https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_subcommands_notes.md#subcommand-0x38-set-home-light subcommand 0x38] to the specified controller, for setting the pattern for the HOME button notification LED. The input structure is converted to the format as follows: <code>((u8*)cmd_argdata)[pos] = u8_in[pos2] | u8_in[pos3]<<4;</code> Hence, 4bits from pairs of 2-bytes of the input struct are combined to write to the subcommand. Only the low 4bits of each used byte in the struct is used. This is written to stack initially, then copied to the actual cmd_argdata (the data immediately following the subcommandID byte). There's a total of 0x1D-bytes of cmd_argdata initialized from this.
 
The layout of cmd_argdata is as follows:
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
| 1381 || [S2]
|-
|-
| 0x0 || 0x1 || <nowiki>((TimeUnit & 0xF) | ((FrameCount & 0xF) << 4))</nowiki>
| 1382 || [S2]
|-
|-
| 0x1 || 0x1 || <nowiki>((CycleCount & 0xF) | ((InitialBrightness & 0xF) << 4))</nowiki>
| 1383 || [S2]
|-
|-
| 0x2 || 0x1 || <nowiki>((Frame2Brightness & 0xF) | ((Frame1Brightness & 0xF) << 4))</nowiki>
| 1384 || [S2]
|-
|-
| 0x3 || 0x1 || <nowiki>((Frame1TimeToHold & 0xF) | ((Frame1TimeTowards & 0xF) << 4))</nowiki>
| 1385 || [S2]
|-
|-
| 0x4 || 0x1 || <nowiki>((Frame2TimeToHold & 0xF) | ((Frame2TimeTowards & 0xF) << 4))</nowiki>
| 1386 || [S2]
|-
|-
| 0x5 || 0x1 || <nowiki>((Frame4Brightness & 0xF) | ((Frame3Brightness & 0xF) << 4))</nowiki>
| 1387 || [S2]
|-
|-
| 0x6 || 0x1 || <nowiki>((Frame3TimeToHold & 0xF) | ((Frame3TimeTowards & 0xF) << 4))</nowiki>
| 1388 || [S2]
|-
|-
| 0x7 || 0x1 || <nowiki>((Frame4TimeToHold & 0xF) | ((Frame4TimeTowards & 0xF) << 4))</nowiki>
| 1400 || [S2]
|-
|-
| 0x8 || 0x1 || <nowiki>((Frame6Brightness & 0xF) | ((Frame5Brightness & 0xF) << 4))</nowiki>
| 1401 || [S2]
|-
|-
| 0x9 || 0x1 || <nowiki>((Frame5TimeToHold & 0xF) | ((Frame5TimeTowards & 0xF) << 4))</nowiki>
| 1420 || [19.0.0+] GetAppletResourceProperty
|-
|-
| 0xA || 0x1 || <nowiki>((Frame6TimeToHold & 0xF) | ((Frame6TimeTowards & 0xF) << 4))</nowiki>
| 1445 || [S2]
|-
|-
| 0xB || 0x1 || <nowiki>((Frame8Brightness & 0xF) | ((Frame7Brightness & 0xF) << 4))</nowiki>
| 1446 || [S2]
|-
|-
| 0xC || 0x1 || <nowiki>((Frame7TimeToHold & 0xF) | ((Frame7TimeTowards & 0xF) << 4))</nowiki>
| 1447 || [S2]
|-
|-
| 0xD || 0x1 || <nowiki>((Frame8TimeToHold & 0xF) | ((Frame8TimeTowards & 0xF) << 4))</nowiki>
| 1448 || [S2]
|-
|-
| 0xE || 0x1 || <nowiki>((Frame10Brightness & 0xF) | ((Frame9Brightness & 0xF) << 4))</nowiki>
| 1449 || [S2]
|-
|-
| 0xF || 0x1 || <nowiki>((Frame9TimeToHold & 0xF) | ((Frame9TimeTowards & 0xF) << 4))</nowiki>
| 1455 || [S2]
|-
|-
| 0x10 || 0x1 || <nowiki>((Frame10TimeToHold & 0xF) | ((Frame10TimeTowards & 0xF) << 4))</nowiki>
| 1456 || [S2]
|-
|-
| 0x11 || 0x1 || <nowiki>((Frame12Brightness & 0xF) | ((Frame11Brightness & 0xF) << 4))</nowiki>
| 1457 || [S2]
|-
|-
| 0x12 || 0x1 || <nowiki>((Frame11TimeToHold & 0xF) | ((Frame11TimeTowards & 0xF) << 4))</nowiki>
| 1458 || [S2]
|-
|-
| 0x13 || 0x1 || <nowiki>((Frame12TimeToHold & 0xF) | ((Frame12TimeTowards & 0xF) << 4))</nowiki>
| 1459 || [S2]
|-
| 1460 || [S2]
|-
| 1461 || [S2]
|-
|-
| 0x14 || 0x1 || <nowiki>((Frame14Brightness & 0xF) | ((Frame13Brightness & 0xF) << 4))</nowiki>
| 1470 || [S2]
|-
|-
| 0x15 || 0x1 || <nowiki>((Frame13TimeToHold & 0xF) | ((Frame13TimeTowards & 0xF) << 4))</nowiki>
| 1471 || [S2]
|-
|-
| 0x16 || 0x1 || <nowiki>((Frame14TimeToHold & 0xF) | ((Frame14TimeTowards & 0xF) << 4))</nowiki>
| 1472 || [S2]
|-
|-
| 0x17 || 0x1 || <nowiki>((Reserved & 0xF) | ((Frame15Brightness & 0xF) << 4))</nowiki>
| 1473 || [S2]
|-
|-
| 0x18 || 0x1 || <nowiki>((Frame15TimeToHold & 0xF) | ((Frame15TimeTowards & 0xF) << 4))</nowiki>
| 1474 || [S2]
|-
|-
| 0x19 || 0x1 || <nowiki>((Reserved & 0xF) | ((Reserved & 0xF) << 4))</nowiki>
| 1480 || [S2]
|-
|-
| 0x1A || 0x1 || <nowiki>((TimeTowardsFinalBrightness & 0xF) | ((FinalBrightness & 0xF) << 4))</nowiki>
| 1490 || [22.0.0+]
|-
|-
| 0x1B || 0x1 || <nowiki>(Timeout & 0xFF)</nowiki>
| 1491 || [22.0.0+]
|-
|-
| 0x1C || 0x1 || <nowiki>((Timeout >> 8) & 0xFF)</nowiki>
| 12010 || [11.0.0-17.0.1] [[#SetButtonConfigLeft]]
|}
|}


[9.0.0+] This runs code similar to [[#SetNotificationLedPatternWithTimeout]], except it passes the following param values to an internal func: flag=1 and TimeSpan=0 (with [[#SetNotificationLedPatternWithTimeout]] these are flag=0 and TimeSpan={input value}).
== SendKeyboardLockKeyEvent ==
Takes an u32 BitFlagSet [[#KeyboardLockKeyEvent]], no output.
 
== AcquireHomeButtonEventHandle ==
Takes a PID, an [[AM_services|AppletResourceUserId]], returns an output Event handle.
 
The EventClearMode used by sdknso is user-specified. The Event is signaled when [[#HomeButtonState]] is updated.
 
This is used by [[AM_services|AM]].
 
== ActivateHomeButton ==
Takes a PID, an [[AM_services|AppletResourceUserId]], no output.


== SetNotificationLedPatternWithTimeout ==
Activates the [[#HomeButtonSharedMemoryFormat|HomeButton]] sharedmem.
Takes an input [[#NotificationLedPattern]], an [[#UniquePadId]], and an s64 TimeSpan, no output.


== PrepareHidsForNotificationWake ==
== AcquireSleepButtonEventHandle ==
Takes a type-0x9 input buffer containing an array of [[#UniquePadId]], no output.
Takes a PID, an [[AM_services|AppletResourceUserId]], returns an output Event handle.


== IsUsbConnected ==
The EventClearMode used by sdknso is user-specified. The Event is signaled when [[#SleepButtonState]] is updated.
Tales an input [[#UniquePadId]], returns an output bool.


== NotifyInputDetector ==
This is used by [[AM_services|AM]].
Takes an input u32 bitmask InputSourceId, no output.


This is the only hid:sys command used by USB-sysmodule (with value 0x40).
== ActivateSleepButton ==
Takes a PID, an [[AM_services|AppletResourceUserId]], no output.


== GetHidbusSystemServiceObject ==
Activates the [[#SleepButtonSharedMemoryFormat|SleepButton]] sharedmem.
No input, returns an [[#IHidbusSystemServer]].


== GetTouchScreenFirmwareVersion ==
== AcquireCaptureButtonEventHandle ==
No input. Returns a [[#FirmwareVersion]].
Takes a PID, an [[AM_services|AppletResourceUserId]], returns an output Event handle.


This requests the current firmware version from the touch screen IC.
The EventClearMode used by sdknso is user-specified. The Event is signaled when [[#CaptureButtonState]] is updated.


It first ensures the touch screen IC's chip id is one of the following:
This is used by [[AM_services|AM]].
0x7036 - Ftm4cd60d (STMicroelectronics FingerTipS FT9CJ/FT9CF)
0x4036 - Fst2ba61ya1


Then constructs the final firmware version as follows:
== ActivateCaptureButton ==
uint32_t FtsVersion = GetFtsReleasedVer();    // Matches the xxxx value found in the FTS_xxxx.fts256 and FTS_xxxx.ftb firmware files.
Takes a PID, an [[AM_services|AppletResourceUserId]], no output.
uint8_t FtsVersionByte0 = (FtsVersion & 0xFF);
uint8_t FtsVersionByte1 = (FtsVersion & 0xFF00);
uint8_t FtsVersionByte2 = (FtsVersion & 0xFF0000);
uint8_t FtsVersionByte3 = (FtsVersion & 0xFF000000);
uint8_t FirmwareVersionByte0 = FtsVersionByte3;
uint8_t FirmwareVersionByte1 = FtsVersionByte2;
uint8_t FirmwareVersionByte2 = FtsVersionByte1;
uint8_t FirmwareVersionByte3 = FtsVersionByte0;
if (FtsVersionByte3 <= 0x31) {
    FirmwareVersionByte3 = 0;
    FirmwareVersionByte1 = 0;
    FirmwareVersionByte0 = 0x31;
    if (FtsVersionByte2 == 0x5) {
        FirmwareVersionByte2 = 2;
    } else if (FtsVersionByte2 == 0x12) {
        FirmwareVersionByte2 = 0;
    } else if (FtsVersionByte2 == 0x1A) {
        FirmwareVersionByte2 = 1;
    } else {
        // Throw error.
    }
}
uint8_t FirmwareVersion[0x10] = {0};
*(uint32_t *)FirmwareVersion = (FirmwareVersionByte3 << 24) | (FirmwareVersionByte2 << 16) | (FirmwareVersionByte1 << 8) | FirmwareVersionByte0;
*((uint32_t *)FirmwareVersion + 1) = 0x5354;  // "TS"
return FirmwareVersion;


== IsFirmwareAvailableForNotification ==
Activates the [[#CaptureButtonSharedMemoryFormat|CaptureButton]] sharedmem.
Takes a PID, a s32, an [[#UniquePadId]], an [[AM_services|AppletResourceUserId]], returns an output bool.


sdknso uses hard-coded value 1 for the s32.
== GetMaskedSupportedNpadStyleSet ==
Takes an input u64 AppletResourceUserId, returns an output u32 [[#NpadStyleTag]].


== CancelConnectionTrigger ==
Official sw uses the output from [[Applet_Manager_services|GetAppletResourceUserIdOfCallerApplet]] with this.
Takes an input "nn::bluetooth::Address", no output.


== IsButtonConfigSupported ==
== GetUniquePadsFromNpad ==
Takes an input [[#UniquePadId]], returns an output bool.
Takes an input u32 [[#NpadIdType]], a type-0xA output buffer, and returns an output s64 for total output entries (which is copied to a s32 by official sw).


[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], returns an output bool.
The output buffer contains an array of [[#UniquePadId]].


== IsButtonConfigEmbeddedSupported ==
== RegisterAppletResourceUserId ==
No input, returns an output bool.
Takes an input bool, an [[Applet_Manager_services|AppletResourceUserId]], no output.


== DeleteButtonConfig ==
[20.4.0+] Takes an input bool, an u8, an [[Applet_Manager_services|AppletResourceUserId]], no output.
Takes an input [[#UniquePadId]], no output.


[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], no output.
== SetVibrationMasterVolume ==
Takes an input 32bit float.


== DeleteButtonConfigEmbedded ==
== GetUniquePadIds ==
No input/output.
Takes a type-0xA output buffer, and returns an output s64 for total output entries (which is copied to a s32 by official sw).


== SetButtonConfigEnabled ==
The output buffer contains an array of [[#UniquePadId]].
Takes an input bool, an [[#UniquePadId]], no output.


[11.0.0+] Takes an input bool, an [[Bluetooth_Driver_services#Address|Address]], no output.
== GetUniquePadType ==
Takes an input [[#UniquePadId]] and returns an output u64 [[#UniquePadType]].


== SetButtonConfigEmbeddedEnabled ==
== GetUniquePadSerialNumber ==
Takes an input bool, no output.
Takes an input [[#UniquePadId]] and returns an output [[#UniquePadSerialNumber]].


== IsButtonConfigEnabled ==
== SetNotificationLedPattern ==
Takes an input [[#UniquePadId]], returns an output bool.
Takes an input [[#NotificationLedPattern]] and an [[#UniquePadId]], no output.


[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], returns an output bool.
The specified controller must have a HOME button.


== IsButtonConfigEmbeddedEnabled ==
This sends [https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_subcommands_notes.md#subcommand-0x38-set-home-light subcommand 0x38] to the specified controller, for setting the pattern for the HOME button notification LED. The input structure is converted to the format as follows: <code>((u8*)cmd_argdata)[pos] = u8_in[pos2] | u8_in[pos3]<<4;</code> Hence, 4bits from pairs of 2-bytes of the input struct are combined to write to the subcommand. Only the low 4bits of each used byte in the struct is used. This is written to stack initially, then copied to the actual cmd_argdata (the data immediately following the subcommandID byte). There's a total of 0x1D-bytes of cmd_argdata initialized from this.
No input, returns an output bool.


== SetButtonConfigEmbedded ==
The layout of cmd_argdata is as follows:
Takes ([10.0.0-10.2.0] an input [[#UniquePadId]]), a type-0x15 input buffer containing a [[#SystemButtonConfigEmbedded]], no output.
{| class="wikitable" border="1"
 
|-
== SetButtonConfigFull ==
! Offset || Size || Description
Takes an input [[#UniquePadId]], a type-0x15 input buffer containing a [[#SystemButtonConfigFull]], no output.
|-
 
| 0x0 || 0x1 || <nowiki>((TimeUnit & 0xF) | ((FrameCount & 0xF) << 4))</nowiki>
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], a type-0x15 input buffer containing a [[#SystemButtonConfigFull]], no output.
|-
 
| 0x1 || 0x1 || <nowiki>((CycleCount & 0xF) | ((InitialBrightness & 0xF) << 4))</nowiki>
== SetButtonConfigLeft ==
|-
Takes an input [[#UniquePadId]], a type-0x15 input buffer containing a [[#SystemButtonConfigLeft]], no output.
| 0x2 || 0x1 || <nowiki>((Frame2Brightness & 0xF) | ((Frame1Brightness & 0xF) << 4))</nowiki>
 
|-
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], a type-0x15 input buffer containing a [[#SystemButtonConfigLeft]], no output.
| 0x3 || 0x1 || <nowiki>((Frame1TimeToHold & 0xF) | ((Frame1TimeTowards & 0xF) << 4))</nowiki>
 
|-
== SetButtonConfigRight ==
| 0x4 || 0x1 || <nowiki>((Frame2TimeToHold & 0xF) | ((Frame2TimeTowards & 0xF) << 4))</nowiki>
Takes an input [[#UniquePadId]], a type-0x15 input buffer containing a [[#SystemButtonConfigRight]], no output.
|-
 
| 0x5 || 0x1 || <nowiki>((Frame4Brightness & 0xF) | ((Frame3Brightness & 0xF) << 4))</nowiki>
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], a type-0x15 input buffer containing a [[#SystemButtonConfigRight]], no output.
|-
 
| 0x6 || 0x1 || <nowiki>((Frame3TimeToHold & 0xF) | ((Frame3TimeTowards & 0xF) << 4))</nowiki>
== GetButtonConfigEmbedded ==
|-
Takes ([10.0.0-10.2.0] an input [[#UniquePadId]]), and a type-0x16 output buffer containing a [[#SystemButtonConfigEmbedded]].
| 0x7 || 0x1 || <nowiki>((Frame4TimeToHold & 0xF) | ((Frame4TimeTowards & 0xF) << 4))</nowiki>
 
|-
== GetButtonConfigFull ==
| 0x8 || 0x1 || <nowiki>((Frame6Brightness & 0xF) | ((Frame5Brightness & 0xF) << 4))</nowiki>
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#SystemButtonConfigFull]].
|-
 
| 0x9 || 0x1 || <nowiki>((Frame5TimeToHold & 0xF) | ((Frame5TimeTowards & 0xF) << 4))</nowiki>
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], and a type-0x16 output buffer containing a [[#SystemButtonConfigFull]].
|-
 
| 0xA || 0x1 || <nowiki>((Frame6TimeToHold & 0xF) | ((Frame6TimeTowards & 0xF) << 4))</nowiki>
== GetButtonConfigLeft ==
|-
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#SystemButtonConfigLeft]].
| 0xB || 0x1 || <nowiki>((Frame8Brightness & 0xF) | ((Frame7Brightness & 0xF) << 4))</nowiki>
|-
| 0xC || 0x1 || <nowiki>((Frame7TimeToHold & 0xF) | ((Frame7TimeTowards & 0xF) << 4))</nowiki>
|-
| 0xD || 0x1 || <nowiki>((Frame8TimeToHold & 0xF) | ((Frame8TimeTowards & 0xF) << 4))</nowiki>
|-
| 0xE || 0x1 || <nowiki>((Frame10Brightness & 0xF) | ((Frame9Brightness & 0xF) << 4))</nowiki>
|-
| 0xF || 0x1 || <nowiki>((Frame9TimeToHold & 0xF) | ((Frame9TimeTowards & 0xF) << 4))</nowiki>
|-
| 0x10 || 0x1 || <nowiki>((Frame10TimeToHold & 0xF) | ((Frame10TimeTowards & 0xF) << 4))</nowiki>
|-
| 0x11 || 0x1 || <nowiki>((Frame12Brightness & 0xF) | ((Frame11Brightness & 0xF) << 4))</nowiki>
|-
| 0x12 || 0x1 || <nowiki>((Frame11TimeToHold & 0xF) | ((Frame11TimeTowards & 0xF) << 4))</nowiki>
|-
| 0x13 || 0x1 || <nowiki>((Frame12TimeToHold & 0xF) | ((Frame12TimeTowards & 0xF) << 4))</nowiki>
|-
| 0x14 || 0x1 || <nowiki>((Frame14Brightness & 0xF) | ((Frame13Brightness & 0xF) << 4))</nowiki>
|-
| 0x15 || 0x1 || <nowiki>((Frame13TimeToHold & 0xF) | ((Frame13TimeTowards & 0xF) << 4))</nowiki>
|-
| 0x16 || 0x1 || <nowiki>((Frame14TimeToHold & 0xF) | ((Frame14TimeTowards & 0xF) << 4))</nowiki>
|-
| 0x17 || 0x1 || <nowiki>((Reserved & 0xF) | ((Frame15Brightness & 0xF) << 4))</nowiki>
|-
| 0x18 || 0x1 || <nowiki>((Frame15TimeToHold & 0xF) | ((Frame15TimeTowards & 0xF) << 4))</nowiki>
|-
| 0x19 || 0x1 || <nowiki>((Reserved & 0xF) | ((Reserved & 0xF) << 4))</nowiki>
|-
| 0x1A || 0x1 || <nowiki>((TimeTowardsFinalBrightness & 0xF) | ((FinalBrightness & 0xF) << 4))</nowiki>
|-
| 0x1B || 0x1 || <nowiki>(Timeout & 0xFF)</nowiki>
|-
| 0x1C || 0x1 || <nowiki>((Timeout >> 8) & 0xFF)</nowiki>
|}


[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], and a type-0x16 output buffer containing a [[#SystemButtonConfigLeft]].
[9.0.0+] This runs code similar to [[#SetNotificationLedPatternWithTimeout]], except it passes the following param values to an internal func: flag=1 and TimeSpan=0 (with [[#SetNotificationLedPatternWithTimeout]] these are flag=0 and TimeSpan={input value}).


== GetButtonConfigRight ==
== SetNotificationLedPatternWithTimeout ==
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#SystemButtonConfigRight]].
Takes an input [[#NotificationLedPattern]], an [[#UniquePadId]], and an s64 TimeSpan, no output.


[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], and a type-0x16 output buffer containing a [[#SystemButtonConfigRight]].
== PrepareHidsForNotificationWake ==
Takes a type-0x9 input buffer containing an array of [[#UniquePadId]], no output.


== IsCustomButtonConfigSupported ==
== IsUsbConnected ==
Takes an input [[#UniquePadId]], returns an output bool.
Tales an input [[#UniquePadId]], returns an output bool.


== IsDefaultButtonConfigEmbedded ==
== NotifyInputDetector ==
Takes a type-0x15 input buffer containing a [[#ButtonConfigEmbedded]], returns an output bool.
Takes an input u32 bitmask InputSourceId, no output.


This compares the input config with config in state, sets the output bool to whether these match, then returns 0.
This is the only hid:sys command used by USB-sysmodule (with value 0x40).


== IsDefaultButtonConfigFull ==
== GetHidbusSystemServiceObject ==
Takes a type-0x15 input buffer containing a [[#ButtonConfigFull]], returns an output bool.
No input, returns an [[#IHidbusSystemServer]].


This compares the input config with config in state, sets the output bool to whether these match, then returns 0.
== GetTouchScreenFirmwareVersion ==
No input. Returns a [[#FirmwareVersion]].


== IsDefaultButtonConfigLeft ==
This requests the current firmware version from the touch screen IC.
Takes a type-0x15 input buffer containing a [[#ButtonConfigLeft]], returns an output bool.


This compares the input config with config in state, sets the output bool to whether these match, then returns 0.
It first ensures the touch screen IC's chip id is one of the following:
0x7036 - Ftm4cd60d (STMicroelectronics FingerTipS FT9CJ/FT9CF)
0x4036 - Fst2ba61ya1


== IsDefaultButtonConfigRight ==
Then constructs the final firmware version as follows:
Takes a type-0x15 input buffer containing a [[#ButtonConfigRight]], returns an output bool.
uint32_t FtsVersion = GetFtsReleasedVer();    // Matches the xxxx value found in the FTS_xxxx.fts256 and FTS_xxxx.ftb firmware files.
uint8_t FtsVersionByte0 = (FtsVersion & 0xFF);
uint8_t FtsVersionByte1 = (FtsVersion & 0xFF00);
uint8_t FtsVersionByte2 = (FtsVersion & 0xFF0000);
uint8_t FtsVersionByte3 = (FtsVersion & 0xFF000000);
uint8_t FirmwareVersionByte0 = FtsVersionByte3;
uint8_t FirmwareVersionByte1 = FtsVersionByte2;
uint8_t FirmwareVersionByte2 = FtsVersionByte1;
uint8_t FirmwareVersionByte3 = FtsVersionByte0;
if (FtsVersionByte3 <= 0x31) {
    FirmwareVersionByte3 = 0;
    FirmwareVersionByte1 = 0;
    FirmwareVersionByte0 = 0x31;
    if (FtsVersionByte2 == 0x5) {
        FirmwareVersionByte2 = 2;
    } else if (FtsVersionByte2 == 0x12) {
        FirmwareVersionByte2 = 0;
    } else if (FtsVersionByte2 == 0x1A) {
        FirmwareVersionByte2 = 1;
    } else {
        // Throw error.
    }
}
uint8_t FirmwareVersion[0x10] = {0};
*(uint32_t *)FirmwareVersion = (FirmwareVersionByte3 << 24) | (FirmwareVersionByte2 << 16) | (FirmwareVersionByte1 << 8) | FirmwareVersionByte0;
*((uint32_t *)FirmwareVersion + 1) = 0x5354;  // "TS"
return FirmwareVersion;


This compares the input config with config in state, sets the output bool to whether these match, then returns 0.
== IsFirmwareAvailableForNotification ==
Takes a PID, a s32, an [[#UniquePadId]], an [[AM_services|AppletResourceUserId]], returns an output bool.


== IsButtonConfigStorageEmbeddedEmpty ==
sdknso uses hard-coded value 1 for the s32.
Takes an input s32 entry-index, returns an output bool.


[10.1.0-10.2.0] This will now Abort if the s32 is negative or >=5. [11.0.0+] This value must now be unsigned <=4, otherwise 0 is returned.
== CancelConnectionTrigger ==
Takes an input "nn::bluetooth::Address", no output.


Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then the output bool is set to [[Settings_services#ButtonConfigSettings|IsFull]] bit0 == 0. Then 0 is returned.
== IsButtonConfigSupported ==
Takes an input [[#UniquePadId]], returns an output bool.


== IsButtonConfigStorageFullEmpty ==
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], returns an output bool.
Takes an input s32 entry-index, returns an output bool.


Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.
== IsButtonConfigEmbeddedSupported ==
No input, returns an output bool.


== IsButtonConfigStorageLeftEmpty ==
== DeleteButtonConfig ==
Takes an input s32 entry-index, returns an output bool.
Takes an input [[#UniquePadId]], no output.


Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], no output.


== IsButtonConfigStorageRightEmpty ==
== DeleteButtonConfigEmbedded ==
Takes an input s32 entry-index, returns an output bool.
No input/output.


Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.
== SetButtonConfigEnabled ==
Takes an input bool, an [[#UniquePadId]], no output.


== GetButtonConfigStorageEmbeddedDeprecated ==
[11.0.0+] Takes an input bool, an [[Bluetooth_Driver_services#Address|Address]], no output.
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigEmbedded]].


[10.1.0-10.2.0] This will now Abort if the s32 is negative or >=5.
== SetButtonConfigEmbeddedEnabled ==
Takes an input bool, no output.


[11.0.0+] This now calls the same func internally as [[#GetButtonConfigStorageEmbedded]], except the [[#StorageName]] isn't exposed.
== IsButtonConfigEnabled ==
Takes an input [[#UniquePadId]], returns an output bool.


Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then an error is thrown if [[Settings_services#ButtonConfigSettings|IsFull]] bit0 is clear. Then the data at +0x1C8 is converted to [[#ButtonConfigEmbedded]], copied to output, and returns 0.
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], returns an output bool.


== GetButtonConfigStorageFullDeprecated ==
== IsButtonConfigEmbeddedEnabled ==
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigFull]].
No input, returns an output bool.


Same as [[#GetButtonConfigStorageEmbeddedDeprecated]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.
== SetButtonConfigEmbedded ==
Takes ([10.0.0-10.2.0] an input [[#UniquePadId]]), a type-0x15 input buffer containing a [[#SystemButtonConfigEmbedded]], no output.


== GetButtonConfigStorageLeftDeprecated ==
== SetButtonConfigFull ==
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigLeft]].
Takes an input [[#UniquePadId]], a type-0x15 input buffer containing a [[#SystemButtonConfigFull]], no output.


Same as [[#GetButtonConfigStorageEmbeddedDeprecated]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], a type-0x15 input buffer containing a [[#SystemButtonConfigFull]], no output.


== GetButtonConfigStorageRightDeprecated ==
== SetButtonConfigLeft ==
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigRight]].
Takes an input [[#UniquePadId]], a type-0x15 input buffer containing a [[#SystemButtonConfigLeft]], no output.


Same as [[#GetButtonConfigStorageEmbeddedDeprecated]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], a type-0x15 input buffer containing a [[#SystemButtonConfigLeft]], no output.


== SetButtonConfigStorageEmbeddedDeprecated ==
== SetButtonConfigRight ==
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigEmbedded]].
Takes an input [[#UniquePadId]], a type-0x15 input buffer containing a [[#SystemButtonConfigRight]], no output.


[10.1.0-10.2.0] This will now Abort if the s32 is negative or >=5.
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], a type-0x15 input buffer containing a [[#SystemButtonConfigRight]], no output.


[11.0.0+] This now calls the same func internally as [[#SetButtonConfigStorageEmbedded]], except the [[#StorageName]] isn't exposed.
== GetButtonConfigEmbedded ==
Takes ([10.0.0-10.2.0] an input [[#UniquePadId]]), and a type-0x16 output buffer containing a [[#SystemButtonConfigEmbedded]].


If the input config matches the [[#IsDefaultButtonConfigEmbedded|default]], this first does:
== GetButtonConfigFull ==
* Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. When [[Settings_services#ButtonConfigSettings|IsFull]] is set, the config is deleted the same way as [[#DeleteButtonConfigStorageEmbedded]] (following the IsFull check).
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#SystemButtonConfigFull]].


Afterwards, this uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. The input struct is converted, the output from that is copied to +0x1C8 size 0x3E0, IsFull is set, [[Settings_services#SetButtonConfigSettingsEmbedded|SetButtonConfigSettingsEmbedded]] is used with the updated array, and then returns 0.
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], and a type-0x16 output buffer containing a [[#SystemButtonConfigFull]].


== SetButtonConfigStorageFullDeprecated ==
== GetButtonConfigLeft ==
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigFull]].
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#SystemButtonConfigLeft]].


Same as [[#SetButtonConfigStorageEmbeddedDeprecated]], except this uses different setsys cmds, and uses a different structs etc.
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], and a type-0x16 output buffer containing a [[#SystemButtonConfigLeft]].


== SetButtonConfigStorageLeftDeprecated ==
== GetButtonConfigRight ==
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigLeft]].
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#SystemButtonConfigRight]].


Same as [[#SetButtonConfigStorageEmbeddedDeprecated]], except this uses different setsys cmds, and uses a different structs etc.
[11.0.0+] Takes an input [[Bluetooth_Driver_services#Address|Address]], and a type-0x16 output buffer containing a [[#SystemButtonConfigRight]].


== SetButtonConfigStorageRightDeprecated ==
== IsCustomButtonConfigSupported ==
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigRight]].
Takes an input [[#UniquePadId]], returns an output bool.


Same as [[#SetButtonConfigStorageEmbeddedDeprecated]], except this uses different setsys cmds, and uses a different structs etc.
== IsDefaultButtonConfigEmbedded ==
Takes a type-0x15 input buffer containing a [[#ButtonConfigEmbedded]], returns an output bool.


== DeleteButtonConfigStorageEmbedded ==
This compares the input config with config in state, sets the output bool to whether these match, then returns 0.
Takes an input s32 entry-index, no output.


[10.1.0-10.2.0] This will now Abort if the s32 is negative or >=5. [11.0.0+] When the input s32 is larger than unsigned value 4, an error is returned.
== IsDefaultButtonConfigFull ==
Takes a type-0x15 input buffer containing a [[#ButtonConfigFull]], returns an output bool.


Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then an error is thrown if [[Settings_services#ButtonConfigSettings|IsFull]] bit0 is clear. Then the data at +0x1C8 size 0x3E0 is cleared, IsFull bit0 is cleared, [[Settings_services#SetButtonConfigSettingsEmbedded|SetButtonConfigSettingsEmbedded]] is used with the updated array, and then returns 0.
This compares the input config with config in state, sets the output bool to whether these match, then returns 0.


== DeleteButtonConfigStorageFull ==
== IsDefaultButtonConfigLeft ==
Takes an input s32 entry-index, no output.
Takes a type-0x15 input buffer containing a [[#ButtonConfigLeft]], returns an output bool.


Same as [[#DeleteButtonConfigStorageEmbedded]] except with different setsys cmds.
This compares the input config with config in state, sets the output bool to whether these match, then returns 0.


== DeleteButtonConfigStorageLeft ==
== IsDefaultButtonConfigRight ==
Takes an input s32 entry-index, no output.
Takes a type-0x15 input buffer containing a [[#ButtonConfigRight]], returns an output bool.


Same as [[#DeleteButtonConfigStorageEmbedded]] except with different setsys cmds.
This compares the input config with config in state, sets the output bool to whether these match, then returns 0.


== DeleteButtonConfigStorageRight ==
== IsButtonConfigStorageEmbeddedEmpty ==
Takes an input s32 entry-index, no output.
Takes an input s32 entry-index, returns an output bool.


Same as [[#DeleteButtonConfigStorageEmbedded]] except with different setsys cmds.
[10.1.0-10.2.0] This will now Abort if the s32 is negative or >=5. [11.0.0+] This value must now be unsigned <=4, otherwise 0 is returned.


== IsUsingCustomButtonConfig ==
Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then the output bool is set to [[Settings_services#ButtonConfigSettings|IsFull]] bit0 == 0. Then 0 is returned.
Takes an input [[#UniquePadId]], returns an output bool.


== IsAnyCustomButtonConfigEnabled ==
== IsButtonConfigStorageFullEmpty ==
No input, returns an output bool.
Takes an input s32 entry-index, returns an output bool.


== SetAllCustomButtonConfigEnabled ==
Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.
Takes an input bool and an AppletResourceUserId, no output.


== SetDefaultButtonConfig ==
== IsButtonConfigStorageLeftEmpty ==
Takes an input [[#UniquePadId]], no output.
Takes an input s32 entry-index, returns an output bool.


== SetAllDefaultButtonConfig ==
Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.
No input/output.


== SetHidButtonConfigEmbedded ==
== IsButtonConfigStorageRightEmpty ==
Takes an input [[#UniquePadId]] and a type-0x15 input buffer containing a [[#ButtonConfigEmbedded]], no output.
Takes an input s32 entry-index, returns an output bool.


== SetHidButtonConfigFull ==
Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.
Takes an input [[#UniquePadId]] and a type-0x15 input buffer containing a [[#ButtonConfigFull]], no output.


== SetHidButtonConfigLeft ==
== GetButtonConfigStorageEmbeddedDeprecated ==
Takes an input [[#UniquePadId]] and a type-0x15 input buffer containing a [[#ButtonConfigLeft]], no output.
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigEmbedded]].
 
[10.1.0-10.2.0] This will now Abort if the s32 is negative or >=5.


== SetHidButtonConfigRight ==
[11.0.0+] This now calls the same func internally as [[#GetButtonConfigStorageEmbedded]], except the [[#StorageName]] isn't exposed.
Takes an input [[#UniquePadId]] and a type-0x15 input buffer containing a [[#ButtonConfigRight]], no output.


== GetHidButtonConfigEmbedded ==
Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then an error is thrown if [[Settings_services#ButtonConfigSettings|IsFull]] bit0 is clear. Then the data at +0x1C8 is converted to [[#ButtonConfigEmbedded]], copied to output, and returns 0.
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#ButtonConfigEmbedded]].


== GetHidButtonConfigFull ==
== GetButtonConfigStorageFullDeprecated ==
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#ButtonConfigFull]].
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigFull]].


== GetHidButtonConfigLeft ==
Same as [[#GetButtonConfigStorageEmbeddedDeprecated]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#ButtonConfigLeft]].


== GetHidButtonConfigRight ==
== GetButtonConfigStorageLeftDeprecated ==
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#ButtonConfigRight]].
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigLeft]].


== GetButtonConfigStorageEmbedded ==
Same as [[#GetButtonConfigStorageEmbeddedDeprecated]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.
Takes an input s32, a type-0x16 output buffer containing a [[#ButtonConfigEmbedded]], a type-0x1A output buffer containing a [[#StorageName]].


When the input s32 is larger than unsigned value 4, an error is returned.
== GetButtonConfigStorageRightDeprecated ==
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigRight]].


== GetButtonConfigStorageFull ==
Same as [[#GetButtonConfigStorageEmbeddedDeprecated]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.
Takes an input s32, a type-0x16 output buffer containing a [[#ButtonConfigFull]], a type-0x1A output buffer containing a [[#StorageName]].


== GetButtonConfigStorageLeft ==
== SetButtonConfigStorageEmbeddedDeprecated ==
Takes an input s32, a type-0x16 output buffer containing a [[#ButtonConfigLeft]], a type-0x1A output buffer containing a [[#StorageName]].
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigEmbedded]].


== GetButtonConfigStorageRight ==
[10.1.0-10.2.0] This will now Abort if the s32 is negative or >=5.
Takes an input s32, a type-0x16 output buffer containing a [[#ButtonConfigRight]], a type-0x1A output buffer containing a [[#StorageName]].


== SetButtonConfigStorageEmbedded ==
[11.0.0+] This now calls the same func internally as [[#SetButtonConfigStorageEmbedded]], except the [[#StorageName]] isn't exposed.
Takes an input s32, a type-0x15 input buffer containing a [[#ButtonConfigEmbedded]], a type-0x19 input buffer containing a [[#StorageName]].


When the input s32 is larger than unsigned value 4, this will immediately return (this cmd always returns 0 regardless).
If the input config matches the [[#IsDefaultButtonConfigEmbedded|default]], this first does:
* Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. When [[Settings_services#ButtonConfigSettings|IsFull]] is set, the config is deleted the same way as [[#DeleteButtonConfigStorageEmbedded]] (following the IsFull check).


== SetButtonConfigStorageFull ==
Afterwards, this uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. The input struct is converted, the output from that is copied to +0x1C8 size 0x3E0, IsFull is set, [[Settings_services#SetButtonConfigSettingsEmbedded|SetButtonConfigSettingsEmbedded]] is used with the updated array, and then returns 0.
Takes an input s32, a type-0x15 input buffer containing a [[#ButtonConfigFull]], a type-0x19 input buffer containing a [[#StorageName]].


== SetButtonConfigStorageLeft ==
== SetButtonConfigStorageFullDeprecated ==
Takes an input s32, a type-0x15 input buffer containing a [[#ButtonConfigLeft]], a type-0x19 input buffer containing a [[#StorageName]].
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigFull]].


== SetButtonConfigStorageRight ==
Same as [[#SetButtonConfigStorageEmbeddedDeprecated]], except this uses different setsys cmds, and uses a different structs etc.
Takes an input s32, a type-0x15 input buffer containing a [[#ButtonConfigRight]], a type-0x19 input buffer containing a [[#StorageName]].


== IHidbusSystemServer ==
== SetButtonConfigStorageLeftDeprecated ==
This is "nn::hidbus::IHidbusSystemServer".
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigLeft]].


This was added with [5.0.0+].
Same as [[#SetButtonConfigStorageEmbeddedDeprecated]], except this uses different setsys cmds, and uses a different structs etc.


{| class="wikitable" border="1"
== SetButtonConfigStorageRightDeprecated ==
|-
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigRight]].
! Cmd || Name
 
|-
Same as [[#SetButtonConfigStorageEmbeddedDeprecated]], except this uses different setsys cmds, and uses a different structs etc.
| 500 || SetAppletResourceUserId
 
|-
== DeleteButtonConfigStorageEmbedded ==
| 501 || RegisterAppletResourceUserId
Takes an input s32 entry-index, no output.
|-
 
| 502 || UnregisterAppletResourceUserId
[10.1.0-10.2.0] This will now Abort if the s32 is negative or >=5. [11.0.0+] When the input s32 is larger than unsigned value 4, an error is returned.
|}
 
Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then an error is thrown if [[Settings_services#ButtonConfigSettings|IsFull]] bit0 is clear. Then the data at +0x1C8 size 0x3E0 is cleared, IsFull bit0 is cleared, [[Settings_services#SetButtonConfigSettingsEmbedded|SetButtonConfigSettingsEmbedded]] is used with the updated array, and then returns 0.
 
== DeleteButtonConfigStorageFull ==
Takes an input s32 entry-index, no output.
 
Same as [[#DeleteButtonConfigStorageEmbedded]] except with different setsys cmds.


= hid:tmp =
== DeleteButtonConfigStorageLeft ==
This is "nn::hid::IHidTemporaryServer".
Takes an input s32 entry-index, no output.


This service was added with [3.0.0+], then removed with [8.0.0+].
Same as [[#DeleteButtonConfigStorageEmbedded]] except with different setsys cmds.


{| class="wikitable" border="1"
== DeleteButtonConfigStorageRight ==
|-
Takes an input s32 entry-index, no output.
! Cmd || Name
|-
| 0 || GetConsoleSixAxisSensorCalibrationValues
|}


= irs =
Same as [[#DeleteButtonConfigStorageEmbedded]] except with different setsys cmds.
This is "nn::irsensor::IIrSensorServer".


This was added to sdknso with 3.x.
== IsUsingCustomButtonConfig ==
Takes an input [[#UniquePadId]], returns an output bool.


With sdknso versions pre-4.x PointingProcessor used to be DpdProcessor. The [[#PackedPointingProcessorConfig|packed-config]] with DpdProcessor (besides RequiredMcuVersion) used to be initialized from user-specified config, now it's hard-coded.
== IsAnyCustomButtonConfigEnabled ==
No input, returns an output bool.


{| class="wikitable" border="1"
== SetAllCustomButtonConfigEnabled ==
|-
Takes an input bool and an AppletResourceUserId, no output.
! Cmd || Name
 
|-
== SetDefaultButtonConfig ==
| 302 || [[#ActivateIrsensor]]
Takes an input [[#UniquePadId]], no output.
|-
| 303 || [[#DeactivateIrsensor]]
|-
| 304 || [[#GetIrsensorSharedMemoryHandle]]
|-
| 305 || [[#StopImageProcessor]]
|-
| 306 || [[#RunMomentProcessor]]
|-
| 307 || [[#RunClusteringProcessor]]
|-
| 308 || [[#RunImageTransferProcessor]]
|-
| 309 || [[#GetImageTransferProcessorState]]
|-
| 310 || [[#RunTeraPluginProcessor]]
|-
| 311 || [[#GetNpadIrCameraHandle]]
|-
| 312 || [[#RunPointingProcessor]]
|-
| 313 || [[#SuspendImageProcessor]]
|-
| 314 || [3.0.0+] [[#CheckFirmwareVersion]]
|-
| 315 || [4.0.0+] [[#SetFunctionLevel]]
|-
| 316 || [4.0.0+] [[#RunImageTransferExProcessor]]
|-
| 317 || [4.0.0+] [[#RunIrLedProcessor]]
|-
| 318 || [4.0.0+] [[#StopImageProcessorAsync]]
|-
| 319 || [4.0.0+] [[#ActivateIrsensorWithFunctionLevel]]
|}


== ActivateIrsensor ==
== SetAllDefaultButtonConfig ==
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output.
No input/output.


== DeactivateIrsensor ==
== SetHidButtonConfigEmbedded ==
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output.
Takes an input [[#UniquePadId]] and a type-0x15 input buffer containing a [[#ButtonConfigEmbedded]], no output.


== GetIrsensorSharedMemoryHandle ==
== SetHidButtonConfigFull ==
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. Returns a SharedMemory handle.
Takes an input [[#UniquePadId]] and a type-0x15 input buffer containing a [[#ButtonConfigFull]], no output.


The SharedMemory is "nn::irsensor::detail::StatusManager". It's mapped with permission read-only and size 0x8000.
== SetHidButtonConfigLeft ==
Takes an input [[#UniquePadId]] and a type-0x15 input buffer containing a [[#ButtonConfigLeft]], no output.


It's structure is as follows:
== SetHidButtonConfigRight ==
Takes an input [[#UniquePadId]] and a type-0x15 input buffer containing a [[#ButtonConfigRight]], no output.


{| class="wikitable" border="1"
== GetHidButtonConfigEmbedded ==
|-
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#ButtonConfigEmbedded]].
! Offset || Size || Description
|-
| 0x0 || 0x7FB0 || Array of [[#DeviceFormat]]
|-
| 0x7FB0 || 0x50 || Array of [[#AruidFormat]]
|}


The array of [[#DeviceFormat]] is indexed by [[#IrCameraHandle|PlayerNumber]] and can hold up to 9 entries. The array of [[#AruidFormat]] can only hold up to 5 entries.
== GetHidButtonConfigFull ==
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#ButtonConfigFull]].


=== DeviceFormat ===
== GetHidButtonConfigLeft ==
{| class="wikitable" border="1"
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#ButtonConfigLeft]].
|-
 
! Offset || Size || Description
== GetHidButtonConfigRight ==
Takes an input [[#UniquePadId]], and a type-0x16 output buffer containing a [[#ButtonConfigRight]].
 
== GetButtonConfigStorageEmbedded ==
Takes an input s32, a type-0x16 output buffer containing a [[#ButtonConfigEmbedded]], a type-0x1A output buffer containing a [[#StorageName]].
 
When the input s32 is larger than unsigned value 4, an error is returned.
 
== GetButtonConfigStorageFull ==
Takes an input s32, a type-0x16 output buffer containing a [[#ButtonConfigFull]], a type-0x1A output buffer containing a [[#StorageName]].
 
== GetButtonConfigStorageLeft ==
Takes an input s32, a type-0x16 output buffer containing a [[#ButtonConfigLeft]], a type-0x1A output buffer containing a [[#StorageName]].
 
== GetButtonConfigStorageRight ==
Takes an input s32, a type-0x16 output buffer containing a [[#ButtonConfigRight]], a type-0x1A output buffer containing a [[#StorageName]].
 
== SetButtonConfigStorageEmbedded ==
Takes an input s32, a type-0x15 input buffer containing a [[#ButtonConfigEmbedded]], a type-0x19 input buffer containing a [[#StorageName]].
 
When the input s32 is larger than unsigned value 4, this will immediately return (this cmd always returns 0 regardless).
 
== SetButtonConfigStorageFull ==
Takes an input s32, a type-0x15 input buffer containing a [[#ButtonConfigFull]], a type-0x19 input buffer containing a [[#StorageName]].
 
== SetButtonConfigStorageLeft ==
Takes an input s32, a type-0x15 input buffer containing a [[#ButtonConfigLeft]], a type-0x19 input buffer containing a [[#StorageName]].
 
== SetButtonConfigStorageRight ==
Takes an input s32, a type-0x15 input buffer containing a [[#ButtonConfigRight]], a type-0x19 input buffer containing a [[#StorageName]].
 
== Cmd1470 ==
This is exclusive to S2.
 
This is likely SetSelectorUiPresentationPolicy?
 
Takes a PID, an u8 SelectorUiPresentationPolicy, an [[AM_services|AppletResourceUserId]], no output.
 
== Cmd1471 ==
This is exclusive to S2.
 
This is likely GetSelectorUiPresentationPolicy?
 
Takes a PID, an [[AM_services|AppletResourceUserId]], returns an output u8 SelectorUiPresentationPolicy.
 
== IHidbusSystemServer ==
This is "nn::hidbus::IHidbusSystemServer".
 
This was added with [5.0.0+].
 
{| class="wikitable" border="1"
|-
|-
| 0x0 || 0x4 || [[#IrCameraStatus]]
! Cmd || Name
|-
|-
| 0x4 || 0x4 || [[#IrCameraInternalStatus]]
| 500 || SetAppletResourceUserId
|-
|-
| 0x8 || 0x8 || [[#IrSensorMode]]
| 501 || RegisterAppletResourceUserId
|-
|-
| 0x10 || 0xE20 || [[#ProcessorStateRingLifo]]
| 502 || UnregisterAppletResourceUserId
|}
|}


==== ProcessorStateRingLifo ====
= hid:tmp =
This is "nn::irsensor::detail::RingLifo<X,Y>" where "X" is a specialized processor state (e.g.: "nn::irsensor::MomentProcessorState") and "Y" is the maximum element count (e.g.: 5).
This is "nn::hid::IHidTemporaryServer".
 
This service was added with [3.0.0+], then removed with [8.0.0+].


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Cmd || Name
|-
|-
| 0x0 || 0x8 || Start
| 0 || GetConsoleSixAxisSensorCalibrationValues
|-
| 0x8 || 0x4 || Count
|-
| 0xC || 0x4 || Padding
|-
| 0x10 || Variable || ProcessorState
|}
|}


The maximum element count is 6 for [[#PointingProcessorMarkerState]] or 5 for any of the other states.
= irs =
This is "nn::irsensor::IIrSensorServer".


ProcessorState is specialized depending on the value of [[#IrSensorMode]].
This was added to sdknso with 3.x.


===== MomentProcessorState =====
With sdknso versions pre-4.x PointingProcessor used to be DpdProcessor. The [[#PackedPointingProcessorConfig|packed-config]] with DpdProcessor (besides RequiredMcuVersion) used to be initialized from user-specified config, now it's hard-coded.
This is "nn::irsensor::MomentProcessorState".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Cmd || Name
|-
|-
| 0x0 || 0x8 || SamplingNumber
| 302 || [[#ActivateIrsensor]]
|-
|-
| 0x8 || 0x8 || TimeStamp
| 303 || [[#DeactivateIrsensor]]
|-
|-
| 0x10 || 0x4 || AmbientNoiseLevel
| 304 || [[#GetIrsensorSharedMemoryHandle]]
|-
|-
| 0x14 || 0x4 || Reserved
| 305 || [[#StopImageProcessor]]
|-
|-
| 0x18 || 0x240 || Array of [[#MomentStatistic]]
| 306 || [[#RunMomentProcessor]]
|}
 
The array of [[#MomentStatistic]] can hold up to 48 entries. This array can be accessed as [y + x*8] (this is a 6x8 array). region_x = image_x/6, region_y = image_y/8.
 
====== MomentStatistic ======
In sdknso GetMomentProcessorStates, this loops through each MomentProcessorState->MomentStatistic entry: <code>AverageIntensity *= scale;</code> The scale is calculated with: <code>scale = 76800.0f / (float)([[#PackedMomentProcessorConfig|WindowOfInterest]].width * [[#PackedMomentProcessorConfig|WindowOfInterest]].height);</code> Note that <code>76800 == 320*240</code>, hence with the default width/height the calculated scale is 1.0f.
 
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
| 307 || [[#RunClusteringProcessor]]
|-
|-
| 0x0 || 0x4 || float AverageIntensity
| 308 || [[#RunImageTransferProcessor]]
|-
|-
| 0x4 || 0x4 || float CentroidX
| 309 || [[#GetImageTransferProcessorState]]
|-
|-
| 0x8 || 0x4 || float CentroidY
| 310 || [[#RunTeraPluginProcessor]]
|}
 
===== ClusteringProcessorState =====
This is "nn::irsensor::ClusteringProcessorState".
 
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
| 311 || [[#GetNpadIrCameraHandle]]
|-
|-
| 0x0 || 0x8 || SamplingNumber
| 312 || [[#RunPointingProcessor]]
|-
|-
| 0x8 || 0x8 || TimeStamp
| 313 || [[#SuspendImageProcessor]]
|-
|-
| 0x10 || 0x1 || ObjectCount
| 314 || [3.0.0+] [[#CheckFirmwareVersion]]
|-
|-
| 0x11 || 0x3 || Reserved
| 315 || [4.0.0+] [[#SetFunctionLevel]]
|-
|-
| 0x14 || 0x4 || AmbientNoiseLevel
| 316 || [4.0.0+] [[#RunImageTransferExProcessor]]
|-
|-
| 0x18 || 0x180 || Array of [[#ClusteringData]]
| 317 || [4.0.0+] [[#RunIrLedProcessor]]
|-
| 318 || [4.0.0+] [[#StopImageProcessorAsync]]
|-
| 319 || [4.0.0+] [[#ActivateIrsensorWithFunctionLevel]]
|}
 
== ActivateIrsensor ==
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output.
 
== DeactivateIrsensor ==
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output.
 
== GetIrsensorSharedMemoryHandle ==
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. Returns a SharedMemory handle.
 
The SharedMemory is "nn::irsensor::detail::StatusManager". It's mapped with permission read-only and size 0x8000.
 
It's structure is as follows:
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x7FB0 || Array of [[#DeviceFormat]]
|-
| 0x7FB0 || 0x50 || Array of [[#AruidFormat]]
|}
|}


The array of [[#ClusteringData]] can hold up to 16 entries.
The array of [[#DeviceFormat]] is indexed by [[#IrCameraHandle|PlayerNumber]] and can hold up to 9 entries. The array of [[#AruidFormat]] can only hold up to 5 entries.


====== ClusteringData ======
=== DeviceFormat ===
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x4 || float AverageIntensity
| 0x0 || 0x4 || [[#IrCameraStatus]]
|-
| 0x4 || 0x4 || [[#IrCameraInternalStatus]]
|-
|-
| 0x4 || 0x4 || float CentroidX
| 0x8 || 0x8 || [[#IrSensorMode]]
|-
|-
| 0x8 || 0x4 || float CentroidY
| 0x10 || 0xE20 || [[#ProcessorStateRingLifo]]
|}
 
==== ProcessorStateRingLifo ====
This is "nn::irsensor::detail::RingLifo<X,Y>" where "X" is a specialized processor state (e.g.: "nn::irsensor::MomentProcessorState") and "Y" is the maximum element count (e.g.: 5).
 
{| class="wikitable" border="1"
|-
|-
| 0xC || 0x4 || PixelCount
! Offset || Size || Description
|-
|-
| 0x10 || 0x2 || BoundX
| 0x0 || 0x8 || Start
|-
|-
| 0x12 || 0x2 || BoundY
| 0x8 || 0x4 || Count
|-
|-
| 0x14 || 0x2 || BoundtWidth
| 0xC || 0x4 || Padding
|-
|-
| 0x16 || 0x2 || BoundHeight
| 0x10 || Variable || ProcessorState
|}
|}


===== PointingProcessorMarkerState =====
The maximum element count is 6 for [[#PointingProcessorMarkerState]] or 5 for any of the other states.
This is "nn::irsensor::PointingProcessorMarkerState".
 
ProcessorState is specialized depending on the value of [[#IrSensorMode]].
 
===== MomentProcessorState =====
This is "nn::irsensor::MomentProcessorState".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 2,582: Line 3,083:
| 0x8 || 0x8 || TimeStamp
| 0x8 || 0x8 || TimeStamp
|-
|-
| 0x10 || 0x1 || PointingStatus
| 0x10 || 0x4 || AmbientNoiseLevel
|-
|-
| 0x11 || 0x3 || Reserved
| 0x14 || 0x4 || Reserved
|-
|-
| 0x14 || 0x4 || Unknown
| 0x18 || 0x240 || Array of [[#MomentStatistic]]
|}
 
The array of [[#MomentStatistic]] can hold up to 48 entries. This array can be accessed as [y + x*8] (this is a 6x8 array). region_x = image_x/6, region_y = image_y/8.
 
====== MomentStatistic ======
In sdknso GetMomentProcessorStates, this loops through each MomentProcessorState->MomentStatistic entry: <code>AverageIntensity *= scale;</code> The scale is calculated with: <code>scale = 76800.0f / (float)([[#PackedMomentProcessorConfig|WindowOfInterest]].width * [[#PackedMomentProcessorConfig|WindowOfInterest]].height);</code> Note that <code>76800 == 320*240</code>, hence with the default width/height the calculated scale is 1.0f.
 
{| class="wikitable" border="1"
|-
|-
| 0x18 || 0x4 || float Unknown
! Offset || Size || Description
|-
|-
| 0x1C || 0x4 || float PositionX
| 0x0 || 0x4 || float AverageIntensity
|-
|-
| 0x20 || 0x4 || float PositionY
| 0x4 || 0x4 || float CentroidX
|-
|-
| 0x24 || 0x4 || float Unknown
| 0x8 || 0x4 || float CentroidY
|}
 
===== ClusteringProcessorState =====
This is "nn::irsensor::ClusteringProcessorState".
 
{| class="wikitable" border="1"
|-
|-
| 0x28 || 0x2 || WindowOfInterestX
! Offset || Size || Description
|-
|-
| 0x2A || 0x2 || WindowOfInterestY
| 0x0 || 0x8 || SamplingNumber
|-
|-
| 0x2C || 0x2 || WindowOfInterestWidth
| 0x8 || 0x8 || TimeStamp
|-
|-
| 0x2E || 0x2 || WindowOfInterestHeight
| 0x10 || 0x1 || ObjectCount
|-
|-
| 0x30 || 0x1 || PointingStatus
| 0x11 || 0x3 || Reserved
|-
|-
| 0x31 || 0x3 || Reserved
| 0x14 || 0x4 || AmbientNoiseLevel
|-
|-
| 0x34 || 0x4 || Unknown
| 0x18 || 0x180 || Array of [[#ClusteringData]]
|}
 
The array of [[#ClusteringData]] can hold up to 16 entries.
 
====== ClusteringData ======
{| class="wikitable" border="1"
|-
|-
| 0x38 || 0x4 || float Unknown
! Offset || Size || Description
|-
|-
| 0x3C || 0x4 || float PositionX
| 0x0 || 0x4 || float AverageIntensity
|-
|-
| 0x40 || 0x4 || float PositionY
| 0x4 || 0x4 || float CentroidX
|-
|-
| 0x44 || 0x4 || float Unknown
| 0x8 || 0x4 || float CentroidY
|-
|-
| 0x48 || 0x2 || WindowOfInterestX
| 0xC || 0x4 || PixelCount
|-
|-
| 0x4A || 0x2 || WindowOfInterestY
| 0x10 || 0x2 || BoundX
|-
|-
| 0x4C || 0x2 || WindowOfInterestWidth
| 0x12 || 0x2 || BoundY
|-
| 0x14 || 0x2 || BoundtWidth
|-
| 0x16 || 0x2 || BoundHeight
|}
 
===== PointingProcessorMarkerState =====
This is "nn::irsensor::PointingProcessorMarkerState".
 
{| class="wikitable" border="1"
|-
! Offset || Size || Description
|-
| 0x0 || 0x8 || SamplingNumber
|-
| 0x8 || 0x8 || TimeStamp
|-
| 0x10 || 0x1 || PointingStatus
|-
| 0x11 || 0x3 || Reserved
|-
| 0x14 || 0x4 || Unknown
|-
| 0x18 || 0x4 || float Unknown
|-
| 0x1C || 0x4 || float PositionX
|-
| 0x20 || 0x4 || float PositionY
|-
| 0x24 || 0x4 || float Unknown
|-
| 0x28 || 0x2 || WindowOfInterestX
|-
| 0x2A || 0x2 || WindowOfInterestY
|-
| 0x2C || 0x2 || WindowOfInterestWidth
|-
| 0x2E || 0x2 || WindowOfInterestHeight
|-
| 0x30 || 0x1 || PointingStatus
|-
| 0x31 || 0x3 || Reserved
|-
| 0x34 || 0x4 || Unknown
|-
| 0x38 || 0x4 || float Unknown
|-
| 0x3C || 0x4 || float PositionX
|-
| 0x40 || 0x4 || float PositionY
|-
| 0x44 || 0x4 || float Unknown
|-
| 0x48 || 0x2 || WindowOfInterestX
|-
| 0x4A || 0x2 || WindowOfInterestY
|-
| 0x4C || 0x2 || WindowOfInterestWidth
|-
|-
| 0x4E || 0x2 || WindowOfInterestHeight
| 0x4E || 0x2 || WindowOfInterestHeight
Line 3,003: Line 3,582:
= xcd:sys =
= xcd:sys =
This is "nn::xcd::detail::ISystemServer".
This is "nn::xcd::detail::ISystemServer".
This was removed with [19.0.0+].


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 3,348: Line 3,929:
| 0x400
| 0x400
| [16.0.0+] [[#MouseSharedMemoryFormat|DebugMouse]]
| [16.0.0+] [[#MouseSharedMemoryFormat|DebugMouse]]
|-
| 0x3E200
| ?
| [?+] NpadCondition
|}
|}


Line 3,892: Line 4,477:
===== DigitizerState =====
===== DigitizerState =====
This is "nn::hid::DigitizerState".
This is "nn::hid::DigitizerState".
This is managed by the sysmodule "cs" (development only) through [[HID_services#hid:dbg|hid:dbg]] commands. No actual physical device is supported on NX.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 4,372: Line 4,959:
|-
|-
| 0x160
| 0x160
| 0x40
| 0x60
| [[#SixAxisSensorUserCalibrationStateLifo]]
| [[#SixAxisSensorUserCalibrationStateLifo]]
|-
|-
| 0x1A0
| 0x1C0
| 0x40
| 0x20
| UniquePadConfigMutex
| UniquePadConfigMutex
|}
|}
Line 4,780: Line 5,367:
|-
|-
| 0x4208
| 0x4208
| 0x40
| 0x20
| [1.0.0-8.1.0] Mutex
| [1.0.0-8.1.0] Mutex
|-
|-
Line 7,279: Line 7,866:
| "FK" || Pro Controller
| "FK" || Pro Controller
|-
|-
| "MY" || [[#DeviceTypeInternal|DeviceType]] 4 and [[#DeviceTypeInternal|DeviceType]] 5
| "MY" || MiyabiLeft and MiyabiRight
|-
|-
| "LC" || "Tarragon" ([[#DeviceTypeInternal|DeviceType]] 6) and [[#DeviceTypeInternal|DeviceType]] 30
| "LC" || Tarragon and Tarragon2
|-
|-
| "HL" || Famicom left controller
| "HL" || Famicom left controller
Line 7,666: Line 8,253:
= DeviceTypeInternal =
= DeviceTypeInternal =
This is "nn::hid::detail::DeviceTypeInternal".
This is "nn::hid::detail::DeviceTypeInternal".
[9.0.0+] This has been superseded by [[#DeviceType_2|DeviceType]].


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 7,702: Line 8,291:
|}
|}


[9.0.0+] This is "nn::hidtypes::DeviceType".
= DeviceType =
This is "nn::hidtypes::DeviceType".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
!  Value
!  Value
!  [[#DeviceType|DeviceType]]
!  [[#UniquePadType|UniquePadType]]
!  [[#AppletDetailedUiType|AppletDetailedUiType]]
!  Description
!  Description
|-
|-
| 0 || || || || Invalid
| 0 || Unknown
|-
|-
| 1 || JoyRight, HandheldRight || RightController || JoyDual, JoyRightHorizontal, JoyRightVertical, JoyDualRightOnly, HandheldJoyConRightOnly, HandheldJoyConLeftJoyConRight, HandheldLarkHvc1JoyConRight, HandheldLarkNesLeftJoyConRight, HandheldNone || Joy-Con right controller (USB PID 0x2007)
| 1 || [[#JoyConRight|JoyConRight]]
|-
|-
| 2 || JoyLeft, HandheldLeft || LeftController || JoyDual, JoyLeftHorizontal, JoyLeftVertical, JoyDualLeftOnly, HandheldJoyConLeftOnly, HandheldJoyConLeftJoyConRight, HandheldJoyConLeftLarkHvc2, HandheldJoyConLeftLarkNesRight, HandheldNone || Joy-Con left controller (USB PID 0x2006)
| 2 || [[#JoyConLeft|JoyConLeft]]
|-
|-
| 3 || FullKey || FullKeyController || SwitchProController || Pro Controller (USB PID 0x2009)
| 3 || [[#SwitchProController|SwitchProController]]
|-
|-
| 4 || JoyLeft || LeftController || ||
| 4 || MiyabiLeft
|-
|-
| 5 || JoyRight || RightController || ||
| 5 || MiyabiRight
|-
|-
| 6 || FullKey || FullKeyController || || "Tarragon" controller
| 6 || [[#Tarragon|Tarragon]]
|-
|-
| 7 || LarkHvcLeft, HandheldLarkHvcLeft || LeftController || LarkHvc1, HandheldLarkHvc1Only, HandheldLarkHvc1JoyConRight, HandheldLarkHvc1LarkHvc2, HandheldLarkHvc1LarkNesRight, HandheldNone || Famicom left controller
| 7 || [[#LarkH1|LarkH1]]
|-
|-
| 8 || LarkHvcRight, HandheldLarkHvcRight || RightController || LarkHvc2, HandheldLarkHvc2Only, HandheldJoyConLeftLarkHvc2, HandheldLarkHvc1LarkHvc2, HandheldLarkNesLeftLarkHvc2, HandheldNone || Famicom right controller (with microphone)
| 8 || [[#LarkH2|LarkH2]]
|-
|-
| 9 || LarkNesLeft, HandheldLarkNesLeft || LeftController || LarkNesLeft, HandheldLarkNesLeftOnly, HandheldLarkNesLeftJoyConRight, HandheldLarkNesLeftLarkHvc2, HandheldLarkNesLeftLarkNesRight, HandheldNone || NES left controller
| 9 || [[#LarkNL|LarkNL]]
|-
|-
| 10 || LarkNesRight, HandheldLarkNesRight || RightController || LarkNesRight, HandheldLarkNesRightOnly, HandheldJoyConLeftLarkNesRight, HandheldLarkHvc1LarkNesRight, HandheldLarkNesLeftLarkNesRight, HandheldNone || NES right controller
| 10 || [[#LarkNR|LarkNR]]
|-
|-
| 11 || Lucia || FullKeyController || LuciaU, LuciaJ, LuciaE || SNES controller (USB PID 0x2017)
| 11 || [[#Lucia|Lucia]]
|-
|-
| 12 || Palma || Embedded || Unknown || Poké Ball Plus controller
| 12 || [[#Palma|Palma]]
|-
|-
| 13 || FullKey || FullKeyController || || Gc controller
| 13 || [[#GcOnGggg|GcOnGggg]]
|-
|-
| 14 || HandheldLeft || LeftController || || "Fifty" left controller
| 14 || FiftyL
|-
|-
| 15 || FullKey || FullKeyController || ||
| 15 || UsbPad
|-
|-
| 16 || FullKey || FullKeyController || ||
| 16 || WinGenericPad
|-
|-
| 17 || DebugPad || DebugPadController || Verification || Debug controller
| 17 || Sio
|-
|-
| 18 || HandheldRight || RightController || || "Fifty" right controller
| 18 || FiftyR
|-
|-
| 19 || System || Embedded || CompatibleProController || Third party Pro Controller
| 19 || DebugSwitchProControllerCompatibleDevice
|-
|-
| 20 || System || Embedded || CompatibleJoyCon, HandheldNone || Third party Joy-Con right controller
| 20 || DebugJoyConLeftCompatibleDevice
|-
|-
| 21 || System || Embedded || CompatibleJoyCon, HandheldNone || Third party Joy-Con left controller
| 21 || DebugJoyConRightCompatibleDevice
|-
|-
| [12.0.0+] 22 || Lagon || FullKeyController || Lagon || N64 controller (USB PID 0x2019)
| 22 || [12.0.0+] [[#Lagon|Lagon]]
|-
|-
| [12.0.0+] 23 || || || || Joy-Con Charging Grip (USB PID 0x200E)
| 23 || [12.0.0+] [[#ExternalGrip|ExternalGrip]]
|-
|-
| [13.0.0+] 24 || || || || "Kotetsu" (Pro Controller MCU) in DFU mode (USB PID 0x200F)
| 24 || [13.0.0+] [[#SwitchProControllerDfu|SwitchProControllerDfu]]
|-
|-
| [13.0.0+] 25 || || || || "Kuina" (Joy-Con Charging Grip MCU) in DFU mode (USB PID 0x2008)
| 25 || [13.0.0+] [[#ExternalGripDfu|ExternalGripDfu]]
|-
|-
| [13.0.0+] 26 || || || || SNES controller MCU in DFU mode (USB PID 0x2018)
| 26 || [13.0.0+] [[#LuciaDfu|LuciaDfu]]
|-
|-
| [13.0.0+] 27 || || || || N64 controller MCU in DFU mode (USB PID 0x201A)
| 27 || [13.0.0+] [[#LagonDfu|LagonDfu]]
|-
|-
| [13.0.0+] 28 || Lager || FullKeyController || || Sega Genesis controller (USB PID 0x201E)
| 28 || [13.0.0+] [[#Lager|Lager]]
|-
|-
| [14.0.0+] 29 || || || || Sega Genesis controller MCU in DFU mode (USB PID 0x201F)
| 29 || [14.0.0+] [[#LagerDfu|LagerDfu]]
|-
|-
| [14.0.0+] 30 || FullKey || FullKeyController || ||
| 30 || [14.0.0+] [[#Tarragon2|Tarragon2]]
|}
|}
== JoyConRight ==
[[Joy-Con|Joy-Con]] right controller.
== JoyConLeft ==
[[Joy-Con|Joy-Con]] left controller.
== SwitchProController ==
[[Pro_Controller|Pro Controller]].
== Tarragon ==
Licensed Pro Controller.
== LarkH1 ==
Famicom left controller.
== LarkH2 ==
Famicom right controller (with microphone).
== LarkNL ==
NES left controller.
== LarkNR ==
NES right controller.
== Lucia ==
SNES controller.
== Palma ==
Poké Ball Plus controller.
== GcOnGggg ==
GameCube controller.
== Lagon ==
N64 controller.
== ExternalGrip ==
Joy-Con Charging Grip.
== SwitchProControllerDfu ==
"Kotetsu" (Pro Controller MCU) in DFU mode.
== ExternalGripDfu ==
"Kuina" (Joy-Con Charging Grip MCU) in DFU mode.
== LuciaDfu ==
SNES controller MCU in DFU mode.
== LagonDfu ==
N64 controller MCU in DFU mode.
== Lager ==
Sega Genesis controller.
== LagerDfu ==
Sega Genesis controller MCU in DFU mode.
== Tarragon2 ==
Licensed Pro Controller.


= VidPidDefinition =
= VidPidDefinition =
Line 7,809: Line 8,456:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Vid || PidRangeMax || PidRangeMin || [[#DeviceTypeInternal|DeviceType]]
! Vid || PidRangeMax || PidRangeMin || [[#DeviceTypeInternal|DeviceType]] || Description
|-
|-
| 0x57E || 0x2006 || 0x2006 || 2
| 0x57E || 0x2006 || 0x2006 || 2 || Nintendo [[HID_services#JoyConLeft|JoyConLeft]]
|-
|-
| 0x57E || 0x2007 || 0x2007 || 1  
| 0x57E || 0x2007 || 0x2007 || 1 || Nintendo [[HID_services#JoyConRight|JoyConRight]]
|-
|-
| 0x57E || 0x2009 || 0x2009 || 3
| 0x57E || 0x2009 || 0x2009 || 3 || Nintendo [[HID_services#SwitchProController|SwitchProController]]
|-
|-
| 0x57E || 0x200F || 0x200F || 24
| 0x57E || 0x200F || 0x200F || 24 || Nintendo [[HID_services#SwitchProControllerDfu|SwitchProControllerDfu]]
|-
|-
| 0x57E || 0x200E || 0x200E || 23  
| 0x57E || 0x200E || 0x200E || 23 || Nintendo [[HID_services#ExternalGrip|ExternalGrip]]
|-
|-
| 0x57E || 0x2008 || 0x2008 || 25  
| 0x57E || 0x2008 || 0x2008 || 25 || Nintendo [[HID_services#ExternalGripDfu|ExternalGripDfu]]
|-
|-
| 0x57E || 0x2017 || 0x2017 || 11
| 0x57E || 0x2017 || 0x2017 || 11 || Nintendo [[HID_services#Lucia|Lucia]]
|-
|-
| 0x57E || 0x2018 || 0x2018 || 26
| 0x57E || 0x2018 || 0x2018 || 26 || Nintendo [[HID_services#LuciaDfu|LuciaDfu]]
|-
|-
| 0x57E || 0x2019 || 0x2019 || 22
| 0x57E || 0x2019 || 0x2019 || 22 || Nintendo [[HID_services#Lagon|Lagon]]
|-
|-
| 0x57E || 0x201A || 0x201A || 27
| 0x57E || 0x201A || 0x201A || 27 || Nintendo [[HID_services#LagonDfu|LagonDfu]]
|-
|-
| 0x57E || 0x201E || 0x201E || 28
| 0x57E || 0x201E || 0x201E || 28 || Nintendo [[HID_services#Lager|Lager]]
|-
|-
| 0x57E || 0x201F || 0x201F || 29
| 0x57E || 0x201F || 0x201F || 29 || Nintendo [[HID_services#LagerDfu|LagerDfu]]
|-
|-
| 0x57E || 0x337 || 0x337 || 13
| 0x57E || 0x337 || 0x337 || 13 || Nintendo [[HID_services#GcOnGggg|GcOnGggg]]
|-
|-
| 0xF0D || 0x92 || 0x92 || 15
| 0x57E || 0x300E || 0x300E || [17.0.0+] 18 || Nintendo FiftyR
|-
|-
| 0xF0D || 0xAB || 0xAA || 15
| 0x57E || 0x300D || 0x300D || [17.0.0+] 14 || Nintendo FiftyL
|-
|-
| 0xF0D || 0xC1 || 0xC1 || 15
| 0xF0D || 0x92 || 0x92 || 15 || HORI Pokken Tournament DX Pro Pad
|-
|-
| 0xF0D || 0xFF || 0xF0 || 15
| 0xF0D || 0xAB || 0xAA || 15 || HORI
|-
|-
| 0xF0D || 0x22F || 0x200 || 15
| 0xF0D || 0xC1 || 0xC1 || 15 || HORIPAD for Nintendo Switch
|-
|-
| 0xE6F || 0x193 || 0x180 || 15
| 0xF0D || 0xFF || 0xF0 || 15 || HORI
|-
|-
| 0x20D6 || 0xA719 || 0xA710 || 15
| 0xF0D || 0x22F || 0x200 || [1.0.0-20.0.1] 15 || HORI
|-
|-
| 0x20D6 || 0xA729 || 0xA720 || 15
| 0xF0D || 0x201 || 0x200 || [20.1.0+] 15 || HORI Split Pad Pro
|-
|-
| 0x33DD || 0xB || 0x1 || 15
| 0xF0D || 0x202 || 0x202 || [20.1.0+] 15 || HORI
|-
| 0xF0D || 0x21F || 0x203 || [20.1.0+] 15 || HORI
|-
| 0xF0D || 0x25F || 0x220 || [20.1.0+] 15 || HORI
|-
| 0xF0D || 0x27F || 0x260 || [20.1.0+] 15 || HORI
|-
| 0xE6F || 0x193 || 0x180 || 15 || PDP
|-
| 0x20D6 || 0xA719 || 0xA710 || [1.0.0-20.0.1] 15 || PowerA
|-
| 0x20D6 || 0xA729 || 0xA720 || [1.0.0-20.0.1] 15 || PowerA
|-
| 0x20D6 || 0xA716 || 0xA710 || [20.1.0+] 15 || PowerA
|-
| 0x20D6 || 0xA717 || 0xA717 || [20.1.0+] 15 || PowerA
|-
| 0x20D6 || 0xA719 || 0xA718 || [20.1.0+] 15 || PowerA
|-
| 0x20D6 || 0xA720 || 0xA720 || [20.1.0+] 15 || PowerA
|-
| 0x20D6 || 0xA721 || 0xA721 || [20.1.0+] 15 || PowerA
|-
| 0x20D6 || 0xA726 || 0xA722 || [20.1.0+] 15 || PowerA
|-
| 0x20D6 || 0xA731 || 0xA727 || [20.1.0+] 15 || PowerA
|-
| 0x33DD || 0xB || 0x1 || 15 || ZUIKI
|}
|}


Line 7,878: Line 8,553:
|-
|-
| 0x8
| 0x8
| 0x6
| 0x4
| [[#BatteryLevel|BatteryLevel]]
| [[#BatteryLevel|BatteryLevel]]
|}
|}
Line 8,337: Line 9,012:
|-
|-
| 0x0 || 0x8 || Buttons (only bit0 is used)
| 0x0 || 0x8 || Buttons (only bit0 is used)
|}
= DigitizerAutoPilotState =
This is "nn::hid::debug::DigitizerAutoPilotState".
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x0 || 0x44 ||
|}
|}


Line 10,019: Line 10,706:
* '''ExpectVersionInfo.csv'''
* '''ExpectVersionInfo.csv'''
** List in the format "[device],[type],[version]" where "device" can be "JoyLeft", "JoyRight", "FullKey", "Palma" or "Handheld", "type" can be "BT", "MCU", "USB" or "SioH" and "version" is the hexadecimal representation of the firmware file's version.
** List in the format "[device],[type],[version]" where "device" can be "JoyLeft", "JoyRight", "FullKey", "Palma" or "Handheld", "type" can be "BT", "MCU", "USB" or "SioH" and "version" is the hexadecimal representation of the firmware file's version.
* [S2] [20.1.1+] '''ExpectVersionInfo.json'''
* '''FirmwareInfo.csv'''
* '''FirmwareInfo.csv'''
** List in the format "[device],[type],[version],[file]" where "device", "type" and "version" should match the values from "ExpectVersionInfo" and "file" is the name of the firmware file.
** List in the format "[device],[type],[version],[file]" where "device", "type" and "version" should match the values from "ExpectVersionInfo" and "file" is the name of the firmware file.
Line 10,037: Line 10,725:
* [6.1.0+] '''PalmaFw.bin'''
* [6.1.0+] '''PalmaFw.bin'''
** Poké Ball Plus BT firmware.
** Poké Ball Plus BT firmware.
* [8.1.1+] '''ExpectVersionInfo-platform.hoag.csv'''
* [S1] [8.1.1+] '''ExpectVersionInfo-platform.hoag.csv'''
** Same as "ExpectVersionInfo.csv" but for the Switch Lite platform.
** Same as "ExpectVersionInfo.csv" but for the Switch Lite platform.
* [8.1.1+] '''FirmwareInfo-platform.hoag.csv'''
* [S1] [8.1.1+] '''FirmwareInfo-platform.hoag.csv'''
** Same as "FirmwareInfo.csv" but for the Switch Lite platform.
** Same as "FirmwareInfo.csv" but for the Switch Lite platform.
* [8.1.1+] '''sioh.bin'''
* [S1] [8.1.1+] '''sioh.bin'''
** Switch Lite Joy-Con firmware.  
** Switch Lite Joy-Con firmware.  
* [8.1.1+] '''sioh_iap.bin'''
* [S1] [8.1.1+] '''sioh_iap.bin'''
** Switch Lite Joy-Con (IAP profile) firmware.
** Switch Lite Joy-Con (IAP profile) firmware.
* [10.0.0+] '''FTS_00120100.fts256'''
* [S1] [10.0.0+] '''FTS_00120100.fts256'''
** Touch Screen controller firmware in FTS256 format.
** Touch Screen controller firmware in FTS256 format.
* [10.0.0+] '''FTS_32000001.fts256'''
* [S1] [10.0.0+] '''FTS_32000001.fts256'''
** Touch Screen controller firmware in FTS256 format for panel vendor "Nissha".
** Touch Screen controller firmware in FTS256 format for panel vendor "Nissha".
* [10.0.0+] '''FTS_32000102.fts256'''
* [S1] [10.0.0+] '''FTS_32000102.fts256'''
** Touch Screen controller firmware in FTS256 format for panel vendor "GIS".
** Touch Screen controller firmware in FTS256 format for panel vendor "GIS".
* [10.0.0+] '''FTS_32000302.fts256'''
* [S1] [10.0.0+] '''FTS_32000302.fts256'''
** Touch Screen controller firmware in FTS256 format for panel vendor "Nissha_Hoag".
** Touch Screen controller firmware in FTS256 format for panel vendor "Nissha_Hoag".
* [10.0.0+] '''FTS_32000402.fts256'''
* [S1] [10.0.0+] '''FTS_32000402.fts256'''
** Touch Screen controller firmware in FTS256 format for panel vendor "GIS_Hoag".
** Touch Screen controller firmware in FTS256 format for panel vendor "GIS_Hoag".
* [10.0.0+] '''TouchScreenConfiguration.csv'''
* [S1] [10.0.0+] '''TouchScreenConfiguration.csv'''
** List in the format "[gpio],[gpio],[gpio],[config],[config]" where "gpio" can be "0" or "1" and "config" is an integer number.
** List in the format "[gpio],[gpio],[gpio],[config],[config]" where "gpio" can be "0" or "1" and "config" is an integer number.
* [10.0.0+] '''TouchScreenFirmwareInfo.csv'''
* [10.0.0+] '''TouchScreenFirmwareInfo.csv'''
** List in the format "[driver],[gpio],[gpio],[gpio],[version],[file]" where "driver" can be "FTM" or "FST2", "gpio" can be "0" or "1", "version" is the hexadecimal representation of the firmware file's version and "file" is the name of the firmware file.
** List in the format "[driver],[gpio],[gpio],[gpio],[version],[file]" where "driver" can be "FTM" or "FST2", "gpio" can be "0" or "1", "version" is the hexadecimal representation of the firmware file's version and "file" is the name of the firmware file.
** With [S2] there's only a single hex-value field between "driver" and "file". "driver" is "Innolux" or "Sharp".
* [13.0.0+] '''FTS_33000510.fts256'''
* [13.0.0+] '''FTS_33000510.fts256'''
** Touch Screen controller firmware in FTS256 format for panel vendor "Samsung_Aula".
** Touch Screen controller firmware in FTS256 format for panel vendor "Samsung_Aula".
Line 10,065: Line 10,754:
* [13.1.0-13.2.1] '''FTS_50000001.ftb'''
* [13.1.0-13.2.1] '''FTS_50000001.ftb'''
** Touch Screen controller firmware in FTB format for panel vendor "Nissha".
** Touch Screen controller firmware in FTB format for panel vendor "Nissha".
* [14.0.0+] '''FTS_50000002.ftb'''
* [S1] [14.0.0+] '''FTS_50000002.ftb'''
** Touch Screen controller firmware in FTB format for panel vendor "Nissha".
** Touch Screen controller firmware in FTB format for panel vendor "Nissha".
* [S2] [20.1.1+] '''JoyLeftImage1.json'''
* [S2] [20.1.1+] '''JoyLeftImage2.json'''
* [S2] [20.1.1+] '''JoyRightImage1.json'''
* [S2] [20.1.1+] '''JoyRightImage2.json'''
* [S2] '''NT36683_INX.bin'''
** Touch Screen controller firmware for panel vendor "Innolux".
* [S2] '''NT36683_SHP.bin'''
** Touch Screen controller firmware for panel vendor "Sharp".
* [S2] [20.1.1+] '''OunceJoyLeft.bin'''
* [S2] [20.1.1+] '''OunceJoyLeftBtPatch.bin'''
* [S2] [20.1.1+] '''OunceJoyRight.bin'''
* [S2] [20.1.1+] '''OunceJoyRightBtPatch.bin'''
* [S2] [20.1.1+] '''OunceProCon.bin'''
* [S2] [20.1.1+] '''OunceProConBtPatch.bin'''
* [S2] [20.1.1+] '''OunceProConDspFirmware.img'''
* [S2] [20.1.1+] '''ProConImage1.json'''
* [S2] [20.1.1+] '''ProConImage2.json'''
* [S2] [20.1.1+] '''ProConImage3.json'''


== Versions ==
== Versions ==
Line 10,088: Line 10,795:
|-
|-
| [8.0.0+]
| [8.0.0+]
| 03B5
| 03B5
|-
|-
| [9.0.0+]
| [9.0.0+]
| 0400
| 0400
|-
|-
| [10.0.0+]
| [10.0.0+]
| 0406
| 0406
|-
|-
| [11.0.0+]
| [11.0.0+]
| 0407
| 0407
|-
|-
| [12.1.0+]
| [12.1.0+]
| 0410
| 0410
|-
|-
| [13.0.0+]
| [13.0.0+]
| 0417
| 0417
|-
|-
| [14.0.0+]
| [14.0.0+]
| 0419
| 0419
|}
|-
 
| [21.0.0+]
=== Raizo ===
| 0420
{| class="wikitable" border="1"
|}
|-
 
! SystemVersion
=== Raizo ===
! FirmwareVersion
{| class="wikitable" border="1"
|-
|-
| [1.0.0+]
! SystemVersion
| 0348
! FirmwareVersion
|-
| [1.0.0+]
| 0348
|-
| [15.0.0+]
| 0421
|}
 
=== Tera ===
{| class="wikitable" border="1"
|-
! SystemVersion
! FirmwareVersion
|-
| [1.0.0+]
| 030B
|-
| [4.0.0+]
| 0412
|-
| [5.0.0+]
| 0518
|-
| [6.0.0+]
| 061A
|-
| [8.0.0+]
| 081B
|-
| [20.1.0+]
| 0920
|}
 
=== TeraFullKey ===
{| class="wikitable" border="1"
|-
! SystemVersion
! FirmwareVersion
|-
| [1.0.0+]
| 0305
|-
|-
| [15.0.0+]
| [20.1.0+]
| 0421
| 0403
|}
 
=== Tera ===
{| class="wikitable" border="1"
|-
! SystemVersion
! FirmwareVersion
|-
| [1.0.0+]
| 030B
|-
| [4.0.0+]
| 0412
|-
| [5.0.0+]
| 0518
|-
| [6.0.0+]
| 061A
|-
| [8.0.0+]
| 081B
|}
 
=== TeraFullKey ===
{| class="wikitable" border="1"
|-
! SystemVersion
! FirmwareVersion
|-
| [1.0.0+]
| 0305
|}
|}