Changes

Jump to navigation Jump to search
5,371 bytes added ,  18:26, 28 November 2019
Line 90: Line 90:  
| 102 || [[#SetSupportedNpadIdType]]
 
| 102 || [[#SetSupportedNpadIdType]]
 
|-
 
|-
| 103 || ActivateNpad
+
| 103 || [[#ActivateNpad]]
 
|-
 
|-
| 104 || DeactivateNpad
+
| 104 || [[#DeactivateNpad]]
 
|-
 
|-
 
| 106 || [[#AcquireNpadStyleSetUpdateEventHandle]]
 
| 106 || [[#AcquireNpadStyleSetUpdateEventHandle]]
Line 100: Line 100:  
| 108 || GetPlayerLedPattern
 
| 108 || GetPlayerLedPattern
 
|-
 
|-
| 109 || [5.0.0+] ActivateNpadWithRevision
+
| 109 || [5.0.0+] [[#ActivateNpadWithRevision]]
 
|-
 
|-
| 120 || SetNpadJoyHoldType
+
| 120 || [[#SetNpadJoyHoldType]]
 
|-
 
|-
| 121 || GetNpadJoyHoldType
+
| 121 || [[#GetNpadJoyHoldType]]
 
|-
 
|-
 
| 122 || [[#SetNpadJoyAssignmentModeSingleByDefault]]
 
| 122 || [[#SetNpadJoyAssignmentModeSingleByDefault]]
Line 160: Line 160:  
| 211 || [7.0.0+] [[#IsVibrationDeviceMounted]]
 
| 211 || [7.0.0+] [[#IsVibrationDeviceMounted]]
 
|-
 
|-
| 300 || [3.0.0+] ActivateConsoleSixAxisSensor
+
| 300 || [3.0.0+] [[#ActivateConsoleSixAxisSensor]]
 
|-
 
|-
 
| 301 || [3.0.0+] StartConsoleSixAxisSensor
 
| 301 || [3.0.0+] StartConsoleSixAxisSensor
Line 196: Line 196:  
| 406 || [4.0.0+] GetNpadLeftRightInterfaceType
 
| 406 || [4.0.0+] GetNpadLeftRightInterfaceType
 
|-
 
|-
| 407 || [9.0.0+]  
+
| 407 || [9.0.0+] GetNpadOfHighestBatteryLevelForJoyLeft
 
|-
 
|-
| 408 || [9.0.0+]  
+
| 408 || [9.0.0+] GetNpadOfHighestBatteryLevelForJoyRight
 
|-
 
|-
 
| 500 || [5.0.0+] GetPalmaConnectionHandle
 
| 500 || [5.0.0+] GetPalmaConnectionHandle
Line 282: Line 282:     
The input buffer contains an array of u32 [[#NpadIdType]].
 
The input buffer contains an array of u32 [[#NpadIdType]].
 +
 +
== ActivateNpad ==
 +
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output.
 +
 +
On newer sysvers this runs the same code as [[#ActivateNpadWithRevision]], with revision=0.
 +
 +
== DeactivateNpad ==
 +
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output.
 +
 +
This just returns 0.
    
== AcquireNpadStyleSetUpdateEventHandle ==
 
== AcquireNpadStyleSetUpdateEventHandle ==
Takes an input u32, an u64 [[AM_services|AppletResourceUserId]], and an u64. Returns an output event handle, autoclear for this is user-specified.
+
Takes a PID, an input u32, an u64 [[AM_services|AppletResourceUserId]], and an u64. Returns an output event handle, autoclear for this is user-specified.
    
The value for the last u64 doesn't seem to matter (?): official sw sets this to the address of the structure used for storing the event which is initialized after using this cmd.
 
The value for the last u64 doesn't seem to matter (?): official sw sets this to the address of the structure used for storing the event which is initialized after using this cmd.
 +
 +
== ActivateNpadWithRevision ==
 +
Takes a PID-descriptor, a s32 revision, and an [[AM_services|AppletResourceUserId]]. No output.
 +
 +
Revisions:
 +
* 0x0: Initial [[#ActivateNpad|revision]], pre-5.0.0.
 +
* 0x1: [5.0.0+]
 +
* 0x2: [6.0.0+]
 +
* 0x3: [8.0.0+]
 +
 +
== SetNpadJoyHoldType ==
 +
Takes a PID-descriptor, a s64, and an [[AM_services|AppletResourceUserId]]. No output.
 +
 +
== GetNpadJoyHoldType ==
 +
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. Returns an output s64.
    
== SetNpadJoyAssignmentModeSingleByDefault ==
 
== SetNpadJoyAssignmentModeSingleByDefault ==
Line 329: Line 354:     
== IsVibrationDeviceMounted ==
 
== IsVibrationDeviceMounted ==
Takes a total of 0x10-bytes of input and a PID, returns an output u8 bool.
+
Takes a PID, an [[#VibrationDeviceHandle]], and an u64 [[AM_services|AppletResourceUserId]], returns an output u8 bool.
 +
 
 +
== ActivateConsoleSixAxisSensor ==
 +
Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output.
    
== ActivateSevenSixAxisSensor ==
 
== ActivateSevenSixAxisSensor ==
 
Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output.
 
Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output.
 +
 +
Unused by official sw, [[#ActivateConsoleSixAxisSensor]] is used instead. However, internally ActivateSevenSixAxisSensor is identical to [[#ActivateConsoleSixAxisSensor]]. Deactivation is done with hiddbg DeactivateConsoleSixAxisSensor.
    
== StartSevenSixAxisSensor ==
 
== StartSevenSixAxisSensor ==
Line 358: Line 388:     
== GetNpadInterfaceType ==
 
== GetNpadInterfaceType ==
Takes an input u32 NpadIdType, returns an output u8.
+
Takes an input u32 NpadIdType, returns an output u8 [[#NpadInterfaceType]].
 +
 
 +
The NpadInterfaceType must be 1-4, otherwise this will assert.
    
== VibrationDeviceHandle ==
 
== VibrationDeviceHandle ==
Line 461: Line 493:  
== NpadIdType ==
 
== NpadIdType ==
 
This is an u32. This is the controller index used in [[HID_Shared_Memory#Controllers|sharedmem]]. 0x20 is handheld.
 
This is an u32. This is the controller index used in [[HID_Shared_Memory#Controllers|sharedmem]]. 0x20 is handheld.
 +
 +
== NpadInterfaceType ==
 +
This is the output u8 returned by [[#GetNpadInterfaceType]].
 +
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
!  Notes
 +
|-
 +
| 1 || Bluetooth ||
 +
|-
 +
| 2 || Rail ||
 +
|-
 +
| 3 || USB ||
 +
|-
 +
| 4 || Unknown ||
 +
|}
    
= hid:dbg =
 
= hid:dbg =
Line 599: Line 648:  
| 227 || [5.0.0+] GetRxPacketHistory
 
| 227 || [5.0.0+] GetRxPacketHistory
 
|-
 
|-
| 228 || [6.0.0+] AcquireOperationEventHandle
+
| 228 || [6.0.0+] [[#AcquireOperationEventHandle]]
 
|-
 
|-
 
| 229 || [6.0.0+] [[#ReadSerialFlash]]
 
| 229 || [6.0.0+] [[#ReadSerialFlash]]
 
|-
 
|-
| 230 || [6.0.0+] WriteSerialFlash
+
| 230 || [6.0.0+] [[#WriteSerialFlash]]
 
|-
 
|-
| 231 || [6.0.0+] GetOperationResult
+
| 231 || [6.0.0+] [[#GetOperationResult]]
 
|-
 
|-
 
| 232 || [6.0.0+] EnableShipmentMode
 
| 232 || [6.0.0+] EnableShipmentMode
Line 727: Line 776:     
[9.0.0+] Now takes a total of 8-bytes of input and a type-0x6 output buffer, returns a total of 8-bytes of output.
 
[9.0.0+] Now takes a total of 8-bytes of input and a type-0x6 output buffer, returns a total of 8-bytes of output.
 +
 +
== AcquireOperationEventHandle ==
 +
Takes an input u64 '''UniquePadId''', returns an output Event handle. The EventClearMode used by official sw is user-specified.
 +
 +
This is not used internally by sdk-nso besides exposing it to the user. With the sdk-nso for [9.0.0+] the wrapper funcs for this was removed (sdk-nso still has the actual cmd).
 +
 +
This must be used before [[#ReadSerialFlash]]/[[#WriteSerialFlash]]. Afterwards, this Event is used to wait for the async operation started by [[#ReadSerialFlash]]/[[#WriteSerialFlash]] to finish. After waiting on the Event, [[#GetOperationResult]] should be used.
    
== ReadSerialFlash ==
 
== ReadSerialFlash ==
Line 733: Line 789:  
Reads from the specified controller's spi-flash. The input size is the original size without page-alignment. The TransferMemory permissions is RW-.
 
Reads from the specified controller's spi-flash. The input size is the original size without page-alignment. The TransferMemory permissions is RW-.
   −
This doesn't seem to be usable?
+
See also [[#AcquireOperationEventHandle]].
   −
== GetUniquePadDeviceTypeSetInternal ==
+
With the sdk-nso for [9.0.0+] the wrapper funcs for this was removed (sdk-nso still has the actual cmd).
Takes a total of 8-bytes of input, returns a total of 4-bytes of output.
+
 
 +
== WriteSerialFlash ==
 +
Takes an input TransferMemory handle, an input u32 offset, an input u64 tmem_size, an input u64 size, and an u64 '''UniquePadId''', no output.
   −
[9.0.0+] Now takes a total of 8-bytes of input, returns a total of 1-byte of output.
+
Writes to the specified controller's spi-flash. The TransferMemory permissions is R--.
 +
 
 +
See also [[#AcquireOperationEventHandle]].
 +
 
 +
With the sdk-nso for [9.0.0+] the wrapper funcs for this was removed (sdk-nso still has the actual cmd).
 +
 
 +
== GetOperationResult ==
 +
Takes an input u64 '''UniquePadId''', no output.
 +
 
 +
Get the Result for the Operation and handles cleanup, for the specified controller.
 +
 
 +
This is not used internally by sdk-nso besides exposing it to the user. With the sdk-nso for [9.0.0+] the wrapper funcs for this was removed (sdk-nso still has the actual cmd).
 +
 
 +
== GetUniquePadDeviceTypeSetInternal ==
 +
Takes an input u64 '''UniquePadId''', returns an [[#DeviceTypeInternal]].
    
== GetAbstractedPadHandles ==
 
== GetAbstractedPadHandles ==
Line 824: Line 896:  
| 0xC || 0x4 || RGBA Single Buttons Color
 
| 0xC || 0x4 || RGBA Single Buttons Color
 
|-
 
|-
| 0x10 || 0x1 || Type2. See [[#HiddbgHdlsDeviceInfo]]::type2.
+
| 0x10 || 0x1 || See [[#HiddbgHdlsDeviceInfo]]::[[#NpadInterfaceType]].
 
|-
 
|-
 
| 0x11 || 0x3 || Padding
 
| 0x11 || 0x3 || Padding
Line 951: Line 1,023:  
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x4 || Only one bit can be set, see below.
+
| 0x0 || 0x4 || [[#DeviceTypeInternal]]
 
|-
 
|-
 
| 0x4 || 0x4 || RGBA Single Body Color
 
| 0x4 || 0x4 || RGBA Single Body Color
Line 957: Line 1,029:  
| 0x8 || 0x4 || RGBA Single Buttons Color
 
| 0x8 || 0x4 || RGBA Single Buttons Color
 
|-
 
|-
| 0xC || 0x1 || Additional type field used with the above type field, if the value doesn't match one of the following a default is used. Type Pro-Controller: value 0x3 indicates that the controller is connected via USB. Type bit21: value 0x3 = unknown. When value is 0x2, state is merged with an existing controller (when the type value is compatible with this). Otherwise, it's a dedicated controller.
+
| 0xC || 0x1 || [[#NpadInterfaceType]]. Additional type field used with the above type field, if the value doesn't match one of the following a default is used. Type Pro-Controller: value 0x3 indicates that the controller is connected via USB. Type bit21: value 0x3 = unknown. When value is 0x2, state is merged with an existing controller (when the type value is compatible with this). Otherwise, it's a dedicated controller.
 
|-
 
|-
 
| 0xD || 0x3 || Padding
 
| 0xD || 0x3 || Padding
Line 967: Line 1,039:  
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x1 || Type value, must match certain values (not used with the below table).
+
| 0x0 || 0x1 || [[#DeviceTypeInternal]]
 
|-
 
|-
| 0x1 || 0x1 || Additional type field, similar to the one from the old struct.
+
| 0x1 || 0x1 || [[#NpadInterfaceType]]. Similar to the field from the old struct.
 
|-
 
|-
 
| 0x2 || 0x2 || Padding
 
| 0x2 || 0x2 || Padding
Line 984: Line 1,056:  
This is a 0x10-byte struct. [9.0.0+] This is a 0x14-byte struct.
 
This is a 0x10-byte struct. [9.0.0+] This is a 0x14-byte struct.
   −
Bits for the above type field:
+
== DeviceTypeInternal ==
 +
This is an u32 "nn::hid::detail::DeviceTypeInternal".
 +
 
 +
[9.0.0+] This an u8 "nn::hidtypes::DeviceType".
 +
 
 +
Bits for "nn::hid::detail::DeviceTypeInternal", only 1 bit can be set:
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,032: Line 1,109:  
|}
 
|}
   −
== HdlsState ==
+
u8 values for "nn::hidtypes::DeviceType", must match one of the these values:
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
!  Notes
 
|-
 
|-
! Offset || Size || Description
+
| 1 || JoyRight ||
 +
|-
 +
| 2 || JoyLeft ||
 +
|-
 +
| 3 || FullKey ||
 +
|-
 +
| 4 || JoyLeft ||
 +
|-
 +
| 5 || JoyRight ||  
 
|-
 
|-
| 0x0 || 0x1 || powerConnected for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
+
| 6 || FullKey ||  
 
|-
 
|-
| 0x1 || 0x1 || ORRed with powerConnected to set the value of the first byte for the controller [[HID_Shared_Memory#Flags|flags]].
+
| 7 || LarkLeft (HVC) ||  
 
|-
 
|-
| 0x2 || 0x6 || Unknown
+
| 8 || LarkRight (HVC) ||  
 
|-
 
|-
| 0x8 || 0x4 || batteryCharge for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
+
| 9 || LarkLeft (NES) ||  
 
|-
 
|-
| 0xC || 0x4 || [[HID_Shared_Memory#Button_State|Buttons]]. Bit18 = HOME and bit19 = Capture.
+
| 10 || LarkRight (NES) ||  
 
|-
 
|-
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]].
+
| 11 || Invalid ||  
 
|-
 
|-
| 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases).
+
| 12 || Palma ||  
 
|-
 
|-
| 0x21 || 0x3 || Padding
+
| 13 || FullKey ||  
|}
  −
 
  −
This is a 0x24-byte struct.
  −
 
  −
= hid:sys =
  −
This is "nn::hid::IHidSystemServer".
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Cmd || Name
+
| 14 || Invalid ||  
 
|-
 
|-
| 31 || SendKeyboardLockKeyEvent
+
| 15 || FullKey ||  
 
|-
 
|-
| 101 || AcquireHomeButtonEventHandle
+
| 16 || Controller is missing in sharedmem.
 
|-
 
|-
| 111 || ActivateHomeButton
+
| 17-18 || Invalid ||  
 
|-
 
|-
| 121 || AcquireSleepButtonEventHandle
+
| 19 || [[#DeviceType]] System with [[#NpadStyleTag]] |= NpadFullKey
 
|-
 
|-
| 131 || ActivateSleepButton
+
| 20 || [[#DeviceType]] System with [[#NpadStyleTag]] |= NpadJoyDual
 
|-
 
|-
| 141 || AcquireCaptureButtonEventHandle
+
| 21 || [[#DeviceType]] System with [[#NpadStyleTag]] |= NpadJoyDual
 +
|}
 +
 
 +
== HdlsState ==
 +
 
 +
Pre-9.0.0:
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 151 || ActivateCaptureButton
+
! Offset || Size || Description
 
|-
 
|-
| 161 || [7.0.0+] GetPlatformConfig
+
| 0x0 || 0x1 || powerConnected for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
 
|-
 
|-
| 210 || AcquireNfcDeviceUpdateEventHandle
+
| 0x1 || 0x1 || ORRed with powerConnected to set the value of the first byte for the controller [[HID_Shared_Memory#Flags|flags]].
 
|-
 
|-
| 211 || GetNpadsWithNfc
+
| 0x2 || 0x6 || Unknown
 
|-
 
|-
| 212 || AcquireNfcActivateEventHandle
+
| 0x8 || 0x4 || batteryCharge for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
 
|-
 
|-
| 213 || ActivateNfc
+
| 0xC || 0x4 || [[HID_Shared_Memory#Button_State|Buttons]]. Bit18 = HOME and bit19 = Capture.
 
|-
 
|-
| 214 || [4.0.0+] GetXcdHandleForNpadWithNfc
+
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]].
 +
|-
 +
| 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases).
 +
|-
 +
| 0x21 || 0x3 || Padding
 +
|}
 +
 
 +
[9.0.0+]:
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || batteryCharge for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
 +
|-
 +
| 0x4 || 0x4 || Unknown
 +
|-
 +
| 0x8 || 0x8 || [[HID_Shared_Memory#Button_State|Buttons]], masked with 0xfffffffff00fffff. See above table regarding HOME/Capture buttons.
 +
|-
 +
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]].
 +
|-
 +
| 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases).
 +
|-
 +
| 0x21 || 0x3 || Padding
 +
|}
 +
 
 +
This is a 0x24-byte struct.
 +
 
 +
= hid:sys =
 +
This is "nn::hid::IHidSystemServer".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 31 || SendKeyboardLockKeyEvent
 +
|-
 +
| 101 || AcquireHomeButtonEventHandle
 +
|-
 +
| 111 || ActivateHomeButton
 +
|-
 +
| 121 || AcquireSleepButtonEventHandle
 +
|-
 +
| 131 || ActivateSleepButton
 +
|-
 +
| 141 || AcquireCaptureButtonEventHandle
 +
|-
 +
| 151 || ActivateCaptureButton
 +
|-
 +
| 161 || [7.0.0+] GetPlatformConfig
 +
|-
 +
| 210 || AcquireNfcDeviceUpdateEventHandle
 +
|-
 +
| 211 || GetNpadsWithNfc
 +
|-
 +
| 212 || AcquireNfcActivateEventHandle
 +
|-
 +
| 213 || ActivateNfc
 +
|-
 +
| 214 || [4.0.0+] GetXcdHandleForNpadWithNfc
 +
|-
 +
| 215 || [4.0.0+] IsNfcActivated
 +
|-
 +
| 230 || AcquireIrSensorEventHandle
 +
|-
 +
| 231 || ActivateIrSensor
 +
|-
 +
| 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
 +
|-
 +
| 312 || [6.0.0+] SetSupportedNpadStyleSetAll
 +
|-
 +
| 313 || [9.0.0+] GetNpadCaptureButtonAssignment
 +
|-
 +
| 314 || [9.0.0+] GetAppletFooterUiType
 +
|-
 +
| 315 || [9.0.0+] GetAppletDetailedUiType
 +
|-
 +
| 321 || [3.0.0+] [[#GetUniquePadsFromNpad]]
 +
|-
 +
| 322 || GetIrSensorState
 +
|-
 +
| 323 || GetXcdHandleForNpadWithIrSensor
 +
|-
 +
| 500 || SetAppletResourceUserId
 +
|-
 +
| 501 || RegisterAppletResourceUserId
 
|-
 
|-
| 215 || [4.0.0+] IsNfcActivated
+
| 502 || UnregisterAppletResourceUserId
 
|-
 
|-
| 230 || AcquireIrSensorEventHandle
+
| 503 || EnableAppletToGetInput
 
|-
 
|-
| 231 || ActivateIrSensor
+
| 504 || SetAruidValidForVibration
 
|-
 
|-
| 301 || ActivateNpadSystem
+
| 505 || EnableAppletToGetSixAxisSensor
 
|-
 
|-
| 303 || ApplyNpadSystemCommonPolicy
+
| 510 || [[#SetVibrationMasterVolume]]
 
|-
 
|-
| 304 || EnableAssigningSingleOnSlSrPress
+
| 511 || GetVibrationMasterVolume
 
|-
 
|-
| 305 || DisableAssigningSingleOnSlSrPress
+
| 512 || [3.0.0+] BeginPermitVibrationSession
 
|-
 
|-
| 306 || GetLastActiveNpad
+
| 513 || [3.0.0+] EndPermitVibrationSession
 
|-
 
|-
| 307 || GetNpadSystemExtStyle
+
| 520 || EnableHandheldHids
 
|-
 
|-
| 308 || [5.0.0+] ApplyNpadSystemCommonPolicyFull
+
| 521 || DisableHandheldHids
 
|-
 
|-
| 309 || [5.0.0+] GetNpadFullKeyGripColor
+
| 522 || [9.0.0+] SetJoyConRailEnabled
 
|-
 
|-
| 310 || [6.0.0+] [[#GetMaskedSupportedNpadStyleSet]]
+
| 523 || [9.0.0+] IsJoyConRailEnabled
 
|-
 
|-
| 311 || SetNpadPlayerLedBlinkingDevice
+
| 540 || AcquirePlayReportControllerUsageUpdateEvent
 
|-
 
|-
| 312 || [6.0.0+] SetSupportedNpadStyleSetAll
+
| 541 || GetPlayReportControllerUsages
 
|-
 
|-
| 313 || [9.0.0+] GetNpadCaptureButtonAssignment
+
| 542 || AcquirePlayReportRegisteredDeviceUpdateEvent
 
|-
 
|-
| 314 || [9.0.0+] GetAppletFooterUiType
+
| 543 || GetRegisteredDevicesOld ([1.0.0-4.1.0] GetRegisteredDevices)
 
|-
 
|-
| 315 || [9.0.0+] GetAppletDetailedUiType
+
| 544 || [3.0.0+] AcquireConnectionTriggerTimeoutEvent
 
|-
 
|-
| 321 || [3.0.0+] [[#GetUniquePadsFromNpad]]
+
| 545 || [3.0.0+] SendConnectionTrigger
 
|-
 
|-
| 322 || GetIrSensorState
+
| 546 || [3.0.0+] AcquireDeviceRegisteredEventForControllerSupport
 
|-
 
|-
| 323 || GetXcdHandleForNpadWithIrSensor
+
| 547 || [3.0.0+] GetAllowedBluetoothLinksCount
 
|-
 
|-
| 500 || SetAppletResourceUserId
+
| 548 || [5.0.0+] GetRegisteredDevices
 
|-
 
|-
| 501 || RegisterAppletResourceUserId
+
| 549 || [6.0.0+] GetConnectableRegisteredDevices
 
|-
 
|-
| 502 || UnregisterAppletResourceUserId
+
| 700 || ActivateUniquePad
 
|-
 
|-
| 503 || EnableAppletToGetInput
+
| 702 || AcquireUniquePadConnectionEventHandle
 
|-
 
|-
| 504 || SetAruidValidForVibration
+
| 703 || [[#GetUniquePadIds]]
 
|-
 
|-
| 505 || EnableAppletToGetSixAxisSensor
+
| 751 || AcquireJoyDetachOnBluetoothOffEventHandle
 
|-
 
|-
| 510 || [[#SetVibrationMasterVolume]]
+
| 800 || ListSixAxisSensorHandles
 
|-
 
|-
| 511 || GetVibrationMasterVolume
+
| 801 || IsSixAxisSensorUserCalibrationSupported
 
|-
 
|-
| 512 || [3.0.0+] BeginPermitVibrationSession
+
| 802 || ResetSixAxisSensorCalibrationValues
 
|-
 
|-
| 513 || [3.0.0+] EndPermitVibrationSession
+
| 803 || StartSixAxisSensorUserCalibration
 
|-
 
|-
| 520 || EnableHandheldHids
+
| 804 || CancelSixAxisSensorUserCalibration
 
|-
 
|-
| 521 || DisableHandheldHids
+
| 805 || [3.0.0+] GetUniquePadBluetoothAddress
 
|-
 
|-
| 522 || [9.0.0+] SetJoyConRailEnabled
+
| 806 || [3.0.0+] DisconnectUniquePad
 
|-
 
|-
| 523 || [9.0.0+] IsJoyConRailEnabled
+
| 807 || [5.0.0+] GetUniquePadType
 
|-
 
|-
| 540 || AcquirePlayReportControllerUsageUpdateEvent
+
| 808 || [5.0.0+] GetUniquePadInterface
 
|-
 
|-
| 541 || GetPlayReportControllerUsages
+
| 809 || [5.0.0+] GetUniquePadSerialNumber
 
|-
 
|-
| 542 || AcquirePlayReportRegisteredDeviceUpdateEvent
+
| 810 || [5.0.0+] GetUniquePadControllerNumber
 
|-
 
|-
| 543 || GetRegisteredDevicesOld ([1.0.0-4.1.0] GetRegisteredDevices)
+
| 811 || [5.0.0+] GetSixAxisSensorUserCalibrationStage
 
|-
 
|-
| 544 || [3.0.0+] AcquireConnectionTriggerTimeoutEvent
+
| 812 || [8.0.0+] GetConsoleUniqueSixAxisSensorHandle
 
|-
 
|-
| 545 || [3.0.0+] SendConnectionTrigger
+
| 821 || StartAnalogStickManualCalibration
 
|-
 
|-
| 546 || [3.0.0+] AcquireDeviceRegisteredEventForControllerSupport
+
| 822 || RetryCurrentAnalogStickManualCalibrationStage
 
|-
 
|-
| 547 || [3.0.0+] GetAllowedBluetoothLinksCount
+
| 823 || CancelAnalogStickManualCalibration
 
|-
 
|-
| 548 || [5.0.0+] GetRegisteredDevices
+
| 824 || ResetAnalogStickManualCalibration
 
|-
 
|-
| 549 || [6.0.0+] GetConnectableRegisteredDevices
+
| 825 || [5.0.0+] GetAnalogStickState
 
|-
 
|-
| 700 || ActivateUniquePad
+
| 826 || [5.0.0+] GetAnalogStickManualCalibrationStage
 
|-
 
|-
| 702 || AcquireUniquePadConnectionEventHandle
+
| 827 || [5.0.0+] IsAnalogStickButtonPressed
 
|-
 
|-
| 703 || [[#GetUniquePadIds]]
+
| 828 || [5.0.0+] IsAnalogStickInReleasePosition
 
|-
 
|-
| 751 || AcquireJoyDetachOnBluetoothOffEventHandle
+
| 829 || [5.0.0+] IsAnalogStickInCircumference
 
|-
 
|-
| 800 || ListSixAxisSensorHandles
+
| 830 || [7.0.0+] [[#SetNotificationLedPattern]]
 
|-
 
|-
| 801 || IsSixAxisSensorUserCalibrationSupported
+
| 831 || [9.0.0+] [[#SetNotificationLedPatternWithTimeout]]
 
|-
 
|-
| 802 || ResetSixAxisSensorCalibrationValues
+
| 832 || [9.0.0+] [[#PrepareHidsForNotificationWake]]
 
|-
 
|-
| 803 || StartSixAxisSensorUserCalibration
+
| 850 || [3.0.0+] IsUsbFullKeyControllerEnabled
 
|-
 
|-
| 804 || CancelSixAxisSensorUserCalibration
+
| 851 || [3.0.0+] EnableUsbFullKeyController
 
|-
 
|-
| 805 || [3.0.0+] GetUniquePadBluetoothAddress
+
| 852 || [3.0.0+] IsUsbConnected
 
|-
 
|-
| 806 || [3.0.0+] DisconnectUniquePad
+
| 870 || [5.1.0+] IsHandheldButtonPressedOnConsoleMode
 
|-
 
|-
| 807 || [5.0.0+] GetUniquePadType
+
| 900 || ActivateInputDetector
 
|-
 
|-
| 808 || [5.0.0+] GetUniquePadInterface
+
| 901 || [[#NotifyInputDetector]]
 
|-
 
|-
| 809 || [5.0.0+] GetUniquePadSerialNumber
+
| 1000 || [3.0.0+] InitializeFirmwareUpdate
 
|-
 
|-
| 810 || [5.0.0+] GetUniquePadControllerNumber
+
| 1001 || [3.0.0+] GetFirmwareVersion
 
|-
 
|-
| 811 || [5.0.0+] GetSixAxisSensorUserCalibrationStage
+
| 1002 || [3.0.0+] GetAvailableFirmwareVersion
 
|-
 
|-
| 812 || [8.0.0+] GetConsoleUniqueSixAxisSensorHandle
+
| 1003 || [3.0.0+] IsFirmwareUpdateAvailable
 
|-
 
|-
| 821 || StartAnalogStickManualCalibration
+
| 1004 || [3.0.0+] CheckFirmwareUpdateRequired
 
|-
 
|-
| 822 || RetryCurrentAnalogStickManualCalibrationStage
+
| 1005 || [3.0.0+] StartFirmwareUpdate
 
|-
 
|-
| 823 || CancelAnalogStickManualCalibration
+
| 1006 || [3.0.0+] AbortFirmwareUpdate
 
|-
 
|-
| 824 || ResetAnalogStickManualCalibration
+
| 1007 || [3.0.0+] GetFirmwareUpdateState
 
|-
 
|-
| 825 || [5.0.0+] GetAnalogStickState
+
| 1008 || [4.0.0+] ActivateAudioControl
 
|-
 
|-
| 826 || [5.0.0+] GetAnalogStickManualCalibrationStage
+
| 1009 || [4.0.0+] AcquireAudioControlEventHandle
 
|-
 
|-
| 827 || [5.0.0+] IsAnalogStickButtonPressed
+
| 1010 || [4.0.0+] GetAudioControlStates
 
|-
 
|-
| 828 || [5.0.0+] IsAnalogStickInReleasePosition
+
| 1011 || [4.0.0+] DeactivateAudioControl
 
|-
 
|-
| 829 || [5.0.0+] IsAnalogStickInCircumference
+
| 1050 || [5.0.0+] IsSixAxisSensorAccurateUserCalibrationSupported
 
|-
 
|-
| 830 || [7.0.0+] [[#SetNotificationLedPattern]]
+
| 1051 || [5.0.0+] StartSixAxisSensorAccurateUserCalibration
 
|-
 
|-
| 831 || [9.0.0+] SetNotificationLedPatternWithTimeout
+
| 1052 || [5.0.0+] CancelSixAxisSensorAccurateUserCalibration
 
|-
 
|-
| 832 || [9.0.0+] PrepareHidsForNotificationWake
+
| 1053 || [5.0.0+] GetSixAxisSensorAccurateUserCalibrationState
 
|-
 
|-
| 850 || [3.0.0+] IsUsbFullKeyControllerEnabled
+
| 1100 || [5.0.0+] [[#GetHidbusSystemServiceObject]]
 
|-
 
|-
| 851 || [3.0.0+] EnableUsbFullKeyController
+
| 1120 || [6.0.0+] SetFirmwareHotfixUpdateSkipEnabled
 
|-
 
|-
| 852 || [3.0.0+] IsUsbConnected
+
| 1130 || [6.0.0+] InitializeUsbFirmwareUpdate
 
|-
 
|-
| 870 || [5.1.0+] IsHandheldButtonPressedOnConsoleMode
+
| 1131 || [6.0.0+] FinalizeUsbFirmwareUpdate
 
|-
 
|-
| 900 || ActivateInputDetector
+
| 1132 || [6.0.0+] CheckUsbFirmwareUpdateRequired
 
|-
 
|-
| 901 || [[#NotifyInputDetector]]
+
| 1133 || [6.0.0+] StartUsbFirmwareUpdate
 
|-
 
|-
| 1000 || [3.0.0+] InitializeFirmwareUpdate
+
| 1134 || [6.0.0+] GetUsbFirmwareUpdateState
 
|-
 
|-
| 1001 || [3.0.0+] GetFirmwareVersion
+
| 1150 || [8.0.0+] SetTouchScreenMagnification
 
|-
 
|-
| 1002 || [3.0.0+] GetAvailableFirmwareVersion
+
| 1151 || [9.0.0+] GetTouchScreenFirmwareVersion
 
|-
 
|-
| 1003 || [3.0.0+] IsFirmwareUpdateAvailable
+
| 1152 || [9.0.0+] SetTouchScreenDefaultConfiguration
 
|-
 
|-
| 1004 || [3.0.0+] CheckFirmwareUpdateRequired
+
| 1153 || [9.0.0+] GetTouchScreenDefaultConfiguration
 
|-
 
|-
| 1005 || [3.0.0+] StartFirmwareUpdate
+
| 1154 || [9.0.0+] IsFirmwareAvailableForNotification
 
|-
 
|-
| 1006 || [3.0.0+] AbortFirmwareUpdate
+
| 1155 || [9.0.0+] SetForceHandheldStyleVibration
 
|-
 
|-
| 1007 || [3.0.0+] GetFirmwareUpdateState
+
| 1156 || [9.0.0+] SendConnectionTriggerWithoutTimeoutEvent
|-
+
|}
| 1008 || [4.0.0+] ActivateAudioControl
+
 
|-
+
== GetMaskedSupportedNpadStyleSet ==
| 1009 || [4.0.0+] AcquireAudioControlEventHandle
+
Takes an input u64 AppletResourceUserId, returns an output u32 [[#NpadStyleTag]].
|-
+
 
| 1010 || [4.0.0+] GetAudioControlStates
+
Official sw uses the output from [[Applet_Manager_services|GetAppletResourceUserIdOfCallerApplet]] with this.
|-
+
 
| 1011 || [4.0.0+] DeactivateAudioControl
+
== 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).
| 1050 || [5.0.0+] IsSixAxisSensorAccurateUserCalibrationSupported
+
 
|-
+
The output buffer contains an array of u64 '''UniquePadId'''.
| 1051 || [5.0.0+] StartSixAxisSensorAccurateUserCalibration
+
 
|-
+
== SetVibrationMasterVolume ==
| 1052 || [5.0.0+] CancelSixAxisSensorAccurateUserCalibration
+
Takes an input 32bit float.
|-
+
 
| 1053 || [5.0.0+] GetSixAxisSensorAccurateUserCalibrationState
+
== 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).
 +
 
 +
The output buffer contains an array of u64 '''UniquePadId'''.
 +
 
 +
== NotifyInputDetector ==
 +
Takes an input u32 bitmask InputSourceId, no output.
 +
 
 +
This is the only hid:sys command used by USB-sysmodule (with value 0x40).
 +
 
 +
== SetNotificationLedPattern ==
 +
Takes an input [[#NotificationLedPattern]] and an u64 '''UniquePadId''', no output.
 +
 
 +
The specified controller must have a HOME button.
 +
 
 +
This sends subcommand 0x38 to the specified controller, for setting the pattern for the HOME button notification LED. The input structure is converted to the format used by this [https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_subcommands_notes.md#subcommand-0x38-set-home-light subcommand].
 +
 
 +
[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}).
 +
 
 +
== SetNotificationLedPatternWithTimeout ==
 +
Takes an input [[#NotificationLedPattern]], an u64 '''UniquePadId''', and an s64 TimeSpan, no output.
 +
 
 +
== PrepareHidsForNotificationWake ==
 +
Takes a type-0x9 input buffer containing an array of u64 '''UniquePadId''', no output.
 +
 
 +
== GetHidbusSystemServiceObject ==
 +
No input, returns an [[#IHidbusSystemServer]].
 +
 
 +
== NotificationLedPattern ==
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 1100 || [5.0.0+] [[#GetHidbusSystemServiceObject]]
+
! Offset || Size || Subcommand argdata bytepos || Subcommand argdata nibble || Description
 
|-
 
|-
| 1120 || [6.0.0+] SetFirmwareHotfixUpdateSkipEnabled
+
| 0x0 || 0x1 || 0x0 || Low || Mini Cycle Base Duration. Value 0x1-0xF: 12.5ms - 187.5ms. Value 0x0 = 0ms/OFF.
 
|-
 
|-
| 1130 || [6.0.0+] InitializeUsbFirmwareUpdate
+
| 0x1 || 0x1 || 0x0 || High || Number of Mini Cycles + 1. Value 0x0-0xF: 1 - 16 mini cycles.
 
|-
 
|-
| 1131 || [6.0.0+] FinalizeUsbFirmwareUpdate
+
| 0x2 || 0x1 || 0x1 || Low || Number of Full Cycles. Value 0x1-0xF: 1 - 15 full cycles. Value 0x0 is repeat forever, but if Mini Cycle Base Duration is set to 0x0, it does the 1st Mini Cycle with a 12.5ms base duration and then the LED stays on with LED Start Intensity.
 
|-
 
|-
| 1132 || [6.0.0+] CheckUsbFirmwareUpdateRequired
+
| 0x3 || 0x1 || 0x1 || High || LED Start Intensity. Value 0x0-0xF: 0% - 100%. (In HW, 1 - 241 duty)
 +
|-
 +
| 0x4 || 0x1 || 0x2 || High || Mini Cycle 1 LED Intensity. Value 0x0-0xF: 0% - 100%. (In HW, 1 - 241 duty)
 +
|-
 +
| 0x5 || 0x1 || 0x3 || High || Fading Transition Steps to Mini Cycle 1 (Uses PWM). Value 0x0: Instant. Each step duration is based on Mini Cycle Step Duration Multiplier.
 +
|-
 +
| 0x6 || 0x1 || 0x3 || Low || Final Step Duration Multiplier of Mini Cycle 1. Value is a Multiplier of Mini Cycle Base Duration. Value 0x0: 12.5ms, 0x1 - xF: 1x - 15x.
 
|-
 
|-
| 1133 || [6.0.0+] StartUsbFirmwareUpdate
+
| 0x7 || 0x1 || || || Unused
 
|-
 
|-
| 1134 || [6.0.0+] GetUsbFirmwareUpdateState
+
| 0x8 || 0x1 || 0x2 || Low || Mini Cycle 2 LED Intensity.
 
|-
 
|-
| 1150 || [8.0.0+] SetTouchScreenMagnification
+
| 0x9 || 0x1 || 0x4 || High || Fading Transition Steps to Mini Cycle 2 (see above).
 
|-
 
|-
| 1151 || [9.0.0+] GetTouchScreenFirmwareVersion
+
| 0xA || 0x1 || 0x4 || Low || Final Step Duration Multiplier of Mini Cycle 2 (see above).
 
|-
 
|-
| 1152 || [9.0.0+] SetTouchScreenDefaultConfiguration
+
| 0xB || 0x1 || || || Unused
 
|-
 
|-
| 1153 || [9.0.0+] GetTouchScreenDefaultConfiguration
+
| 0xC || 0x1 || 0x5 || High || Mini Cycle 3 LED Intensity.
 
|-
 
|-
| 1154 || [9.0.0+] IsFirmwareAvailableForNotification
+
| 0xD || 0x1 || 0x6 || High || Fading Transition Steps to Mini Cycle 3 (see above).
 
|-
 
|-
| 1155 || [9.0.0+] SetForceHandheldStyleVibration
+
| 0xE || 0x1 || 0x6 || Low || Final Step Duration Multiplier of Mini Cycle 3 (see above).
 
|-
 
|-
| 1156 || [9.0.0+]
+
| 0xF || 0x1 || || || Unused
|}
+
|-
 
+
| 0x10 || 0x1 || 0x5 || Low || Mini Cycle 4 LED Intensity.
== GetMaskedSupportedNpadStyleSet ==
+
|-
Takes an input u64 AppletResourceUserId, returns an output u32 [[#NpadStyleTag]].
+
| 0x11 || 0x1 || 0x7 || High || Fading Transition Duration to Mini Cycle 4 (see above).
 
+
|-
Official sw uses the output from [[Applet_Manager_services|GetAppletResourceUserIdOfCallerApplet]] with this.
+
| 0x12 || 0x1 || 0x7 || Low || Final Step Duration Multiplier of Mini Cycle 4 (see above).
 
+
|-
== GetUniquePadsFromNpad ==
+
| 0x13 || 0x1 || || || Unused
Takes an input u32 [[#NpadIdType]], a type-0xA output buffer, and returns an output u64 for total output entries.
+
|-
 
+
| 0x14 || 0x1 || 0x8 || High || Mini Cycle 5 LED Intensity.
The output buffer contains an array of u64 '''UniquePadId'''.
+
|-
 
+
| 0x15 || 0x1 || 0x9 || High || Fading Transition Steps to Mini Cycle 5 (see above).
== SetVibrationMasterVolume ==
+
|-
Takes an input 32bit float.
+
| 0x16 || 0x1 || 0x9 || Low || Final Step Duration Multiplier of Mini Cycle 5 (see above).
 
  −
== GetUniquePadIds ==
  −
Takes a type-0xA output buffer, and returns an output u64 for total output entries.
  −
 
  −
The output buffer contains an array of u64 '''UniquePadId'''.
  −
 
  −
== NotifyInputDetector ==
  −
Takes an input u32 bitmask InputSourceId, no output.
  −
 
  −
This is the only hid:sys command used by USB-sysmodule (with value 0x40).
  −
 
  −
== SetNotificationLedPattern ==
  −
Takes an input [[#NotificationLedPattern]] and an u64 '''UniquePadId''', no output.
  −
 
  −
The specified controller must have a HOME button.
  −
 
  −
This sends subcommand 0x38 to the specified controller, for setting the pattern for the HOME button notification LED. The input structure is converted to the format used by this [https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_subcommands_notes.md#subcommand-0x38-set-home-light subcommand].
  −
 
  −
== GetHidbusSystemServiceObject ==
  −
No input, returns an [[#IHidbusSystemServer]].
  −
 
  −
== NotificationLedPattern ==
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Subcommand argdata bytepos || Subcommand argdata nibble || Description
+
| 0x17 || 0x1 || || || Unused
 
|-
 
|-
| 0x0 || 0x1 || 0x0 || Low || Mini Cycle Base Duration. Value 0x1-0xF: 12.5ms - 187.5ms. Value 0x0 = 0ms/OFF.
+
| 0x18 || 0x1 || 0x8 || Low || Mini Cycle 6 LED Intensity.
 
|-
 
|-
| 0x1 || 0x1 || 0x0 || High || Number of Mini Cycles + 1. Value 0x0-0xF: 1 - 16 mini cycles.
+
| 0x19 || 0x1 || 0xA || High || Fading Transition Steps to Mini Cycle 6 (see above).
 
|-
 
|-
| 0x2 || 0x1 || 0x1 || Low || Number of Full Cycles. Value 0x1-0xF: 1 - 15 full cycles. Value 0x0 is repeat forever, but if Mini Cycle Base Duration is set to 0x0, it does the 1st Mini Cycle with a 12.5ms base duration and then the LED stays on with LED Start Intensity.
+
| 0x1A || 0x1 || 0xA || Low || Final Step Duration Multiplier of Mini Cycle 6 (see above).
 
|-
 
|-
| 0x3 || 0x1 || 0x1 || High || LED Start Intensity. Value 0x0-0xF: 0% - 100%. (In HW, 1 - 241 duty)
+
| 0x1B || 0x1 || || || Unused
 
|-
 
|-
| 0x4 || 0x1 || 0x2 || High || Mini Cycle 1 LED Intensity. Value 0x0-0xF: 0% - 100%. (In HW, 1 - 241 duty)
+
| 0x1C || 0x1 || 0xB || High || Mini Cycle 7 LED Intensity.
 
|-
 
|-
| 0x5 || 0x1 || 0x3 || High || Fading Transition Steps to Mini Cycle 1 (Uses PWM). Value 0x0: Instant. Each step duration is based on Mini Cycle Step Duration Multiplier.
+
| 0x1D || 0x1 || 0xC || High || Fading Transition Steps to Mini Cycle 7 (see above).
 
|-
 
|-
| 0x6 || 0x1 || 0x3 || Low || Final Step Duration Multiplier of Mini Cycle 1. Value is a Multiplier of Mini Cycle Base Duration. Value 0x0: 12.5ms, 0x1 - xF: 1x - 15x.
+
| 0x1E || 0x1 || 0xC || Low || Final Step Duration Multiplier of Mini Cycle 7 (see above).
 
|-
 
|-
| 0x7 || 0x1 || || || Unused
+
| 0x1F || 0x1 || || || Unused
 
|-
 
|-
| 0x8 || 0x1 || 0x2 || Low || Mini Cycle 2 LED Intensity.
+
| 0x20 || 0x1 || 0xB || Low || Mini Cycle 8 LED Intensity.
 
|-
 
|-
| 0x9 || 0x1 || 0x4 || High || Fading Transition Steps to Mini Cycle 2 (see above).
+
| 0x21 || 0x1 || 0xD || Low || Fading Transition Steps to Mini Cycle 8 (see above).
 
|-
 
|-
| 0xA || 0x1 || 0x4 || Low || Final Step Duration Multiplier of Mini Cycle 2 (see above).
+
| 0x22 || 0x1 || 0xD || High || Final Step Duration Multiplier of Mini Cycle 8 (see above).
 
|-
 
|-
| 0xB || 0x1 || || || Unused
+
| 0x23 || 0x1 || || || Unused
 
|-
 
|-
| 0xC || 0x1 || 0x5 || High || Mini Cycle 3 LED Intensity.
+
| 0x24 || 0x1 || 0xE || High || Mini Cycle 9 LED Intensity.
 
|-
 
|-
| 0xD || 0x1 || 0x6 || High || Fading Transition Steps to Mini Cycle 3 (see above).
+
| 0x25 || 0x1 || 0xF || High || Fading Transition Steps to Mini Cycle 9 (see above).
 
|-
 
|-
| 0xE || 0x1 || 0x6 || Low || Final Step Duration Multiplier of Mini Cycle 3 (see above).
+
| 0x26 || 0x1 || 0xF || Low || Final Step Duration Multiplier of Mini Cycle 9 (see above).
 
|-
 
|-
| 0xF || 0x1 || || || Unused
+
| 0x27 || 0x1 || || || Unused
 
|-
 
|-
| 0x10 || 0x1 || 0x5 || Low || Mini Cycle 4 LED Intensity.
+
| 0x28 || 0x1 || 0xE || Low || Mini Cycle 10 LED Intensity.
 
|-
 
|-
| 0x11 || 0x1 || 0x7 || High || Fading Transition Duration to Mini Cycle 4 (see above).
+
| 0x29 || 0x1 || 0x10 || High || Fading Transition Steps to Mini Cycle 10 (see above).
 
|-
 
|-
| 0x12 || 0x1 || 0x7 || Low || Final Step Duration Multiplier of Mini Cycle 4 (see above).
+
| 0x2A || 0x1 || 0x10 || Low || Final Step Duration Multiplier of Mini Cycle 10 (see above).
 
|-
 
|-
| 0x13 || 0x1 || || || Unused
+
| 0x2B || 0x1 || || || Unused
 
|-
 
|-
| 0x14 || 0x1 || 0x8 || High || Mini Cycle 5 LED Intensity.
+
| 0x2C || 0x1 || 0x11 || High || Mini Cycle 11 LED Intensity.
 
|-
 
|-
| 0x15 || 0x1 || 0x9 || High || Fading Transition Steps to Mini Cycle 5 (see above).
+
| 0x2D || 0x1 || 0x12 || High || Fading Transition Steps to Mini Cycle 11 (see above).
 
|-
 
|-
| 0x16 || 0x1 || 0x9 || Low || Final Step Duration Multiplier of Mini Cycle 5 (see above).
+
| 0x2E || 0x1 || 0x12 || Low || Final Step Duration Multiplier of Mini Cycle 11 (see above).
 
|-
 
|-
| 0x17 || 0x1 || || || Unused
+
| 0x2F || 0x1 || || || Unused
 
|-
 
|-
| 0x18 || 0x1 || 0x8 || Low || Mini Cycle 6 LED Intensity.
+
| 0x30 || 0x1 || 0x11 || Low || Mini Cycle 12 LED Intensity.
 
|-
 
|-
| 0x19 || 0x1 || 0xA || High || Fading Transition Steps to Mini Cycle 6 (see above).
+
| 0x31 || 0x1 || 0x13 || High || Fading Transition Steps to Mini Cycle 12 (see above).
 
|-
 
|-
| 0x1A || 0x1 || 0xA || Low || Final Step Duration Multiplier of Mini Cycle 6 (see above).
+
| 0x32 || 0x1 || 0x13 || Low || Final Step Duration Multiplier of Mini Cycle 12 (see above).
 
|-
 
|-
| 0x1B || 0x1 || || || Unused
+
| 0x33 || 0x1 || || || Unused
 
|-
 
|-
| 0x1C || 0x1 || 0xB || High || Mini Cycle 7 LED Intensity.
+
| 0x34 || 0x1 || 0x14 || High || Mini Cycle 13 LED Intensity.
 
|-
 
|-
| 0x1D || 0x1 || 0xC || High || Fading Transition Steps to Mini Cycle 7 (see above).
+
| 0x35 || 0x1 || 0x15 || High || Fading Transition Steps to Mini Cycle 13 (see above).
 
|-
 
|-
| 0x1E || 0x1 || 0xC || Low || Final Step Duration Multiplier of Mini Cycle 7 (see above).
+
| 0x36 || 0x1 || 0x15 || Low || Final Step Duration Multiplier of Mini Cycle 13 (see above).
 
|-
 
|-
| 0x1F || 0x1 || || || Unused
+
| 0x37 || 0x1 || || || Unused
 
|-
 
|-
| 0x20 || 0x1 || 0xB || Low || Mini Cycle 8 LED Intensity.
+
| 0x38 || 0x1 || 0x14 || Low || Mini Cycle 14 LED Intensity.
 
|-
 
|-
| 0x21 || 0x1 || 0xD || Low || Fading Transition Steps to Mini Cycle 8 (see above).
+
| 0x39 || 0x1 || 0x16 || High || Fading Transition Steps to Mini Cycle 14 (see above).
 
|-
 
|-
| 0x22 || 0x1 || 0xD || High || Final Step Duration Multiplier of Mini Cycle 8 (see above).
+
| 0x3A || 0x1 || 0x16 || Low || Final Step Duration Multiplier of Mini Cycle 14 (see above).
 
|-
 
|-
| 0x23 || 0x1 || || || Unused
+
| 0x3B || 0x1 || || || Unused
 
|-
 
|-
| 0x24 || 0x1 || 0xE || High || Mini Cycle 9 LED Intensity.
+
| 0x3C || 0x1 || 0x17 || High || Mini Cycle 15 LED Intensity.
 
|-
 
|-
| 0x25 || 0x1 || 0xF || High || Fading Transition Steps to Mini Cycle 9 (see above).
+
| 0x3D || 0x1 || 0x18 || High || Fading Transition Steps to Mini Cycle 15 (see above).
 
|-
 
|-
| 0x26 || 0x1 || 0xF || Low || Final Step Duration Multiplier of Mini Cycle 9 (see above).
+
| 0x3E || 0x1 || 0x18 || Low || Final Step Duration Multiplier of Mini Cycle 15 (see above).
 
|-
 
|-
| 0x27 || 0x1 || || || Unused
+
| 0x3F || 0x1 || || || Unused
 
|-
 
|-
| 0x28 || 0x1 || 0xE || Low || Mini Cycle 10 LED Intensity.
+
| 0x40 || 0x1 || 0x17 || Low || Mini Cycle 16 LED Intensity.
 
|-
 
|-
| 0x29 || 0x1 || 0x10 || High || Fading Transition Steps to Mini Cycle 10 (see above).
+
| 0x41 || 0x1 || 0x19 || High || Fading Transition Steps to Mini Cycle 16 (see above). (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
 
|-
 
|-
| 0x2A || 0x1 || 0x10 || Low || Final Step Duration Multiplier of Mini Cycle 10 (see above).
+
| 0x42 || 0x1 || 0x19 || Low || Final Step Duration Multiplier of Mini Cycle 16 (see above). (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
 
|-
 
|-
| 0x2B || 0x1 || || || Unused
+
| 0x43 || 0x1 || || || Unused
 
|-
 
|-
| 0x2C || 0x1 || 0x11 || High || Mini Cycle 11 LED Intensity.
+
| 0x44 || 0x1 || 0x1A || High || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
 
|-
 
|-
| 0x2D || 0x1 || 0x12 || High || Fading Transition Steps to Mini Cycle 11 (see above).
+
| 0x45 || 0x1 || 0x1A || Low || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
 
|-
 
|-
| 0x2E || 0x1 || 0x12 || Low || Final Step Duration Multiplier of Mini Cycle 11 (see above).
+
| 0x46 || 0x1 || || || Padding
 
|-
 
|-
| 0x2F || 0x1 || || || Unused
+
| 0x47 || 0x1 || || || Padding
 
|-
 
|-
| 0x30 || 0x1 || 0x11 || Low || Mini Cycle 12 LED Intensity.
+
|}
 +
 
 +
This is "nn::hid::system::NotificationLedPattern".
 +
 
 +
This is a 0x48-byte struct.
 +
 
 +
The above descriptions in the table are based on the info from [https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_subcommands_notes.md here].
 +
 
 +
argdata in the subcommand is initialized 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 0x1B-bytes of cmd_argdata initialized from this.
 +
 
 +
The layout of cmd_argdata is as follows:
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x31 || 0x1 || 0x13 || High || Fading Transition Steps to Mini Cycle 12 (see above).
+
! Offset || Size || Description
 
|-
 
|-
| 0x32 || 0x1 || 0x13 || Low || Final Step Duration Multiplier of Mini Cycle 12 (see above).
+
| 0x0 || 0x1B || See above.
 
|-
 
|-
| 0x33 || 0x1 || || || Unused
+
| 0x1B || 0xB || Cleared to zero.
 
|-
 
|-
| 0x34 || 0x1 || 0x14 || High || Mini Cycle 13 LED Intensity.
+
| 0x26 || 0x5 || Unused
 
|-
 
|-
| 0x35 || 0x1 || 0x15 || High || Fading Transition Steps to Mini Cycle 13 (see above).
+
| 0x2B || 0x8 || Set to an input value, which is hard-coded 0.
 
|-
 
|-
| 0x36 || 0x1 || 0x15 || Low || Final Step Duration Multiplier of Mini Cycle 13 (see above).
+
| 0x33 || 0x2 || Set to value 0.
 
|-
 
|-
| 0x37 || 0x1 || || || Unused
+
| 0x35 || 0x1 || Set to value 1.
|-
+
|}
| 0x38 || 0x1 || 0x14 || Low || Mini Cycle 14 LED Intensity.
+
 
 +
== DeviceType ==
 +
This is a bitmask describing the controller device type.
 +
 
 +
{| class="wikitable" border="1"
 +
!  Bits
 +
!  Description
 +
!  Notes
 
|-
 
|-
| 0x39 || 0x1 || 0x16 || High || Fading Transition Steps to Mini Cycle 14 (see above).
+
| 0
 +
| FullKey
 +
| Pro Controller and Gc controller.
 
|-
 
|-
| 0x3A || 0x1 || 0x16 || Low || Final Step Duration Multiplier of Mini Cycle 14 (see above).
+
| 1
 +
|  
 +
| Unknown
 
|-
 
|-
| 0x3B || 0x1 || || || Unused
+
| 2
 +
| HandheldLeft
 +
| Joy-Con/Famicom/NES left controller in handheld mode.
 
|-
 
|-
| 0x3C || 0x1 || 0x17 || High || Mini Cycle 15 LED Intensity.
+
| 3
 +
| HandheldRight
 +
| Joy-Con/Famicom/NES right controller in handheld mode.
 
|-
 
|-
| 0x3D || 0x1 || 0x18 || High || Fading Transition Steps to Mini Cycle 15 (see above).
+
| 4
 +
| JoyLeft
 +
| Joy-Con left controller.
 
|-
 
|-
| 0x3E || 0x1 || 0x18 || Low || Final Step Duration Multiplier of Mini Cycle 15 (see above).
+
| 5
 +
| JoyRight
 +
| Joy-Con right controller.
 
|-
 
|-
| 0x3F || 0x1 || || || Unused
+
| 6
 +
| Palma
 +
| Poké Ball Plus controller.
 
|-
 
|-
| 0x40 || 0x1 || 0x17 || Low || Mini Cycle 16 LED Intensity.
+
| 7
 +
| LarkLeft (HVC)
 +
| Famicom left controller.
 
|-
 
|-
| 0x41 || 0x1 || 0x19 || High || Fading Transition Steps to Mini Cycle 16 (see above). (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
+
| 8
 +
| LarkRight (HVC)
 +
| Famicom right controller (with microphone).
 
|-
 
|-
| 0x42 || 0x1 || 0x19 || Low || Final Step Duration Multiplier of Mini Cycle 16 (see above). (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
+
| 9
 +
| LarkLeft (NES)
 +
| NES left controller.
 
|-
 
|-
| 0x43 || 0x1 || || || Unused
+
| 10
 +
| LarkRight (NES)
 +
| NES right controller.
 
|-
 
|-
| 0x44 || 0x1 || 0x1A || High || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
+
| 11-14
 +
|  
 +
| Reserved
 
|-
 
|-
| 0x45 || 0x1 || 0x1A || Low || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
+
| 15
 +
| SystemExt
 +
| Generic external controller.
 
|-
 
|-
| 0x46 || 0x1 || || || Padding
+
| 16-30
|-
+
|  
| 0x47 || 0x1 || || || Padding
+
| Reserved
 
|-
 
|-
 +
| 31
 +
| System
 +
| Generic controller.
 
|}
 
|}
   −
This is "nn::hid::system::NotificationLedPattern".
+
== IHidbusSystemServer ==
 +
This is "nn::hidbus::IHidbusSystemServer".
   −
This is a 0x48-byte struct.
+
This was added with [5.0.0+].
   −
The above descriptions in the table are based on the info from [https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_subcommands_notes.md here].
  −
  −
argdata in the subcommand is initialized 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 0x1B-bytes of cmd_argdata initialized from this.
  −
  −
The layout of cmd_argdata is as follows:
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Offset || Size || Description
+
! Cmd || Name
 
|-
 
|-
| 0x0 || 0x1B || See above.
+
| 500 || SetAppletResourceUserId
 
|-
 
|-
| 0x1B || 0xB || Cleared to zero.
+
| 501 || RegisterAppletResourceUserId
 
|-
 
|-
| 0x26 || 0x5 || Unused
+
| 502 || UnregisterAppletResourceUserId
 +
|}
 +
 
 +
= hid:tmp =
 +
This is "nn::hid::IHidTemporaryServer".
 +
 
 +
This service was added with [3.0.0+], then removed with [8.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x2B || 0x8 || Set to an input value, which is hard-coded 0.
+
! Cmd || Name
 
|-
 
|-
| 0x33 || 0x2 || Set to value 0.
+
| 0 || GetConsoleSixAxisSensorCalibrationValues
|-
  −
| 0x35 || 0x1 || Set to value 1.
   
|}
 
|}
   −
== DeviceType ==
+
= irs =
This is a bitmask describing the controller device type.
+
This is "nn::irsensor::IIrSensorServer".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
!  Bits
  −
!  Description
  −
!  Notes
   
|-
 
|-
| 0
+
! Cmd || Name
| FullKey
  −
| Pro Controller and Gc controller.
   
|-
 
|-
| 1
+
| 302 || [[#ActivateIrsensor]]
|  
  −
| Unknown
   
|-
 
|-
| 2
+
| 303 || [[#DeactivateIrsensor]]
| HandheldLeft
  −
| Joy-Con/Famicom/NES left controller in handheld mode.
   
|-
 
|-
| 3
+
| 304 || [[#GetIrsensorSharedMemoryHandle]]
| HandheldRight
  −
| Joy-Con/Famicom/NES right controller in handheld mode.
   
|-
 
|-
| 4
+
| 305 || [[#StopImageProcessor]]
| JoyLeft
  −
| Joy-Con left controller.
   
|-
 
|-
| 5
+
| 306 || [[#RunMomentProcessor]]
| JoyRight
  −
| Joy-Con right controller.
   
|-
 
|-
| 6
+
| 307 || [[#RunClusteringProcessor]]
| Palma
  −
| Poké Ball Plus controller.
   
|-
 
|-
| 7
+
| 308 || [[#RunImageTransferProcessor]]
| LarkLeft (HVC)
  −
| Famicom left controller.
   
|-
 
|-
| 8
+
| 309 || [[#GetImageTransferProcessorState]]
| LarkRight (HVC)
  −
| Famicom right controller (with microphone).
   
|-
 
|-
| 9
+
| 310 || [[#RunTeraPluginProcessor]]
| LarkLeft (NES)
+
|-
| NES left controller.
+
| 311 || [[#GetNpadIrCameraHandle]]
 +
|-
 +
| 312 || [[#RunPointingProcessor]]
 +
|-
 +
| 313 || [[#SuspendImageProcessor]]
 
|-
 
|-
| 10
+
| 314 || [3.0.0+] [[#CheckFirmwareVersion]]
| LarkRight (NES)
  −
| NES right controller.
   
|-
 
|-
| 11-14
+
| 315 || [4.0.0+] SetFunctionLevel
|  
  −
| Reserved
   
|-
 
|-
| 15
+
| 316 || [4.0.0+] RunImageTransferExProcessor
| SystemExt
  −
| Generic external controller.
   
|-
 
|-
| 16-30
+
| 317 || [4.0.0+] RunIrLedProcessor
|  
  −
| Reserved
   
|-
 
|-
| 31
+
| 318 || [4.0.0+] StopImageProcessorAsync
| System
  −
| Generic controller.
  −
|}
  −
 
  −
== IHidbusSystemServer ==
  −
This is "nn::hidbus::IHidbusSystemServer".
  −
 
  −
This was added with [5.0.0+].
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Cmd || Name
+
| 319 || [4.0.0+] ActivateIrsensorWithFunctionLevel
|-
  −
| 500 ||
  −
|-
  −
| 501 ||
  −
|-
  −
| 502 ||  
   
|}
 
|}
   −
= hid:tmp =
+
== ActivateIrsensor ==
This is "nn::hid::IHidTemporaryServer".
+
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output.
   −
This service was added with [3.0.0+], then removed with [8.0.0+].
+
== DeactivateIrsensor ==
 +
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output.
   −
{| class="wikitable" border="1"
+
== GetIrsensorSharedMemoryHandle ==
|-
+
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. Returns a SharedMemory handle.
! Cmd || Name
  −
|-
  −
| 0 || GetConsoleSixAxisSensorCalibrationValues
  −
|}
     −
= irs =
+
The SharedMemory is mapped with permissions=read-only and size=0x8000.
This is "nn::irsensor::IIrSensorServer".
+
 
 +
== StopImageProcessor ==
 +
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output.
 +
 
 +
== RunMomentProcessor ==
 +
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedMomentProcessorConfig]]. No output.
 +
 
 +
== RunClusteringProcessor ==
 +
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedClusteringProcessorConfig]]. No output.
 +
 
 +
== RunImageTransferProcessor ==
 +
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], a [[#PackedImageTransferProcessorConfig]], an u64 for the TransferMemory_size, and a TransferMemory handle. No output.
 +
 
 +
Official sw creates the TransferMemory with an user-specified buffer and permissions=0.
   −
{| class="wikitable" border="1"
+
== GetImageTransferProcessorState ==
|-
+
Takes a PID-descriptor, a type-0x6 output buffer, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. Returns an [[#ImageTransferProcessorState]]. No output.
! Cmd || Name
+
 
|-
+
== RunTeraPluginProcessor==
| 302 || [[#ActivateIrsensor]]
+
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedTeraPluginProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output.
|-
+
 
| 303 || [[#DeactivateIrsensor]]
+
== GetNpadIrCameraHandle ==
|-
+
Takes an input u32 NpadTypeId. Returns an output [[#IrCameraHandle]].
| 304 || [[#GetIrsensorSharedMemoryHandle]]
+
 
|-
+
== RunPointingProcessor ==
| 305 || [[#StopImageProcessor]]
+
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedDpdProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output.
|-
+
 
| 306 || [[#RunMomentProcessor]]
+
== SuspendImageProcessor ==
|-
+
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output.
| 307 || [[#RunClusteringProcessor]]
+
 
 +
== CheckFirmwareVersion ==
 +
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedMcuVersion]], and an [[AM_services|AppletResourceUserId]]. No output.
 +
 
 +
== IrCameraHandle ==
 +
This is an u32.
 +
 
 +
== PackedMomentProcessorConfig ==
 +
This is a 0x20-byte struct. This is converted from another structure by the official user-process.
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 308 || [[#RunImageTransferProcessor]]
+
! Offset || Size || Description || DefaultConfig
 
|-
 
|-
| 309 || [[#GetImageTransferProcessorState]]
+
| 0x0 || 0x8 || ? || 0x493E0
 
|-
 
|-
| 310 || [[#RunTeraPluginProcessor]]
+
| 0x8 || 0x1 || ? || 0x0
 
|-
 
|-
| 311 || [[#GetNpadIrCameraHandle]]
+
| 0x9 || 0x1 || ? || 0x8
 
|-
 
|-
| 312 || [[#RunPointingProcessor]]
+
| 0xA || 0x1 || ? || 0x0
 
|-
 
|-
| 313 || [[#SuspendImageProcessor]]
+
| 0xB || 0x5 || Padding ||  
 
|-
 
|-
| 314 || [3.0.0+] [[#CheckFirmwareVersion]]
+
| 0x10 || 0x8 || u16, u32, u16 || {Not written}, 0x1400000, 0xF0
 
|-
 
|-
| 315 || [4.0.0+] SetFunctionLevel
+
| 0x18 || 0x4 || Hard-coded to 0xA0003. ||
 
|-
 
|-
| 316 || [4.0.0+] RunImageTransferExProcessor
+
| 0x1C || 0x1 || ? || 0x1
 
|-
 
|-
| 317 || [4.0.0+] RunIrLedProcessor
+
| 0x1D || 0x1 || ? || 0x50
 
|-
 
|-
| 318 || [4.0.0+] StopImageProcessorAsync
+
| 0x1E || 0x2 || Padding ||  
|-
  −
| 319 || [4.0.0+] ActivateIrsensorWithFunctionLevel
   
|}
 
|}
   −
== ActivateIrsensor ==
+
== PackedClusteringProcessorConfig ==
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output.
+
This is a 0x28-byte struct.
   −
== DeactivateIrsensor ==
+
== PackedImageTransferProcessorConfig ==
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output.
+
This is a 0x18-byte struct. This is converted from another structure by the official user-process. The conversion is the same as PackedMomentProcessorConfig, except the code using out +0x1C/+0x1D was removed, and the constant is now located at out+0x10. The code which wrote to out u64 +0x10 from in+0x24 was replaced with code which writes an u8 to out+0x14.
   −
== GetIrsensorSharedMemoryHandle ==
+
== ImageTransferProcessorState ==
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. Returns a SharedMemory handle.
+
This is a 0x10-byte struct.
   −
The SharedMemory is mapped with permissions=read-only and size=0x8000.
+
== PackedTeraPluginProcessorConfig ==
 +
This is an u64.
   −
== StopImageProcessor ==
+
== PackedDpdProcessorConfig ==
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output.
+
This is a 0x10-byte struct.
   −
== RunMomentProcessor ==
+
== PackedMcuVersion ==
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedMomentProcessorConfig]]. No output.
+
This is an u32.
   −
== RunClusteringProcessor ==
+
= irs:sys =
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedClusteringProcessorConfig]]. No output.
+
This is "nn::irsensor::IIrSensorSystemServer".
   −
== RunImageTransferProcessor ==
+
{| class="wikitable" border="1"
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], a [[#PackedImageTransferProcessorConfig]], an u64 for the TransferMemory_size, and a TransferMemory handle. No output.
+
|-
 
+
! Cmd || Name
Official sw creates the TransferMemory with an user-specified buffer and permissions=0.
+
|-
 
+
| 500 || SetAppletResourceUserId
== GetImageTransferProcessorState ==
+
|-
Takes a PID-descriptor, a type-0x6 output buffer, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. Returns an [[#ImageTransferProcessorState]]. No output.
+
| 501 || RegisterAppletResourceUserId
 +
|-
 +
| 502 || UnregisterAppletResourceUserId
 +
|-
 +
| 503 || EnableAppletToGetInput
 +
|}
   −
== RunTeraPluginProcessor==
+
= ahid:cd =
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedTeraPluginProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output.
+
This is "nn::ahid::IServerSession".
   −
== GetNpadIrCameraHandle ==
+
Used for USB HID devices.
Takes an input u32 NpadTypeId. Returns an output [[#IrCameraHandle]].
     −
== RunPointingProcessor ==
+
This service no longer exists in [9.0.0+].
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedDpdProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output.
     −
== SuspendImageProcessor ==
+
{| class="wikitable" border="1"
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output.
+
|-
 
+
! Cmd || Name
== CheckFirmwareVersion ==
+
|-
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedMcuVersion]], and an [[AM_services|AppletResourceUserId]]. No output.
+
| 0 || [[#AcquireDevice]]
 +
|-
 +
| 1 || [[#ReleaseDevice]]
 +
|-
 +
| 2 || [[#GetCtrlSession]]
 +
|-
 +
| 3 || [[#GetReadSession]]
 +
|-
 +
| 4 || [1.0.0-2.3.0] [[#GetWriteSession]]
 +
|}
 +
 
 +
== AcquireDevice ==
 +
Takes an input s32, no output.
 +
 
 +
== ReleaseDevice ==
 +
Takes an input s32, no output.
 +
 
 +
== GetCtrlSession ==
 +
Takes an input u32, returns an [[#ICtrlSession]].
   −
== IrCameraHandle ==
+
== GetReadSession ==
This is an u32.
+
Takes an input u32, returns an [[#IReadSession]].
 +
 
 +
== GetWriteSession ==
 +
Takes an input u32, returns an [[#IWriteSession]].
 +
 
 +
== ICtrlSession ==
 +
This is "nn::ahid::ICtrlSession".
   −
== PackedMomentProcessorConfig ==
+
This no longer exists in [9.0.0+].
This is a 0x20-byte struct. This is converted from another structure by the official user-process.
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Offset || Size || Description || DefaultConfig
+
! Cmd || Name
 +
|-
 +
| 0 || GetString
 
|-
 
|-
| 0x0 || 0x8 || ? || 0x493E0
+
| 1 || GetCodeBook
 
|-
 
|-
| 0x8 || 0x1 || ? || 0x0
+
| 2 || GetReport
 
|-
 
|-
| 0x9 || 0x1 || ? || 0x8
+
| 3 || SetReport
 
|-
 
|-
| 0xA || 0x1 || ? || 0x0
+
| 4 || GetIdle
 
|-
 
|-
| 0xB || 0x5 || Padding ||  
+
| 5 || SetIdle
 
|-
 
|-
| 0x10 || 0x8 || u16, u32, u16 || {Not written}, 0x1400000, 0xF0
+
| 6 || GetProtocol
 
|-
 
|-
| 0x18 || 0x4 || Hard-coded to 0xA0003. ||  
+
| 7 || SetProtocol
 
|-
 
|-
| 0x1C || 0x1 || ? || 0x1
+
| 8 || GetDescriptor
 
|-
 
|-
| 0x1D || 0x1 || ? || 0x50
+
| 9 || SetDescriptor
 
|-
 
|-
| 0x1E || 0x2 || Padding ||  
+
| 10 || GetStateChangeEvent
 +
|-
 +
| 11 || SignalStateChangeEvent
 +
|-
 +
| 12 || [3.0.0+] Write
 
|}
 
|}
   −
== PackedClusteringProcessorConfig ==
+
All of these use USB [[USB_services|CtrlXfer]], except for GetStateChangeEvent and SignalStateChangeEvent, and GetCodeBook which copies 0x4000-bytes from state to output.
This is a 0x28-byte struct.
     −
== PackedImageTransferProcessorConfig ==
+
== IReadSession ==
This is a 0x18-byte struct. This is converted from another structure by the official user-process. The conversion is the same as PackedMomentProcessorConfig, except the code using out +0x1C/+0x1D was removed, and the constant is now located at out+0x10. The code which wrote to out u64 +0x10 from in+0x24 was replaced with code which writes an u8 to out+0x14.
+
This is "nn::ahid::IReadSession".
   −
== ImageTransferProcessorState ==
+
This no longer exists in [9.0.0+].
This is a 0x10-byte struct.
  −
 
  −
== PackedTeraPluginProcessorConfig ==
  −
This is an u64.
  −
 
  −
== PackedDpdProcessorConfig ==
  −
This is a 0x10-byte struct.
  −
 
  −
== PackedMcuVersion ==
  −
This is an u32.
  −
 
  −
= irs:sys =
  −
This is "nn::irsensor::IIrSensorSystemServer".
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,758: Line 2,004:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 500 || SetAppletResourceUserId
+
| 0 || [[#Read]]
|-
  −
| 501 || RegisterAppletResourceUserId
  −
|-
  −
| 502 || UnregisterAppletResourceUserId
  −
|-
  −
| 503 || EnableAppletToGetInput
   
|}
 
|}
   −
= ahid:cd =
+
=== Read ===
This is "nn::ahid::IServerSession".
+
Uses [[USB_services|PostBufferAsync]] etc with the INPUT endpoint. The size must be <=0x1000. The actual transfer size is returned in an output u64. The data is copied from the tmpbuf to the output buffer using the actual-transfer-size.
   −
Used for USB HID devices.
+
[3.0.0+] Now takes a total of 8-bytes of input.
   −
This service no longer exists in [9.0.0+].
+
== IWriteSession ==
 +
This is "nn::ahid::IWriteSession".
   −
{| class="wikitable" border="1"
+
This was removed with [3.0.0+].
|-
  −
! Cmd || Name || Notes
  −
|-
  −
| 0 || AcquireDevice || Takes an input s32, no output.
  −
|-
  −
| 1 || ReleaseDevice || Takes an input s32, no output.
  −
|-
  −
| 2 || GetCtrlSession || Takes an input u32, returns an [[#ICtrlSession]].
  −
|-
  −
| 3 || GetReadSession || Takes an input u32, returns an [[#IReadSession]].
  −
|-
  −
| [1.0.0-2.3.0] 4 || GetWriteSession || Takes an input u32, returns an [[#IWriteSession]].
  −
|}
  −
 
  −
== ICtrlSession ==
  −
This is "nn::ahid::ICtrlSession".
  −
 
  −
This no longer exists in [9.0.0+].
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
|-
  −
| 0 || GetString ||
  −
|-
  −
| 1 || GetCodeBook ||
  −
|-
  −
| 2 || GetReport ||
  −
|-
  −
| 3 || SetReport ||
  −
|-
  −
| 4 || GetIdle ||
  −
|-
  −
| 5 || SetIdle ||
  −
|-
  −
| 6 || GetProtocol ||
  −
|-
  −
| 7 || SetProtocol ||
  −
|-
  −
| 8 || GetDescriptor ||
  −
|-
  −
| 9 || SetDescriptor ||
  −
|-
  −
| 10 || GetStateChangeEvent ||
  −
|-
  −
| 11 || SignalStateChangeEvent ||
   
|-
 
|-
| 12 || [3.0.0+] Write ||
+
| 0 || [[#Write]]
 
|}
 
|}
   −
All of these use USB [[USB_services|CtrlXfer]], except for cmd10-11 which are event(?) related, and cmd1 which copies 0x4000-bytes from state to output.
+
=== Write ===
 
+
This is the inverse of [[#IReadSession]] cmd0. Uses the OUTPUT endpoint with an input buffer.
== IReadSession ==
  −
This is "nn::ahid::IReadSession".
  −
 
  −
This no longer exists in [9.0.0+].
  −
 
  −
{| class="wikitable" border="1"
  −
|-
  −
! Cmd || Name || Notes
  −
|-
  −
| 0 || Read ||
  −
|}
  −
 
  −
Cmd0 uses [[USB_services|PostBufferAsync]] etc with the INPUT endpoint. The size must be <=0x1000. The actual transfer size is returned in an output u64. The data is copied from the tmpbuf to the output buffer using the actual-transfer-size.
  −
 
  −
[3.0.0+] Cmd0 now takes a total of 8-bytes of input.
  −
 
  −
== IWriteSession ==
  −
This is "nn::ahid::IWriteSession".
  −
 
  −
This was removed with [3.0.0+].
  −
 
  −
{| class="wikitable" border="1"
  −
|-
  −
! Cmd || Name || Notes
  −
|-
  −
| 0 || Write || This is the inverse of [[#IReadSession]] cmd0. Uses the OUTPUT endpoint with an input buffer.
  −
|}
      
= ahid:hdr =
 
= ahid:hdr =
Line 1,898: Line 2,070:  
| 5 || CheckNfcDevicePower
 
| 5 || CheckNfcDevicePower
 
|-
 
|-
| 6 || [5.0.0+]
+
| 6 || [5.0.0+] SetMcuStateImmediate
 
|-
 
|-
 
| 10 || SetNfcEvent
 
| 10 || SetNfcEvent
Line 1,964: Line 2,136:  
| 12 || DisableJoyPollingReceiveMode
 
| 12 || DisableJoyPollingReceiveMode
 
|-
 
|-
| [5.0.0-6.2.0] 13 || GetPollingData
+
| 13 || [5.0.0-6.2.0] GetPollingData
 
|-
 
|-
 
| 14 || [6.0.0+] SetStatusManagerType
 
| 14 || [6.0.0+] SetStatusManagerType

Navigation menu