Changes

Jump to navigation Jump to search
9,552 bytes added ,  16:15, 12 October 2019
Line 192: Line 192:  
| 404 || [4.0.0+] HasLeftRightBattery
 
| 404 || [4.0.0+] HasLeftRightBattery
 
|-
 
|-
| 405 || [4.0.0+] GetNpadInterfaceType
+
| 405 || [4.0.0+] [[#GetNpadInterfaceType]]
 
|-
 
|-
 
| 406 || [4.0.0+] GetNpadLeftRightInterfaceType
 
| 406 || [4.0.0+] GetNpadLeftRightInterfaceType
 +
|-
 +
| 407 || [9.0.0+] GetNpadOfHighestBatteryLevelForJoyLeft
 +
|-
 +
| 408 || [9.0.0+] GetNpadOfHighestBatteryLevelForJoyRight
 
|-
 
|-
 
| 500 || [5.0.0+] GetPalmaConnectionHandle
 
| 500 || [5.0.0+] GetPalmaConnectionHandle
Line 259: Line 263:  
|-
 
|-
 
| 1001 || GetNpadCommunicationMode
 
| 1001 || GetNpadCommunicationMode
 +
|-
 +
| 1002 || [9.0.0+] SetTouchScreenConfiguration
 +
|-
 +
| 1003 || [9.0.0+] IsFirmwareUpdateNeededForNotification
 
|}
 
|}
   Line 265: Line 273:     
== SetSupportedNpadStyleSet ==
 
== SetSupportedNpadStyleSet ==
Takes an u32 [[#NpadStyleTag]].
+
Takes a PID-descriptor, an u32 [[#NpadStyleTag]], and an u64 [[AM_services|AppletResourceUserId]], no output.
    
== GetSupportedNpadStyleSet ==
 
== GetSupportedNpadStyleSet ==
Returns an u32 [[#NpadStyleTag]].
+
Takes a PID-descriptor and an u64 [[AM_services|AppletResourceUserId]], returns an u32 [[#NpadStyleTag]].
    
== SetSupportedNpadIdType ==
 
== SetSupportedNpadIdType ==
Line 276: Line 284:     
== 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.
Line 321: Line 329:     
== 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.
    
== ActivateSevenSixAxisSensor ==
 
== ActivateSevenSixAxisSensor ==
Line 348: Line 356:  
== ResetSevenSixAxisSensorTimestamp ==
 
== ResetSevenSixAxisSensorTimestamp ==
 
Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output.
 
Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output.
 +
 +
== GetNpadInterfaceType ==
 +
Takes an input u32 NpadIdType, returns an output u8 [[#NpadInterfaceType]].
 +
 +
The NpadInterfaceType must be 1-4, otherwise this will assert.
    
== VibrationDeviceHandle ==
 
== VibrationDeviceHandle ==
Line 421: Line 434:  
| 7
 
| 7
 
| NpadLark
 
| NpadLark
| NES controller.
+
| NES/Famicom controller.
 
|-
 
|-
 
| 8
 
| 8
 
| NpadHandheldLark
 
| NpadHandheldLark
| NES controller in handheld mode.
+
| NES/Famicom controller in handheld mode.
 
|-
 
|-
 
| 9
 
| 9
 
| NpadLucia
 
| NpadLucia
|  
+
| SNES controller.
 
|-
 
|-
 
| 10-28
 
| 10-28
Line 437: Line 450:  
| 29
 
| 29
 
| NpadSystemExt
 
| NpadSystemExt
|
+
| Generic external controller.
 
|-
 
|-
 
| 30
 
| 30
 
| NpadSystem
 
| NpadSystem
|
+
| Generic controller.
 
|-
 
|-
 
| 31
 
| 31
Line 450: Line 463:  
== 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 469: Line 499:  
|-
 
|-
 
| 12 || UnsetTouchScreenAutoPilotState
 
| 12 || UnsetTouchScreenAutoPilotState
 +
|-
 +
| 13 || [9.0.0+] GetTouchScreenConfiguration
 
|-
 
|-
 
| 20 || DeactivateMouse
 
| 20 || DeactivateMouse
Line 488: Line 520:  
| 52 || UnsetXpadAutoPilotState
 
| 52 || UnsetXpadAutoPilotState
 
|-
 
|-
| 60 || DeactivateJoyXpad
+
| 53 ([1.0.0-8.1.0] 60) || [[#DeactivateJoyXpad]]
 +
|-
 +
| 60 || [9.0.0+] ClearNpadSystemCommonPolicy
 
|-
 
|-
 
| 91 || DeactivateGesture
 
| 91 || DeactivateGesture
Line 578: Line 612:  
| 224 || [5.0.0+] [[#UpdateDesignInfo]]
 
| 224 || [5.0.0+] [[#UpdateDesignInfo]]
 
|-
 
|-
| 225 || [5.0.0+] GetUniquePadDriverState
+
| 225 || [5.0.0+] [[#GetUniquePadDriverState]]
 
|-
 
|-
| 226 || [5.0.0+] GetSixAxisSensorDriverStates
+
| 226 || [5.0.0+] [[#GetSixAxisSensorDriverStates]]
 
|-
 
|-
 
| 227 || [5.0.0+] GetRxPacketHistory
 
| 227 || [5.0.0+] GetRxPacketHistory
Line 588: Line 622:  
| 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
Line 596: Line 630:  
| 233 || [6.0.0+] ClearPairingInfo
 
| 233 || [6.0.0+] ClearPairingInfo
 
|-
 
|-
| 234 || [6.0.0+] GetUniquePadDeviceTypeSetInternal
+
| 234 || [6.0.0+] [[#GetUniquePadDeviceTypeSetInternal]]
 
|-
 
|-
 
| 235 || [7.0.0+] EnableAnalogStickPower
 
| 235 || [7.0.0+] EnableAnalogStickPower
 
|-
 
|-
| 301 || [5.0.0+] [[#GetAbstractedPadHandles]]
+
| 236 || [9.0.0+] RequestKuinaUartClockCal
 
|-
 
|-
| 302 || [5.0.0+] [[#GetAbstractedPadState]]
+
| 237 || [9.0.0+] GetKuinaUartClockCal
 
|-
 
|-
| 303 || [5.0.0+] [[#GetAbstractedPadsState]]
+
| 238 || [9.0.0+] SetKuinaUartClockTrim
 
|-
 
|-
| 321 || [5.0.0+] [[#SetAutoPilotVirtualPadState]]
+
| 239 || [9.0.0+] KuinaLoopbackTest
 
|-
 
|-
| 322 || [5.0.0+] [[#UnsetAutoPilotVirtualPadState]]
+
| 240 || [9.0.0+] RequestBatteryVoltage
 
|-
 
|-
| 323 || [5.0.0+] [[#UnsetAllAutoPilotVirtualPadState]]
+
| 241 || [9.0.0+] GetBatteryVoltage
 
|-
 
|-
| 324 || [7.0.0+] [[#AttachHdlsWorkBuffer]]
+
| 242 || [9.0.0+] GetUniquePadPowerInfo
 
|-
 
|-
| 325 || [7.0.0+] [[#ReleaseHdlsWorkBuffer]]
+
| 243 || [9.0.0+] RebootUniquePad
 
|-
 
|-
| 326 || [7.0.0+] [[#DumpHdlsNpadAssignmentState]]
+
| 244 || [9.0.0+] RequestKuinaFirmwareVersion
 
|-
 
|-
| 327 || [7.0.0+] [[#DumpHdlsStates]]
+
| 245 || [9.0.0+] GetKuinaFirmwareVersion
 
|-
 
|-
| 328 || [7.0.0+] [[#ApplyHdlsNpadAssignmentState]]
+
| 246 || [9.0.0+] GetVidPid
 +
|-
 +
| 301 || [5.0.0-8.1.0] [[#GetAbstractedPadHandles]]
 +
|-
 +
| 302 || [5.0.0-8.1.0] [[#GetAbstractedPadState]]
 +
|-
 +
| 303 || [5.0.0-8.1.0] [[#GetAbstractedPadsState]]
 +
|-
 +
| 321 || [5.0.0-8.1.0] [[#SetAutoPilotVirtualPadState]]
 +
|-
 +
| 322 || [5.0.0-8.1.0] [[#UnsetAutoPilotVirtualPadState]]
 +
|-
 +
| 323 || [5.0.0+] [[#UnsetAllAutoPilotVirtualPadState]]
 +
|-
 +
| 324 || [7.0.0+] [[#AttachHdlsWorkBuffer]]
 +
|-
 +
| 325 || [7.0.0+] [[#ReleaseHdlsWorkBuffer]]
 +
|-
 +
| 326 || [7.0.0+] [[#DumpHdlsNpadAssignmentState]]
 +
|-
 +
| 327 || [7.0.0+] [[#DumpHdlsStates]]
 +
|-
 +
| 328 || [7.0.0+] [[#ApplyHdlsNpadAssignmentState]]
 
|-
 
|-
 
| 329 || [7.0.0+] [[#ApplyHdlsStateList]]
 
| 329 || [7.0.0+] [[#ApplyHdlsStateList]]
Line 639: Line 695:  
|-
 
|-
 
| 501 || [8.0.0+] IsFactoryBootEnabled
 
| 501 || [8.0.0+] IsFactoryBootEnabled
 +
|-
 +
| 550 || [9.0.0+] SetAnalogStickModelDataTemporarily
 +
|-
 +
| 551 || [9.0.0+] GetAnalogStickModelData
 +
|-
 +
| 552 || [9.0.0+] ResetAnalogStickModelData
 
|}
 
|}
   Line 674: Line 736:     
Sends the spi-write subcommand to the specified controller, for writing to offset 0x6050 size 0xD. The first 3-bytes from each u32 is used for the spi-write-data, with the u8 being copied immediately afterwards the color data.
 
Sends the spi-write subcommand to the specified controller, for writing to offset 0x6050 size 0xD. The first 3-bytes from each u32 is used for the spi-write-data, with the u8 being copied immediately afterwards the color data.
 +
 +
== GetUniquePadDriverState ==
 +
Takes a total of 8-bytes of input, returns a total of 0x20-bytes of output.
 +
 +
[9.0.0+] Now takes a total of 8-bytes of input, returns a total of 0x18-bytes of output.
 +
 +
== GetSixAxisSensorDriverStates ==
 +
Takes a total of 8-bytes of input and a type-0xA 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.
    
== ReadSerialFlash ==
 
== ReadSerialFlash ==
Line 681: Line 753:     
This doesn't seem to be usable?
 
This doesn't seem to be usable?
 +
 +
== 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.
 +
 +
Writes to the specified controller's spi-flash. The TransferMemory permissions is R--.
 +
 +
== GetUniquePadDeviceTypeSetInternal ==
 +
Takes an input u64 '''UniquePadId''', returns an [[#DeviceTypeInternal]].
    
== GetAbstractedPadHandles ==
 
== GetAbstractedPadHandles ==
Line 749: Line 829:  
Takes an input [[#HdlsState]] and an input 8-byte '''HdlsHandle''', no output.
 
Takes an input [[#HdlsState]] and an input 8-byte '''HdlsHandle''', no output.
   −
== HdlsNpadAssignment ==
+
[9.0.0+] Input order was swapped: now takes an input 8-byte '''HdlsHandle''' and a [[#HdlsState]], no output.
This is a 0x208-byte struct. This seems to be an array, structure unknown.
      
== AbstractedPadState ==
 
== AbstractedPadState ==
Line 757: Line 836:  
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x98 || ?
+
| 0x0 || 0x4 || Type, only 1 bit can be set. Converted to [[#HdlsDeviceInfo]]::type internally by [[#SetAutoPilotVirtualPadState]].
|}
+
|-
 
+
| 0x4 || 0x1 || Flags. [[#SetAutoPilotVirtualPadState]] only uses bit0: when clear it will skip using the rest of the input and run [[#UnsetAutoPilotVirtualPadState]] internally.
== HdlsStateList ==
+
|-
{| class="wikitable" border="1"
+
| 0x5 || 0x3 || Padding
 +
|-
 +
| 0x8 || 0x4 || RGBA Single Body Color
 +
|-
 +
| 0xC || 0x4 || RGBA Single Buttons Color
 
|-
 
|-
! Offset || Size || Description
+
| 0x10 || 0x1 || See [[#HiddbgHdlsDeviceInfo]]::[[#NpadInterfaceType]].
 
|-
 
|-
| 0x0 || 0x4 || Total entries
+
| 0x11 || 0x3 || Padding
 
|-
 
|-
| 0x4 || 0x4 || Padding
+
| 0x14 || 0x24 || [[#HdlsState]]. Unknown if the last 4-bytes are included in this struct, [[#SetAutoPilotVirtualPadState]]/[[#hiddbgGetAbstractedPadsState]] only uses the first 0x20-bytes.
 
|-
 
|-
| 0x8 || 0x400(0x40*0x10) || Array of [[#HdlsStateListEntry]].
+
| 0x38 || 0x60 || Unused with [[#SetAutoPilotVirtualPadState]]/[[#GetAbstractedPadsState]].
 
|}
 
|}
   −
This is a 0x408-byte struct.
+
Normally the input state is merged with an existing controller selected by Type. However in some cases (BIT(2-5) with type2!=0x2 and BIT(31)) it's detected as a dedicated controller.
   −
This contains a list of all controllers, including non-virtual controllers.
+
Type:
 
  −
=== HdlsStateListEntry ===
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 +
!  Bits
 +
!  [[#HdlsDeviceInfo]]::type bits
 +
!  Description
 +
!  Notes
 
|-
 
|-
! Offset || Size || Description
+
| 0 || 0 || ||  
 
|-
 
|-
| 0x0 || 0x8 || HdlsHandle
+
| 1 || 15 || || [[#DeviceType]] |= BIT(1)
 
|-
 
|-
| 0x8 || 0x10 || [[#HdlsDeviceInfo]]. With [[#ApplyHdlsStateList]] this is only used when creating new devices.
+
| 2 || 1 || ||  
 
|-
 
|-
| 0x18 || 0x24 || [[#HdlsState]]
+
| 3 || 2 || ||  
 
|-
 
|-
| 0x3C || 0x4 || Padding
+
| 4 || 1 || ||  
|}
  −
 
  −
This is a 0x40-byte struct.
  −
 
  −
== HdlsDeviceInfo ==
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Description
+
| 5 || 2 || ||  
 
|-
 
|-
| 0x0 || 0x4 || Only one bit can be set, see below.
+
| 6 || 3 || ||  
 
|-
 
|-
| 0x4 || 0x4 || RGBA Single Body Color
+
| 7 || 11 || || [[#DeviceType]] |= BIT(11)
 
|-
 
|-
| 0x8 || 0x4 || RGBA Single Buttons Color
+
| 8 || 12 || || [[#DeviceType]] |= BIT(12)
 
|-
 
|-
| 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 Joy-Con Left/Right: with value 0x2 the system doesn't list the controller in hid sharedmem. Type bit21: value 0x3 = unknown.
+
| 9 || 13 || || [[#DeviceType]] |= BIT(13)
 +
|-
 +
| 10 || 14 || || [[#DeviceType]] |= BIT(14)
 +
|-
 +
| 11 || 15 || || [[#DeviceType]] |= BIT(11)
 +
|-
 +
| 12 || 12 || || [[#DeviceType]] |= BIT(12)
 +
|-
 +
| 13 || 13 || || [[#DeviceType]] |= BIT(13)
 +
|-
 +
| 14 || 14 || || [[#DeviceType]] |= BIT(14)
 +
|-
 +
| 15 || 17 || ||
 +
|-
 +
| 31 || 21 || || [[#DeviceType]] = BIT(31)
 
|-
 
|-
| 0xD || 0x3 || Padding
   
|}
 
|}
   −
This is a 0x10-byte struct.
+
The above "[[#DeviceType]] |=" notes only apply when type2 is 0x2.
 
  −
Bits for the above type field:
      +
== HdlsNpadAssignment ==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
!  Bits
  −
!  Description
  −
!  Notes
   
|-
 
|-
| 0-7
+
! Offset || Size || Description
|  
  −
| BIT(N*4+0) = Pro-Controller, BIT(N*4+1) = Joy-Con Left, BIT(N*4+2) = Joy-Con Right, BIT(N*4+3) = invalid. Where N is 0-1.
   
|-
 
|-
| 8-10
+
| 0x0 || 0x4 || s32 Total entries
|  
  −
| Pro-Controller
   
|-
 
|-
| 11
+
| 0x4 || 0x4 || Padding
|  
  −
| Famicom-Controller
   
|-
 
|-
| 12
+
| 0x8 || 0x200(0x20*0x10) || Array of [[#HdlsNpadAssignmentEntry]].
|  
+
|}
| Famicom-Controller II with microphone
+
 
 +
This is a 0x208-byte struct.
 +
 
 +
=== HdlsNpadAssignmentEntry ===
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 
|-
 
|-
| 13
+
| 0x0 || 0x8 || HdlsHandle
|  
  −
| NES-Controller ([[#DeviceType]]=0x200)
   
|-
 
|-
| 14
+
| 0x8 || 0x4 || ?
|  
  −
| NES-Controller ([[#DeviceType]]=0x400)
   
|-
 
|-
| 15-16
+
| 0xC || 0x4 || ?
|  
  −
| Invalid
   
|-
 
|-
| 17
+
| 0x10 || 0x8 || ?
|  
  −
| Unknown ([[#DeviceType]]=0x8000)
   
|-
 
|-
| 18-20
+
| 0x18 || 0x1 || ?
|  
  −
| Invalid
   
|-
 
|-
| 21-23
+
| 0x19 || 0x7 || Padding
|  
  −
| Unknown ([[#DeviceType]]=0x80000000)
   
|}
 
|}
   −
== HdlsState ==
+
This is a 0x20-byte struct.
 +
 
 +
== HdlsStateList ==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x1 || powerConnected for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
+
| 0x0 || 0x4 || s32 Total entries
 
|-
 
|-
| 0x1 || 0x1 || ORRed with powerConnected to set the value of the first byte for the controller [[HID_Shared_Memory#Flags|flags]].
+
| 0x4 || 0x4 || Padding
 
|-
 
|-
| 0x2 || 0x6 || Unknown
+
| 0x8 || <[[#HdlsStateListEntry]] size>*0x10 || Array of [[#HdlsStateListEntry]].
 +
|}
 +
 
 +
This is a 0x408-byte struct. [9.0.0+] This is a 0x488-byte struct.
 +
 
 +
This contains a list of all controllers, including non-virtual controllers.
 +
 
 +
=== HdlsStateListEntry ===
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x8 || 0x4 || batteryCharge for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
+
! Offset || Size || Description
 
|-
 
|-
| 0xC || 0x4 || Buttons
+
| 0x0 || 0x8 || HdlsHandle
 
|-
 
|-
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]].
+
| 0x8 || [[#HdlsDeviceInfo]] size || [[#HdlsDeviceInfo]]. With [[#ApplyHdlsStateList]] this is only used when creating new devices.
 
|-
 
|-
| 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases).
+
| 0x8 + [[#HdlsDeviceInfo]] size, with 8-byte alignment || 0x24 || [[#HdlsState]]
 
|-
 
|-
| 0x21 || 0x3 || Padding
+
| <Immediately following the above> || 0x4 || Padding
 
|}
 
|}
   −
This is a 0x24-byte struct.
+
This is a 0x40-byte struct. [9.0.0+] This is a 0x48-byte struct.
 
  −
= hid:sys =
  −
This is "nn::hid::IHidSystemServer".
      +
== HdlsDeviceInfo ==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Offset || Size || Description
 
|-
 
|-
| 31 || SendKeyboardLockKeyEvent
+
| 0x0 || 0x4 || [[#DeviceTypeInternal]]
 
|-
 
|-
| 101 || AcquireHomeButtonEventHandle
+
| 0x4 || 0x4 || RGBA Single Body Color
 
|-
 
|-
| 111 || ActivateHomeButton
+
| 0x8 || 0x4 || RGBA Single Buttons Color
 
|-
 
|-
| 121 || AcquireSleepButtonEventHandle
+
| 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.
 
|-
 
|-
| 131 || ActivateSleepButton
+
| 0xD || 0x3 || Padding
 +
|}
 +
 
 +
[9.0.0+]:
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 141 || AcquireCaptureButtonEventHandle
+
! Offset || Size || Description
 
|-
 
|-
| 151 || ActivateCaptureButton
+
| 0x0 || 0x1 || [[#DeviceTypeInternal]]
 
|-
 
|-
| 161 || [7.0.0+] GetPlatformConfig
+
| 0x1 || 0x1 || [[#NpadInterfaceType]]. Similar to the field from the old struct.
 
|-
 
|-
| 210 || AcquireNfcDeviceUpdateEventHandle
+
| 0x2 || 0x2 || Padding
 
|-
 
|-
| 211 || GetNpadsWithNfc
+
| 0x4 || 0x4 || RGBA Single Body Color
 
|-
 
|-
| 212 || AcquireNfcActivateEventHandle
+
| 0x8 || 0x4 || RGBA Single Buttons Color
 
|-
 
|-
| 213 || ActivateNfc
+
| 0xC || 0x4 || RGBA Unknown Body Color
 
|-
 
|-
| 214 || [4.0.0+] GetXcdHandleForNpadWithNfc
+
| 0x10 || 0x4 || RGBA Unknown Buttons Color
 +
|}
 +
 
 +
This is a 0x10-byte struct. [9.0.0+] This is a 0x14-byte struct.
 +
 
 +
== 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"
 +
!  Bits
 +
!  Description
 +
!  Notes
 
|-
 
|-
| 215 || [4.0.0+] IsNfcActivated
+
| 0-7
 +
|  
 +
| BIT(N*4+0) = Pro Controller, BIT(N*4+1) = Joy-Con Left, BIT(N*4+2) = Joy-Con Right, BIT(N*4+3) = invalid. Where N is 0-1.
 
|-
 
|-
| 230 || AcquireIrSensorEventHandle
+
| 8-10
 +
|  
 +
| Pro Controller
 
|-
 
|-
| 231 || ActivateIrSensor
+
| 11
 +
|  
 +
| Famicom left controller
 
|-
 
|-
| 301 || ActivateNpadSystem
+
| 12
 +
|  
 +
| Famicom right controller (with microphone)
 
|-
 
|-
| 303 || ApplyNpadSystemCommonPolicy
+
| 13
 +
|  
 +
| NES left controller
 
|-
 
|-
| 304 || EnableAssigningSingleOnSlSrPress
+
| 14
 +
|  
 +
| NES right controller
 
|-
 
|-
| 305 || DisableAssigningSingleOnSlSrPress
+
| 15-16
 +
|  
 +
| Invalid
 
|-
 
|-
| 306 || GetLastActiveNpad
+
| 17
 +
|  
 +
| Generic external controller
 
|-
 
|-
| 307 || GetNpadSystemExtStyle
+
| 18-20
 +
|  
 +
| Invalid
 
|-
 
|-
| 308 || [5.0.0+] ApplyNpadSystemCommonPolicyFull
+
| 21-23
 +
|  
 +
| Generic controller
 +
|}
 +
 
 +
u8 values for "nn::hidtypes::DeviceType", must match one of the these values:
 +
 
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
!  Notes
 
|-
 
|-
| 309 || [5.0.0+] GetNpadFullKeyGripColor
+
| 1 || JoyRight ||  
 
|-
 
|-
| 310 || [6.0.0+] GetMaskedSupportedNpadStyleSet
+
| 2 || JoyLeft ||  
 
|-
 
|-
| 311 || SetNpadPlayerLedBlinkingDevice
+
| 3 || FullKey ||  
 
|-
 
|-
| 312 || [6.0.0+] SetSupportedNpadStyleSetAll
+
| 4 || JoyLeft ||  
 
|-
 
|-
| 321 || [3.0.0+] [[#GetUniquePadsFromNpad]]
+
| 5 || JoyRight ||  
 
|-
 
|-
| 322 || GetIrSensorState
+
| 6 || FullKey ||  
 
|-
 
|-
| 323 || GetXcdHandleForNpadWithIrSensor
+
| 7 || LarkLeft (HVC) ||  
 
|-
 
|-
| 500 || SetAppletResourceUserId
+
| 8 || LarkRight (HVC) ||  
 
|-
 
|-
| 501 || RegisterAppletResourceUserId
+
| 9 || LarkLeft (NES) ||  
 
|-
 
|-
| 502 || UnregisterAppletResourceUserId
+
| 10 || LarkRight (NES) ||  
 
|-
 
|-
| 503 || EnableAppletToGetInput
+
| 11 || Invalid ||  
 
|-
 
|-
| 504 || SetAruidValidForVibration
+
| 12 || Palma ||  
 
|-
 
|-
| 505 || EnableAppletToGetSixAxisSensor
+
| 13 || FullKey ||  
 
|-
 
|-
| 510 || [[#SetVibrationMasterVolume]]
+
| 14 || Invalid ||  
 
|-
 
|-
| 511 || GetVibrationMasterVolume
+
| 15 || FullKey ||  
 
|-
 
|-
| 512 || [3.0.0+] BeginPermitVibrationSession
+
| 16 || Controller is missing in sharedmem.
 
|-
 
|-
| 513 || [3.0.0+] EndPermitVibrationSession
+
| 17-18 || Invalid ||  
 
|-
 
|-
| 520 || EnableHandheldHids
+
| 19 || [[#DeviceType]] System with [[#NpadStyleTag]] |= NpadFullKey
 
|-
 
|-
| 521 || DisableHandheldHids
+
| 20 || [[#DeviceType]] System with [[#NpadStyleTag]] |= NpadJoyDual
 
|-
 
|-
| 540 || AcquirePlayReportControllerUsageUpdateEvent
+
| 21 || [[#DeviceType]] System with [[#NpadStyleTag]] |= NpadJoyDual
 +
|}
 +
 
 +
== HdlsState ==
 +
 
 +
Pre-9.0.0:
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 541 || GetPlayReportControllerUsages
+
! Offset || Size || Description
 
|-
 
|-
| 542 || AcquirePlayReportRegisteredDeviceUpdateEvent
+
| 0x0 || 0x1 || powerConnected for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
 
|-
 
|-
| 543 || GetRegisteredDevicesOld ([1.0.0-4.1.0] GetRegisteredDevices)
+
| 0x1 || 0x1 || ORRed with powerConnected to set the value of the first byte for the controller [[HID_Shared_Memory#Flags|flags]].
 
|-
 
|-
| 544 || [3.0.0+] AcquireConnectionTriggerTimeoutEvent
+
| 0x2 || 0x6 || Unknown
 
|-
 
|-
| 545 || [3.0.0+] SendConnectionTrigger
+
| 0x8 || 0x4 || batteryCharge for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
 
|-
 
|-
| 546 || [3.0.0+] AcquireDeviceRegisteredEventForControllerSupport
+
| 0xC || 0x4 || [[HID_Shared_Memory#Button_State|Buttons]]. Bit18 = HOME and bit19 = Capture.
 
|-
 
|-
| 547 || [3.0.0+] GetAllowedBluetoothLinksCount
+
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]].
 
|-
 
|-
| 548 || [5.0.0+] GetRegisteredDevices
+
| 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases).
 
|-
 
|-
| 549 || [6.0.0+] GetConnectableRegisteredDevices
+
| 0x21 || 0x3 || Padding
 +
|}
 +
 
 +
[9.0.0+]:
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 700 || ActivateUniquePad
+
! Offset || Size || Description
 
|-
 
|-
| 702 || AcquireUniquePadConnectionEventHandle
+
| 0x0 || 0x4 || batteryCharge for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
 
|-
 
|-
| 703 || [[#GetUniquePadIds]]
+
| 0x4 || 0x4 || Unknown
 
|-
 
|-
| 751 || AcquireJoyDetachOnBluetoothOffEventHandle
+
| 0x8 || 0x8 || [[HID_Shared_Memory#Button_State|Buttons]], masked with 0xfffffffff00fffff. See above table regarding HOME/Capture buttons.
 
|-
 
|-
| 800 || ListSixAxisSensorHandles
+
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]].
 
|-
 
|-
| 801 || IsSixAxisSensorUserCalibrationSupported
+
| 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases).
 
|-
 
|-
| 802 || ResetSixAxisSensorCalibrationValues
+
| 0x21 || 0x3 || Padding
 +
|}
 +
 
 +
This is a 0x24-byte struct.
 +
 
 +
= hid:sys =
 +
This is "nn::hid::IHidSystemServer".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 803 || StartSixAxisSensorUserCalibration
+
! Cmd || Name
 
|-
 
|-
| 804 || CancelSixAxisSensorUserCalibration
+
| 31 || SendKeyboardLockKeyEvent
 
|-
 
|-
| 805 || [3.0.0+] GetUniquePadBluetoothAddress
+
| 101 || AcquireHomeButtonEventHandle
 
|-
 
|-
| 806 || [3.0.0+] DisconnectUniquePad
+
| 111 || ActivateHomeButton
 
|-
 
|-
| 807 || [5.0.0+] GetUniquePadType
+
| 121 || AcquireSleepButtonEventHandle
 
|-
 
|-
| 808 || [5.0.0+] GetUniquePadInterface
+
| 131 || ActivateSleepButton
 
|-
 
|-
| 809 || [5.0.0+] GetUniquePadSerialNumber
+
| 141 || AcquireCaptureButtonEventHandle
 
|-
 
|-
| 810 || [5.0.0+] GetUniquePadControllerNumber
+
| 151 || ActivateCaptureButton
 
|-
 
|-
| 811 || [5.0.0+] GetSixAxisSensorUserCalibrationStage
+
| 161 || [7.0.0+] GetPlatformConfig
 
|-
 
|-
| 812 || [8.0.0+] GetConsoleUniqueSixAxisSensorHandle
+
| 210 || AcquireNfcDeviceUpdateEventHandle
 
|-
 
|-
| 821 || StartAnalogStickManualCalibration
+
| 211 || GetNpadsWithNfc
 
|-
 
|-
| 822 || RetryCurrentAnalogStickManualCalibrationStage
+
| 212 || AcquireNfcActivateEventHandle
 
|-
 
|-
| 823 || CancelAnalogStickManualCalibration
+
| 213 || ActivateNfc
 
|-
 
|-
| 824 || ResetAnalogStickManualCalibration
+
| 214 || [4.0.0+] GetXcdHandleForNpadWithNfc
 
|-
 
|-
| 825 || [5.0.0+] GetAnalogStickState
+
| 215 || [4.0.0+] IsNfcActivated
 
|-
 
|-
| 826 || [5.0.0+] GetAnalogStickManualCalibrationStage
+
| 230 || AcquireIrSensorEventHandle
 
|-
 
|-
| 827 || [5.0.0+] IsAnalogStickButtonPressed
+
| 231 || ActivateIrSensor
 
|-
 
|-
| 828 || [5.0.0+] IsAnalogStickInReleasePosition
+
| 301 || ActivateNpadSystem
 
|-
 
|-
| 829 || [5.0.0+] IsAnalogStickInCircumference
+
| 303 || ApplyNpadSystemCommonPolicy
 
|-
 
|-
| 830 || [7.0.0+] [[#SetNotificationLedPattern]]
+
| 304 || EnableAssigningSingleOnSlSrPress
 
|-
 
|-
| 850 || [3.0.0+] IsUsbFullKeyControllerEnabled
+
| 305 || DisableAssigningSingleOnSlSrPress
 
|-
 
|-
| 851 || [3.0.0+] EnableUsbFullKeyController
+
| 306 || GetLastActiveNpad
 
|-
 
|-
| 852 || [3.0.0+] IsUsbConnected
+
| 307 || GetNpadSystemExtStyle
 
|-
 
|-
| 870 || [5.1.0+] IsHandheldButtonPressedOnConsoleMode
+
| 308 || [5.0.0+] ApplyNpadSystemCommonPolicyFull
 
|-
 
|-
| 900 || ActivateInputDetector
+
| 309 || [5.0.0+] GetNpadFullKeyGripColor
 
|-
 
|-
| 901 || [[#NotifyInputDetector]]
+
| 310 || [6.0.0+] [[#GetMaskedSupportedNpadStyleSet]]
 
|-
 
|-
| 1000 || [3.0.0+] InitializeFirmwareUpdate
+
| 311 || SetNpadPlayerLedBlinkingDevice
 
|-
 
|-
| 1001 || [3.0.0+] GetFirmwareVersion
+
| 312 || [6.0.0+] SetSupportedNpadStyleSetAll
 
|-
 
|-
| 1002 || [3.0.0+] GetAvailableFirmwareVersion
+
| 313 || [9.0.0+] GetNpadCaptureButtonAssignment
 
|-
 
|-
| 1003 || [3.0.0+] IsFirmwareUpdateAvailable
+
| 314 || [9.0.0+] GetAppletFooterUiType
 
|-
 
|-
| 1004 || [3.0.0+] CheckFirmwareUpdateRequired
+
| 315 || [9.0.0+] GetAppletDetailedUiType
 
|-
 
|-
| 1005 || [3.0.0+] StartFirmwareUpdate
+
| 321 || [3.0.0+] [[#GetUniquePadsFromNpad]]
 
|-
 
|-
| 1006 || [3.0.0+] AbortFirmwareUpdate
+
| 322 || GetIrSensorState
 
|-
 
|-
| 1007 || [3.0.0+] GetFirmwareUpdateState
+
| 323 || GetXcdHandleForNpadWithIrSensor
 
|-
 
|-
| 1008 || [4.0.0+] ActivateAudioControl
+
| 500 || SetAppletResourceUserId
 
|-
 
|-
| 1009 || [4.0.0+] AcquireAudioControlEventHandle
+
| 501 || RegisterAppletResourceUserId
 
|-
 
|-
| 1010 || [4.0.0+] GetAudioControlStates
+
| 502 || UnregisterAppletResourceUserId
 
|-
 
|-
| 1011 || [4.0.0+] DeactivateAudioControl
+
| 503 || EnableAppletToGetInput
 
|-
 
|-
| 1050 || [5.0.0+] IsSixAxisSensorAccurateUserCalibrationSupported
+
| 504 || SetAruidValidForVibration
 
|-
 
|-
| 1051 || [5.0.0+] StartSixAxisSensorAccurateUserCalibration
+
| 505 || EnableAppletToGetSixAxisSensor
 
|-
 
|-
| 1052 || [5.0.0+] CancelSixAxisSensorAccurateUserCalibration
+
| 510 || [[#SetVibrationMasterVolume]]
 
|-
 
|-
| 1053 || [5.0.0+] GetSixAxisSensorAccurateUserCalibrationState
+
| 511 || GetVibrationMasterVolume
 
|-
 
|-
| 1100 || [5.0.0+] [[#GetHidbusSystemServiceObject]]
+
| 512 || [3.0.0+] BeginPermitVibrationSession
 
|-
 
|-
| 1120 || [6.0.0+] SetFirmwareHotfixUpdateSkipEnabled
+
| 513 || [3.0.0+] EndPermitVibrationSession
 
|-
 
|-
| 1130 || [6.0.0+] InitializeUsbFirmwareUpdate
+
| 520 || EnableHandheldHids
 
|-
 
|-
| 1131 || [6.0.0+] FinalizeUsbFirmwareUpdate
+
| 521 || DisableHandheldHids
 
|-
 
|-
| 1132 || [6.0.0+] CheckUsbFirmwareUpdateRequired
+
| 522 || [9.0.0+] SetJoyConRailEnabled
 
|-
 
|-
| 1133 || [6.0.0+] StartUsbFirmwareUpdate
+
| 523 || [9.0.0+] IsJoyConRailEnabled
 
|-
 
|-
| 1134 || [6.0.0+] GetUsbFirmwareUpdateState
+
| 540 || AcquirePlayReportControllerUsageUpdateEvent
 
|-
 
|-
| 1150 || [8.0.0+] SetTouchScreenMagnification
+
| 541 || GetPlayReportControllerUsages
|}
+
|-
 
+
| 542 || AcquirePlayReportRegisteredDeviceUpdateEvent
== GetUniquePadsFromNpad ==
+
|-
Takes an input u32 [[#NpadIdType]], a type-0xA output buffer, and returns an output u64 for total output entries.
+
| 543 || GetRegisteredDevicesOld ([1.0.0-4.1.0] GetRegisteredDevices)
 
+
|-
The output buffer contains an array of u64 '''UniquePadId'''.
+
| 544 || [3.0.0+] AcquireConnectionTriggerTimeoutEvent
 
+
|-
== SetVibrationMasterVolume ==
+
| 545 || [3.0.0+] SendConnectionTrigger
Takes an input 32bit float.
+
|-
 
+
| 546 || [3.0.0+] AcquireDeviceRegisteredEventForControllerSupport
== GetUniquePadIds ==
+
|-
Takes a type-0xA output buffer, and returns an output u64 for total output entries.
+
| 547 || [3.0.0+] GetAllowedBluetoothLinksCount
 
+
|-
The output buffer contains an array of u64 '''UniquePadId'''.
+
| 548 || [5.0.0+] GetRegisteredDevices
 
+
|-
== NotifyInputDetector ==
+
| 549 || [6.0.0+] GetConnectableRegisteredDevices
Takes an input u32 bitmask InputSourceId, no output.
+
|-
 +
| 700 || ActivateUniquePad
 +
|-
 +
| 702 || AcquireUniquePadConnectionEventHandle
 +
|-
 +
| 703 || [[#GetUniquePadIds]]
 +
|-
 +
| 751 || AcquireJoyDetachOnBluetoothOffEventHandle
 +
|-
 +
| 800 || ListSixAxisSensorHandles
 +
|-
 +
| 801 || IsSixAxisSensorUserCalibrationSupported
 +
|-
 +
| 802 || ResetSixAxisSensorCalibrationValues
 +
|-
 +
| 803 || StartSixAxisSensorUserCalibration
 +
|-
 +
| 804 || CancelSixAxisSensorUserCalibration
 +
|-
 +
| 805 || [3.0.0+] GetUniquePadBluetoothAddress
 +
|-
 +
| 806 || [3.0.0+] DisconnectUniquePad
 +
|-
 +
| 807 || [5.0.0+] GetUniquePadType
 +
|-
 +
| 808 || [5.0.0+] GetUniquePadInterface
 +
|-
 +
| 809 || [5.0.0+] GetUniquePadSerialNumber
 +
|-
 +
| 810 || [5.0.0+] GetUniquePadControllerNumber
 +
|-
 +
| 811 || [5.0.0+] GetSixAxisSensorUserCalibrationStage
 +
|-
 +
| 812 || [8.0.0+] GetConsoleUniqueSixAxisSensorHandle
 +
|-
 +
| 821 || StartAnalogStickManualCalibration
 +
|-
 +
| 822 || RetryCurrentAnalogStickManualCalibrationStage
 +
|-
 +
| 823 || CancelAnalogStickManualCalibration
 +
|-
 +
| 824 || ResetAnalogStickManualCalibration
 +
|-
 +
| 825 || [5.0.0+] GetAnalogStickState
 +
|-
 +
| 826 || [5.0.0+] GetAnalogStickManualCalibrationStage
 +
|-
 +
| 827 || [5.0.0+] IsAnalogStickButtonPressed
 +
|-
 +
| 828 || [5.0.0+] IsAnalogStickInReleasePosition
 +
|-
 +
| 829 || [5.0.0+] IsAnalogStickInCircumference
 +
|-
 +
| 830 || [7.0.0+] [[#SetNotificationLedPattern]]
 +
|-
 +
| 831 || [9.0.0+] [[#SetNotificationLedPatternWithTimeout]]
 +
|-
 +
| 832 || [9.0.0+] [[#PrepareHidsForNotificationWake]]
 +
|-
 +
| 850 || [3.0.0+] IsUsbFullKeyControllerEnabled
 +
|-
 +
| 851 || [3.0.0+] EnableUsbFullKeyController
 +
|-
 +
| 852 || [3.0.0+] IsUsbConnected
 +
|-
 +
| 870 || [5.1.0+] IsHandheldButtonPressedOnConsoleMode
 +
|-
 +
| 900 || ActivateInputDetector
 +
|-
 +
| 901 || [[#NotifyInputDetector]]
 +
|-
 +
| 1000 || [3.0.0+] InitializeFirmwareUpdate
 +
|-
 +
| 1001 || [3.0.0+] GetFirmwareVersion
 +
|-
 +
| 1002 || [3.0.0+] GetAvailableFirmwareVersion
 +
|-
 +
| 1003 || [3.0.0+] IsFirmwareUpdateAvailable
 +
|-
 +
| 1004 || [3.0.0+] CheckFirmwareUpdateRequired
 +
|-
 +
| 1005 || [3.0.0+] StartFirmwareUpdate
 +
|-
 +
| 1006 || [3.0.0+] AbortFirmwareUpdate
 +
|-
 +
| 1007 || [3.0.0+] GetFirmwareUpdateState
 +
|-
 +
| 1008 || [4.0.0+] ActivateAudioControl
 +
|-
 +
| 1009 || [4.0.0+] AcquireAudioControlEventHandle
 +
|-
 +
| 1010 || [4.0.0+] GetAudioControlStates
 +
|-
 +
| 1011 || [4.0.0+] DeactivateAudioControl
 +
|-
 +
| 1050 || [5.0.0+] IsSixAxisSensorAccurateUserCalibrationSupported
 +
|-
 +
| 1051 || [5.0.0+] StartSixAxisSensorAccurateUserCalibration
 +
|-
 +
| 1052 || [5.0.0+] CancelSixAxisSensorAccurateUserCalibration
 +
|-
 +
| 1053 || [5.0.0+] GetSixAxisSensorAccurateUserCalibrationState
 +
|-
 +
| 1100 || [5.0.0+] [[#GetHidbusSystemServiceObject]]
 +
|-
 +
| 1120 || [6.0.0+] SetFirmwareHotfixUpdateSkipEnabled
 +
|-
 +
| 1130 || [6.0.0+] InitializeUsbFirmwareUpdate
 +
|-
 +
| 1131 || [6.0.0+] FinalizeUsbFirmwareUpdate
 +
|-
 +
| 1132 || [6.0.0+] CheckUsbFirmwareUpdateRequired
 +
|-
 +
| 1133 || [6.0.0+] StartUsbFirmwareUpdate
 +
|-
 +
| 1134 || [6.0.0+] GetUsbFirmwareUpdateState
 +
|-
 +
| 1150 || [8.0.0+] SetTouchScreenMagnification
 +
|-
 +
| 1151 || [9.0.0+] GetTouchScreenFirmwareVersion
 +
|-
 +
| 1152 || [9.0.0+] SetTouchScreenDefaultConfiguration
 +
|-
 +
| 1153 || [9.0.0+] GetTouchScreenDefaultConfiguration
 +
|-
 +
| 1154 || [9.0.0+] IsFirmwareAvailableForNotification
 +
|-
 +
| 1155 || [9.0.0+] SetForceHandheldStyleVibration
 +
|-
 +
| 1156 || [9.0.0+] SendConnectionTriggerWithoutTimeoutEvent
 +
|}
 +
 
 +
== GetMaskedSupportedNpadStyleSet ==
 +
Takes an input u64 AppletResourceUserId, returns an output u32 [[#NpadStyleTag]].
 +
 
 +
Official sw uses the output from [[Applet_Manager_services|GetAppletResourceUserIdOfCallerApplet]] with this.
 +
 
 +
== 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).
 +
 
 +
The output buffer contains an array of u64 '''UniquePadId'''.
 +
 
 +
== SetVibrationMasterVolume ==
 +
Takes an input 32bit float.
 +
 
 +
== 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].
 +
 
 +
== SetNotificationLedPatternWithTimeout ==
 +
Takes an input [[#NotificationLedPattern]], an u64 '''UniquePadId''', and an s64 TimeSpan, no output.
   −
This is the only hid:sys command used by USB-sysmodule (with value 0x40).
+
== PrepareHidsForNotificationWake ==
 
+
Takes a type-0x9 input buffer containing an array of u64 '''UniquePadId''', no output.
== 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 ==
 
== GetHidbusSystemServiceObject ==
Line 1,323: Line 1,629:  
| 0
 
| 0
 
| FullKey
 
| FullKey
| Pro Controller.
+
| Pro Controller and Gc controller.
 
|-
 
|-
 
| 1
 
| 1
Line 1,331: Line 1,637:  
| 2
 
| 2
 
| HandheldLeft
 
| HandheldLeft
| Joy-Con left controller in handheld mode.
+
| Joy-Con/Famicom/NES left controller in handheld mode.
 
|-
 
|-
 
| 3
 
| 3
 
| HandheldRight
 
| HandheldRight
| Joy-Con right controller in handheld mode.
+
| Joy-Con/Famicom/NES right controller in handheld mode.
 
|-
 
|-
 
| 4
 
| 4
 
| JoyLeft
 
| JoyLeft
| Joy-Con left controller in single mode.
+
| Joy-Con left controller.
 
|-
 
|-
 
| 5
 
| 5
 
| JoyRight
 
| JoyRight
| Joy-Con right controller in single mode.
+
| Joy-Con right controller.
 
|-
 
|-
 
| 6
 
| 6
Line 1,350: Line 1,656:  
|-
 
|-
 
| 7
 
| 7
|  
+
| LarkLeft (HVC)
| Famicom controller.
+
| Famicom left controller.
 
|-
 
|-
 
| 8
 
| 8
|  
+
| LarkRight (HVC)
| Famicom controller II with microphone.
+
| Famicom right controller (with microphone).
 
|-
 
|-
 
| 9
 
| 9
|  
+
| LarkLeft (NES)
| NES controller.
+
| NES left controller.
 
|-
 
|-
 
| 10
 
| 10
|  
+
| LarkRight (NES)
| NES controller (same as above?).
+
| NES right controller.
 
|-
 
|-
 
| 11-14
 
| 11-14
 
|  
 
|  
| Unknown
+
| Reserved
 
|-
 
|-
 
| 15
 
| 15
|  
+
| SystemExt
| Unknown controller type.
+
| Generic external controller.
 
|-
 
|-
 
| 16-30
 
| 16-30
 
|  
 
|  
| Unknown
+
| Reserved
 
|-
 
|-
 
| 31
 
| 31
|  
+
| System
| Unknown controller type (similar to bit15?).
+
| Generic controller.
 
|}
 
|}
   Line 1,565: Line 1,871:  
This is "nn::ahid::IServerSession".
 
This is "nn::ahid::IServerSession".
   −
Used for USB HID devices.  
+
Used for USB HID devices.
 +
 
 +
This service no longer exists in [9.0.0+].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,571: Line 1,879:  
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || || Takes an input s32, no output.
+
| 0 || AcquireDevice || Takes an input s32, no output.
 
|-
 
|-
| 1 || || Takes an input s32, no output.
+
| 1 || ReleaseDevice || Takes an input s32, no output.
 
|-
 
|-
| 2 || || Takes an input u32, returns an [[#ICtrlSession]].
+
| 2 || GetCtrlSession || Takes an input u32, returns an [[#ICtrlSession]].
 
|-
 
|-
| 3 || || Takes an input u32, returns an [[#IReadSession]].
+
| 3 || GetReadSession || Takes an input u32, returns an [[#IReadSession]].
 
|-
 
|-
| [1.0.0-2.3.0] 4 || || Takes an input u32, returns an [[#IWriteSession]].
+
| [1.0.0-2.3.0] 4 || GetWriteSession || Takes an input u32, returns an [[#IWriteSession]].
 
|}
 
|}
    
== ICtrlSession ==
 
== ICtrlSession ==
 
This is "nn::ahid::ICtrlSession".
 
This is "nn::ahid::ICtrlSession".
 +
 +
This no longer exists in [9.0.0+].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,589: Line 1,899:  
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || ||  
+
| 0 || GetString ||  
 
|-
 
|-
| 1 || ||  
+
| 1 || GetCodeBook ||  
 
|-
 
|-
| 2 || ||  
+
| 2 || GetReport ||  
 
|-
 
|-
| 3 || ||  
+
| 3 || SetReport ||  
 
|-
 
|-
| 4 || ||  
+
| 4 || GetIdle ||  
 
|-
 
|-
| 5 || ||  
+
| 5 || SetIdle ||  
 
|-
 
|-
| 6 || ||  
+
| 6 || GetProtocol ||  
 
|-
 
|-
| 7 || ||  
+
| 7 || SetProtocol ||  
 
|-
 
|-
| 8 || ||  
+
| 8 || GetDescriptor ||  
 
|-
 
|-
| 9 || ||  
+
| 9 || SetDescriptor ||  
 
|-
 
|-
| 10 || ||  
+
| 10 || GetStateChangeEvent ||  
 
|-
 
|-
| 11 || ||  
+
| 11 || SignalStateChangeEvent ||  
 
|-
 
|-
| 12 || [3.0.0+] ||  
+
| 12 || [3.0.0+] Write ||  
 
|}
 
|}
   Line 1,620: Line 1,930:  
== IReadSession ==
 
== IReadSession ==
 
This is "nn::ahid::IReadSession".
 
This is "nn::ahid::IReadSession".
 +
 +
This no longer exists in [9.0.0+].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,625: Line 1,937:  
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || ||  
+
| 0 || Read ||  
 
|}
 
|}
   Line 1,641: Line 1,953:  
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || || This is the inverse of [[#IReadSession]] cmd0. Uses the OUTPUT endpoint with an input buffer.
+
| 0 || Write || This is the inverse of [[#IReadSession]] cmd0. Uses the OUTPUT endpoint with an input buffer.
 
|}
 
|}
   Line 1,648: Line 1,960:     
Used internally for USB HID devices.
 
Used internally for USB HID devices.
 +
 +
This service no longer exists in [9.0.0+].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,653: Line 1,967:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 ||  
+
| 0 || GetDeviceEntries
 
|-
 
|-
| 1 ||  
+
| 1 || GetDeviceList
 
|-
 
|-
| 2 ||  
+
| 2 || GetDeviceParameters
 
|-
 
|-
| 3 ||  
+
| 3 || AttachDevice
 
|-
 
|-
| 4 ||
+
| 4 || DetachDevice
 
|-
 
|-
| 5 || [6.0.0+]
+
| 5 || [6.0.0+] SetDeviceFilter
 
|}
 
|}
   Line 1,765: Line 2,079:     
These are firmware files for the touchscreen controller.
 
These are firmware files for the touchscreen controller.
 +
 +
[9.0.0+] The hid-sysmodule RomFS now contains:
 +
  ftmFwUpdate
 +
    ├── FTS_00120100.fts256
 +
    ├── FTS_32000001.fts256
 +
    ├── FTS_32000102.fts256
 +
    ├── FTS_32000302.fts256
 +
    └── FTS_32000402.fts256
    
= Firmware update =
 
= Firmware update =
Line 1,770: Line 2,092:     
These titles contain the following files:
 
These titles contain the following files:
* '''ExpectVersionInfo.csv''' - List in the format "[device],[type],[version]" where "device" can be "JoyLeft", "JoyRight", "FullKey" or "Palma", "type" can be "BT", "MCU" or "USB" and "version" is the hexadecimal representation of the firmware file's version.
+
* '''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.
 
* '''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.
 
* '''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.
 
* '''ukyosakyo_ep2_ota.bin''' - Left/Right Joy-Con BT firmware.
 
* '''ukyosakyo_ep2_ota.bin''' - Left/Right Joy-Con BT firmware.
Line 1,780: Line 2,102:  
* [6.0.0+] '''ProController.dfu''' - Pro Controller USB firmware.
 
* [6.0.0+] '''ProController.dfu''' - Pro Controller USB firmware.
 
* [6.1.0+] '''PalmaFw.bin''' - Poké Ball Plus BT firmware.
 
* [6.1.0+] '''PalmaFw.bin''' - Poké Ball Plus BT firmware.
 +
* [9.0.0+] '''ExpectVersionInfo-platform.hoag.csv''' - Same as "ExpectVersionInfo.csv" but for the Switch Lite platform.
 +
* [9.0.0+] '''FirmwareInfo-platform.hoag.csv''' - Same as "FirmwareInfo.csv" but for the Switch Lite platform.
 +
* [9.0.0+] '''sioh.bin''' - Switch Lite Joy-Con firmware.
 +
* [9.0.0+] '''sioh_iap.bin''' - Switch Lite Joy-Con (IAP profile) firmware.
    
[[Category:Services]]
 
[[Category:Services]]

Navigation menu