HID services: Difference between revisions
No edit summary |
No edit summary |
||
Line 3,527: | Line 3,527: | ||
| 0x10 | | 0x10 | ||
| 0x8 | | 0x8 | ||
| Stage | | [[#AnalogStickManualCalibrationStage|Stage]] | ||
|- | |- | ||
| 0x18 | | 0x18 | ||
Line 3,601: | Line 3,601: | ||
| 0x8 | | 0x8 | ||
| 0x8 | | 0x8 | ||
| Stage | | [[#SixAxisSensorUserCalibrationStage|Stage]] | ||
|- | |- | ||
| 0x10 | | 0x10 | ||
Line 3,747: | Line 3,747: | ||
| 0x419C | | 0x419C | ||
| 0x4 | | 0x4 | ||
| | | [[#BatteryLevel|BatteryLevelJoyDual]] | ||
|- | |- | ||
| 0x41A0 | | 0x41A0 | ||
| 0x4 | | 0x4 | ||
| | | [[#BatteryLevel|BatteryLevelJoyLeft]] | ||
|- | |- | ||
| 0x41A4 | | 0x41A4 | ||
| 0x4 | | 0x4 | ||
| | | [[#BatteryLevel|BatteryLevelJoyRight]] | ||
|- | |- | ||
| 0x41A8 | | 0x41A8 | ||
Line 4,417: | Line 4,417: | ||
| 0x8 | | 0x8 | ||
| 0x28 | | 0x28 | ||
| [[# | | [[#NpadSystemExtState]] | ||
|} | |} | ||
Line 5,094: | Line 5,094: | ||
= DebugPadAttributeSet = | = DebugPadAttributeSet = | ||
This is "nn::hid::DebugPadAttributeSet". This is a BitFlagSet object for [[#DebugPadAttribute]]. | This is "nn::hid::DebugPadAttributeSet". This is a BitFlagSet object for [[#DebugPadAttribute]]. | ||
= DebugPadAttribute = | |||
This is "nn::hid::DebugPadAttribute". This is a 32-bit flag. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Bit | |||
! Description | |||
|- | |||
| 0 | |||
| IsConnected | |||
|} | |||
= TouchAttributeSet = | = TouchAttributeSet = | ||
This is "nn::hid::TouchAttributeSet". This is a BitFlagSet object for [[#TouchAttribute]]. | This is "nn::hid::TouchAttributeSet". This is a BitFlagSet object for [[#TouchAttribute]]. | ||
= TouchAttribute = | |||
This is "nn::hid::TouchAttribute". This is a 32-bit flag. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Bit | |||
! Description | |||
|- | |||
| 0 | |||
| Start | |||
|- | |||
| 1 | |||
| End | |||
|} | |||
= MouseAttributeSet = | = MouseAttributeSet = | ||
This is "nn::hid::MouseAttributeSet". This is a BitFlagSet object for [[#MouseAttribute]]. | This is "nn::hid::MouseAttributeSet". This is a BitFlagSet object for [[#MouseAttribute]]. | ||
= MouseAttribute = | |||
This is "nn::hid::MouseAttribute". This is a 32-bit flag. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Bit | |||
! Description | |||
|- | |||
| 0 | |||
| Transferable | |||
|- | |||
| 1 | |||
| IsConnected | |||
|} | |||
= BasicXpadAttributeSet = | = BasicXpadAttributeSet = | ||
Line 5,107: | Line 5,149: | ||
This is "nn::hid::NpadAttributesSet". This is a BitFlagSet object for [[#NpadAttribute]]. | This is "nn::hid::NpadAttributesSet". This is a BitFlagSet object for [[#NpadAttribute]]. | ||
= | = NpadAttribute = | ||
This is "nn::hid:: | This is "nn::hid::NpadAttribute". This is a 32-bit flag. | ||
= | {| class="wikitable" border="1" | ||
|- | |||
! Bit | |||
! Description | |||
|- | |||
| 0 | |||
| IsConnected | |||
|- | |||
| 1 | |||
| IsWired | |||
|- | |||
| 2 | |||
| IsLeftConnected | |||
|- | |||
| 3 | |||
| IsLeftWired | |||
|- | |||
| 4 | |||
| IsRightConnected | |||
|- | |||
| 5 | |||
| IsRightWired | |||
|} | |||
= | = SixAxisSensorAttributeSet = | ||
This is "nn::hid:: | This is "nn::hid::SixAxisSensorAttributeSet". This is a BitFlagSet object for [[#SixAxisSensorAttribute]]. | ||
= | = SixAxisSensorAttribute = | ||
This is "nn::hid:: | This is "nn::hid::SixAxisSensorAttribute". This is a 32-bit flag. | ||
= | {| class="wikitable" border="1" | ||
|- | |||
! Bit | |||
! Description | |||
|- | |||
| 0 | |||
| IsConnected | |||
|- | |||
| 1 | |||
| IsInterpolated | |||
|} | |||
= | = GestureAttributeSet = | ||
This is "nn::hid:: | This is "nn::hid::GestureAttributeSet". This is a BitFlagSet object for [[#GestureAttribute]]. | ||
= | = GestureAttribute = | ||
This is "nn::hid:: | This is "nn::hid::GestureAttribute". This is a 32-bit flag. | ||
= | {| class="wikitable" border="1" | ||
|- | |||
! Bit | |||
! Description | |||
|- | |||
| 4 | |||
| IsNewTouch | |||
|- | |||
| 8 | |||
| IsDoubleTap | |||
|} | |||
= | = DebugPadButtonSet = | ||
This is "nn::hid:: | This is "nn::hid::DebugPadButtonSet". This is a BitFlagSet object for [[#DebugPadButton]]. | ||
= | = DebugPadButton = | ||
This is "nn::hid:: | This is "nn::hid::DebugPadButton". This is a 32-bit flag. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! | |- | ||
! | ! Bit | ||
! Description | |||
|- | |- | ||
| 0 | | 0 | ||
| | | A | ||
|- | |- | ||
| 1 | | 1 | ||
| | | B | ||
|- | |- | ||
| 2 | | 2 | ||
| | | X | ||
|- | |- | ||
| 3 | | 3 | ||
| | | Y | ||
|- | |- | ||
| 4 | | 4 | ||
| | | L | ||
|- | |- | ||
| 5 | | 5 | ||
| | | R | ||
|- | |- | ||
| 6 | | 6 | ||
| | | ZL | ||
|- | |- | ||
| 7 | | 7 | ||
| | | ZR | ||
|- | |- | ||
| 8 | | 8 | ||
| | | Start | ||
|- | |- | ||
| 9 | | 9 | ||
| | | Select | ||
|- | |- | ||
| 10 | | 10 | ||
| Left | |||
| | |||
|- | |- | ||
| | | 11 | ||
| | | Up | ||
|- | |- | ||
| | | 12 | ||
| | | Right | ||
|- | |- | ||
| | | 13 | ||
| Down | |||
| | |||
|} | |} | ||
= | = MouseButtonSet = | ||
This is "nn::hid:: | This is "nn::hid::MouseButtonSet". This is a BitFlagSet object for [[#MouseButton]]. | ||
= | = MouseButton = | ||
This is "nn::hid:: | This is "nn::hid::MouseButton". This is a 32-bit flag. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| 0 || | ! Bit | ||
! Description | |||
|- | |||
| 0 | |||
| Left | |||
|- | |||
| 1 | |||
| Right | |||
|- | |- | ||
| | | 2 | ||
| Middle | |||
|- | |- | ||
| | | 3 | ||
| Forward | |||
|- | |- | ||
| | | 4 | ||
| Back | |||
|} | |} | ||
= | = KeyboardModifierSet = | ||
This is "nn::hid:: | This is "nn::hid::KeyboardModifierSet". This is a BitFlagSet object for [[#KeyboardModifier]]. | ||
= KeyboardModifier = | |||
This is "nn::hid::KeyboardModifier". This is a 32-bit flag. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Bit | |||
! Description | |||
|- | |- | ||
| | | 0 | ||
| Control | |||
|- | |- | ||
| | | 1 | ||
| Shift | |||
|- | |- | ||
| | | 2 | ||
| | | LeftAlt | ||
|- | |- | ||
| | | 3 | ||
| RightAlt | |||
|- | |- | ||
| | | 4 | ||
| Gui | |||
|- | |- | ||
| | | 8 | ||
| CapsLock | |||
|- | |- | ||
| | | 9 | ||
| ScrollLock | |||
|- | |- | ||
| | | 10 | ||
| NumLock | |||
|- | |- | ||
| | | 11 | ||
| Katakana | |||
|- | |- | ||
| | | 12 | ||
| Hiragana | |||
|} | |||
= KeyboardKeySet = | |||
This is "nn::hid::KeyboardKeySet". This is a BitFlagSet object for [[#KeyboardKey]]. | |||
= BasicXpadButtonSet = | |||
This is "nn::hid::BasicXpadButtonSet". This is a BitFlagSet object for [[#BasicXpadButton]]. | |||
= HomeButtonSet = | |||
This is "nn::hid::system::HomeButtonSet". This is a BitFlagSet object for [[#HomeButton]]. | |||
= SleepButtonSet = | |||
This is "nn::hid::system::SleepButtonSet". This is a BitFlagSet object for [[#SleepButton]]. | |||
= CaptureButtonSet = | |||
This is "nn::hid::system::CaptureButtonSet". This is a BitFlagSet object for [[#CaptureButton]]. | |||
= NpadButtonSet = | |||
This is "nn::hid::NpadButtonSet". This is a BitFlagSet object for [[#NpadButton]]. | |||
= | = NpadButton = | ||
This is "nn::hid:: | This is "nn::hid::NpadButton". This is a 64-bit flag. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| 0 | | ! Bit | ||
! Description | |||
|- | |||
| 0 | |||
| A | |||
|- | |- | ||
| 1 | | | 1 | ||
| B | |||
|- | |- | ||
| 2 | | 2 | ||
| X | |||
|- | |- | ||
| | | 3 | ||
| Y | |||
|- | |- | ||
| | | 4 | ||
| StickL | |||
|- | |- | ||
| | | 5 | ||
| StickR | |||
|- | |- | ||
| | | 6 | ||
| L | |||
|- | |- | ||
| | | 7 | ||
| R | |||
|- | |- | ||
| | | 8 | ||
| ZL | |||
|- | |- | ||
| | | 9 | ||
| ZR | |||
|- | |- | ||
| | | 10 | ||
| Plus | |||
|- | |- | ||
| | | 11 | ||
| Minus | |||
|- | |- | ||
| | | 12 | ||
| Left | |||
|- | |- | ||
| | | 13 | ||
| Up | |||
|- | |- | ||
| | | 14 | ||
| Right | |||
|- | |- | ||
| | | 15 | ||
| Down | |||
|- | |- | ||
| | | 16 | ||
| StickLLeft | |||
|- | |- | ||
| | | 17 | ||
| StickLUp | |||
|- | |- | ||
| | | 18 | ||
| StickLRight | |||
|- | |- | ||
| | | 19 | ||
| StickLDown | |||
|- | |- | ||
| | | 20 | ||
| StickRLeft | |||
|- | |- | ||
| | | 21 | ||
| StickRUp | |||
|- | |- | ||
| | | 22 | ||
| StickRRight | |||
|- | |- | ||
| | | 23 | ||
| StickRDown | |||
|- | |- | ||
| | | 24 | ||
| LeftSL | |||
|- | |- | ||
| | | 25 | ||
| LeftSR | |||
|- | |- | ||
| | | 26 | ||
| RightSL | |||
|- | |- | ||
| | | 27 | ||
| RightSR | |||
|- | |- | ||
| | | 28 | ||
| Palma | |||
|- | |- | ||
| | | 29 | ||
| | |||
|- | |- | ||
| | | 30 | ||
| HandheldLeftB (Left B button on NES controllers in Handheld mode) | |||
|} | |} | ||
= | = AnalogStickCalibrationFlagsSet = | ||
This is "nn::hid:: | This is "nn::hid::detail::AnalogStickCalibrationFlagsSet". This is a BitFlagSet object for [[#AnalogStickCalibrationFlags]]. | ||
= SixAxisSensorUserCalibrationFlagsSet = | |||
This is "nn::hid::detail::SixAxisSensorUserCalibrationFlagsSet". This is a BitFlagSet object for [[#SixAxisSensorUserCalibrationFlags]]. | |||
= NpadStyleSet = | |||
This is "nn::hid::NpadStyleSet". This is a BitFlagSet object for [[#NpadStyleTag]]. | |||
= NpadStyleTag = | |||
This is "nn::hid::NpadStyleTag". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! | ! Bits | ||
! Description | ! Description | ||
! Notes | |||
|- | |- | ||
| 0 || | | 0 | ||
| NpadStyleFullKey | |||
| Pro Controller | |||
|- | |- | ||
| 1 || | | 1 | ||
| NpadStyleHandheld | |||
| Joy-Con controller in handheld mode | |||
|- | |- | ||
| 2 || | | 2 | ||
| NpadStyleJoyDual | |||
| Joy-Con controller in dual mode | |||
|- | |- | ||
| 3 | | 3 | ||
| | | NpadStyleJoyLeft | ||
| Joy-Con left controller in single mode | |||
|- | |- | ||
| | | 4 | ||
| NpadStyleJoyRight | |||
| Joy-Con right controller in single mode | |||
|- | |- | ||
| | | 5 | ||
| NpadStyleGc | |||
| GameCube controller | |||
|- | |- | ||
| | | 6 | ||
| NpadStylePalma | |||
| Poké Ball Plus controller | |||
|- | |- | ||
| | | 7 | ||
| NpadStyleLark | |||
| NES/Famicom controller | |||
|- | |- | ||
| | | 8 | ||
| | | NpadStyleHandheldLark | ||
| NES/Famicom controller in handheld mode | |||
|- | |- | ||
| | | 9 | ||
| NpadStyleLucia | |||
| SNES controller | |||
|- | |- | ||
| | | 10-28 | ||
| Reserved | |||
| | |||
|- | |- | ||
| | | 29 | ||
| NpadStyleSystemExt | |||
| Generic external controller | |||
|- | |- | ||
| | | 30 | ||
| NpadStyleSystem | |||
| Generic controller | |||
|- | |- | ||
| | | 31 | ||
| Reserved | |||
| | |||
|} | |||
= NpadDeviceTypeSet = | |||
This is "nn::hid::system::NpadDeviceType". This is a BitFlagSet object for [[#NpadDeviceType]]. | |||
= NpadSystemPropertiesSet = | |||
This is "nn::hid::detail::NpadSystemPropertiesSet". This is a BitFlagSet object for [[#NpadSystemProperties]]. | |||
= NpadSystemProperties = | |||
This is "nn::hid::NpadSystemProperties". This is a 64-bit flag. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Bit | |||
! Description | |||
|- | |- | ||
| | | 0 | ||
| IsChargingJoyDual | |||
|- | |- | ||
| | | 1 | ||
| IsChargingJoyLeft | |||
|- | |- | ||
| | | 2 | ||
| IsChargingJoyRight | |||
|- | |- | ||
| | | 3 | ||
| IsPoweredJoyDual | |||
|- | |- | ||
| | | 4 | ||
| IsPoweredJoyLeft | |||
|- | |- | ||
| | | 5 | ||
| IsPoweredJoyRight | |||
|- | |- | ||
| | | 9 | ||
| IsUnsupportedButtonPressedNpadSystem | |||
|- | |- | ||
| | | 10 | ||
| IsUnsupportedButtonPressedNpadSystemExt | |||
|- | |- | ||
| | | 11 | ||
| IsAbxyButtonOriented | |||
|- | |- | ||
| | | 12 | ||
| IsSlSrButtonOriented | |||
|- | |- | ||
| | | 13 | ||
| [4.0.0+] HasPlusButtonCapability | |||
|- | |- | ||
| | | 14 | ||
| [4.0.0+] HasMinusButtonCapability | |||
|- | |- | ||
| | | 15 | ||
| [8.0.0+] IsDirectionalButtonsSupported | |||
| | |||
|} | |} | ||
= | = NpadSystemButtonPropertiesSet = | ||
This is | This is "nn::hid::detail::NpadSystemButtonPropertiesSet". This is a BitFlagSet object for [[#NpadSystemButtonProperties]]. | ||
= NpadSystemButtonProperties = | |||
This is "nn::hid::NpadSystemButtonProperties". This is a 32-bit flag. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Bit | |||
! Description | |||
|- | |- | ||
| | | 0 | ||
| IsUnintendedHomeButtonInputProtectionEnabled | |||
|} | |} | ||
= | = AppletFooterUiAttributesSet = | ||
This is | This is "nn::hid::system::AppletFooterUiAttributesSet". This is a BitFlagSet object for [[#AppletFooterUiAttribute]]. | ||
= | = UniquePadType = | ||
This is | This is "nn::hid::system::UniquePadType". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 5,513: | Line 5,608: | ||
! Description | ! Description | ||
|- | |- | ||
| 1 || | | 0 || Embedded | ||
|- | |||
| 1 || FullKeyController | |||
|- | |- | ||
| 2 || | | 2 || RightController | ||
|- | |- | ||
| 3 || | | 3 || LeftController | ||
|- | |- | ||
| 4 || | | 4 || DebugPadController | ||
|} | |} | ||
= | = UniquePadInterface = | ||
This is "nn::hid::system::UniquePadInterface". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Value | |||
! Description | |||
|- | |- | ||
| 0 || Embedded | |||
|- | |- | ||
| | | 1 || Rail | ||
|- | |- | ||
| | | 2 || Bluetooth | ||
|- | |- | ||
| | | 3 || Usb | ||
|} | |||
= UniquePadSerialNumber = | |||
This is "nn::hid::system::UniquePadSerialNumber". This is a 0x10 byte value. | |||
= UniquePadId = | |||
This is "nn::hid::system::UniquePadId". This is a 8 byte value. | |||
= AnalogStickManualCalibrationStage = | |||
This is "nn::hid::system::AnalogStickManualCalibrationStage". | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |- | ||
| | | 0 || ReleaseFromRight | ||
|- | |- | ||
| | | 1 || ReleaseFromBottom | ||
|- | |- | ||
| | | 2 || ReleaseFromLeft | ||
|- | |- | ||
| | | 3 || ReleaseFromTop | ||
|- | |||
| 4 || Rotate | |||
|- | |||
| 5 || Update | |||
|- | |||
| 6 || Completed | |||
|- | |- | ||
| | | 7 || Clear | ||
|- | |- | ||
| | | 8 || ClearCompleted | ||
|} | |} | ||
= SixAxisSensorUserCalibrationStage = | |||
This is "nn::hid::system::SixAxisSensorUserCalibrationStage". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! | ! Value | ||
! Description | ! Description | ||
|- | |- | ||
| 0 || | | 0 || Measuring | ||
|- | |- | ||
| 1 || | | 1 || Update | ||
|- | |- | ||
| 2 || | | 2 || Completed | ||
|} | |||
= NpadJoyAssignmentMode = | |||
This is "nn::hid::NpadJoyAssignmentMode". | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |- | ||
| | | 0 || Dual | ||
|- | |- | ||
| 1 || Single | |||
|} | |||
= AppletFooterUiType = | |||
This is "nn::hid::system::AppletFooterUiType". | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |- | ||
| | | 0 || None | ||
|- | |- | ||
| | | 1 || HandheldNone | ||
|- | |- | ||
| | | 2 || HandheldJoyConLeftOnly | ||
|- | |- | ||
| | | 3 || HandheldJoyConRightOnly | ||
|- | |- | ||
| | | 4 || HandheldJoyConLeftJoyConRight | ||
|- | |- | ||
| | | 5 || JoyDual | ||
|- | |- | ||
| | | 6 || JoyDualLeftOnly | ||
|- | |- | ||
| | | 7 || JoyDualRightOnly | ||
|- | |- | ||
| | | 8 || JoyLeftHorizontal | ||
|- | |- | ||
| | | 9 || JoyLeftVertical | ||
|- | |- | ||
| | | 10 || JoyRightHorizontal | ||
|- | |- | ||
| | | 11 || JoyRightVertical | ||
|- | |||
| 12 || SwitchProController | |||
|- | |||
| 13 || CompatibleProController | |||
|- | |||
| 14 || CompatibleJoyCon | |||
|- | |||
| 15 || LarkHvc1 | |||
|- | |- | ||
| | | 16 || LarkHvc2 | ||
|- | |- | ||
| 17 || LarkNesLeft | |||
|- | |- | ||
| | | 18 || LarkNesRight | ||
|- | |- | ||
| | | 19 || Lucia | ||
|- | |- | ||
| | | 20 || Verification | ||
|} | |} | ||
= | = NpadIdType = | ||
This is | This is "nn::hid::NpadIdType". This is the controller index used in [[#SharedMemoryFormat|sharedmem]]. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Value | |||
! Description | |||
|- | |- | ||
| 0x0 || No1 | |||
|- | |- | ||
| | | 0x1 || No2 | ||
|- | |||
| 0x2 || No3 | |||
|- | |||
| 0x3 || No4 | |||
|- | |||
| 0x4 || No5 | |||
|- | |- | ||
| | | 0x5 || No6 | ||
|- | |- | ||
| | | 0x6 || No7 | ||
|- | |- | ||
| | | 0x7 || No8 | ||
|- | |- | ||
| | | 0x10 || Other | ||
|- | |- | ||
| | | 0x20 || Handheld | ||
|} | |} | ||
= | = NpadInterfaceType = | ||
This is | This is "nn::hid::NpadInterfaceType". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Value | |||
! Description | |||
|- | |- | ||
| 1 || Bluetooth | |||
|- | |- | ||
| | | 2 || Rail | ||
|- | |- | ||
| | | 3 || USB | ||
|- | |- | ||
| | | 4 || Unknown | ||
|} | |} | ||
= NpadLarkType = | |||
This is "nn::hid::NpadLarkType". | |||
= | |||
This is | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Value | |||
! Description | |||
|- | |- | ||
| 0 || Invalid | |||
|- | |- | ||
| | | 1 || H1 | ||
|- | |- | ||
| | | 2 || H2 | ||
|- | |- | ||
| | | 3 || NL | ||
|- | |- | ||
| | | 4 || NR | ||
|} | |} | ||
= | = NpadLuciaType = | ||
This is | This is "nn::hid::NpadLuciaType". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Value | |||
! Description | |||
|- | |- | ||
| 0 || Invalid | |||
|- | |- | ||
| | | 1 || J | ||
|- | |- | ||
| | | 2 || E | ||
|- | |- | ||
| | | 3 || U | ||
|} | |} | ||
= GestureDirection = | |||
This is "nn::hid::GestureDirection". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Value | |||
! Description | |||
|- | |- | ||
| 0 || None | |||
|- | |- | ||
| | | 1 || Left | ||
|- | |- | ||
| | | 2 || Up | ||
|- | |- | ||
| | | 3 || Right | ||
|- | |- | ||
| | | 4 || Down | ||
|} | |} | ||
= | = GestureType = | ||
This is "nn::hid:: | This is "nn::hid::GestureType". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! | ! Value | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || Idle | ||
| | |||
|- | |- | ||
| | | 1 || Complete | ||
| | |||
|- | |- | ||
| | | 2 || Cancel | ||
| | |||
|- | |- | ||
| | | 3 || Touch | ||
| | |||
|- | |- | ||
| | | 4 || Press | ||
| | |||
|- | |- | ||
| | | 5 || Tap | ||
| | |||
|- | |- | ||
| | | 6 || Pan | ||
| | |||
|- | |- | ||
| | | 7 || Swipe | ||
| | |||
|- | |- | ||
| | | 8 || Pinch | ||
| | |||
|- | |- | ||
| | | 9 || Rotate | ||
| | |||
|} | |} | ||
= DeviceHandle = | |||
This is "nn::xcd::DeviceHandle". This is a 8 byte value. | |||
= DeviceType = | |||
This is "nn::hid::system::DeviceType". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! | ! Bits | ||
! Description | ! Description | ||
|- | |- | ||
| | | 0 | ||
| FullKey | |||
|- | |- | ||
| | | 1 | ||
| DebugPad | |||
|- | |- | ||
| | | 2 | ||
| HandheldLeft | |||
|- | |- | ||
| | | 3 | ||
| HandheldRight | |||
|- | |- | ||
| | | 4 | ||
| JoyLeft | |||
|- | |- | ||
| | | 5 | ||
| JoyRight | |||
|- | |- | ||
| | | 6 | ||
| Palma | |||
|- | |- | ||
| | | 7 | ||
| LarkHvcLeft | |||
|- | |- | ||
| | | 8 | ||
| LarkHvcRight | |||
|- | |- | ||
| | | 9 | ||
| LarkNesLeft | |||
|- | |- | ||
| | | 10 | ||
| LarkNesRight | |||
|- | |- | ||
| | | 11 | ||
| HandheldLarkHvcLeft | |||
|- | |- | ||
| | | 12 | ||
| HandheldLarkHvcRight | |||
|- | |- | ||
| | | 13 | ||
| HandheldLarkNesLeft | |||
|- | |- | ||
| | | 14 | ||
| HandheldLarkNesRight | |||
|- | |- | ||
| | | 15 | ||
| Lucia | |||
|- | |- | ||
| | | 16-30 | ||
| Reserved | |||
|- | |- | ||
| | | 31 | ||
| System | |||
|} | |} | ||
= | = DeviceTypeInternal = | ||
This is | This is "nn::hid::detail::DeviceTypeInternal". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Bits | |||
! Description | |||
|- | |- | ||
| 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. | |||
|- | |||
| 8-10 | |||
| Pro Controller | |||
|- | |- | ||
| | | 11 | ||
| Famicom left controller | |||
|- | |- | ||
| | | 12 | ||
| Famicom right controller (with microphone) | |||
|- | |- | ||
| | | 13 | ||
| NES left controller | |||
|- | |- | ||
| | | 14 | ||
| NES right controller | |||
|- | |- | ||
| | | 15-16 | ||
| Invalid | |||
|- | |- | ||
| | | 17 | ||
| Generic external controller | |||
|- | |- | ||
| | | 18-20 | ||
| Invalid | |||
|- | |- | ||
| | | 21-23 | ||
| Generic controller | |||
|} | |} | ||
[9.0.0+]: | [9.0.0+] This is "nn::hidtypes::DeviceType". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Value | |||
! [[#DeviceType|DeviceType]] | |||
! [[#UniquePadType|UniquePadType]] | |||
! Description | |||
|- | |- | ||
| 1 || JoyRight, HandheldRight || JoyRight || Joy-Con right controller | |||
|- | |- | ||
| | | 2 || JoyLeft, HandheldLeft || JoyLeft || Joy-Con left controller | ||
|- | |- | ||
| | | 3 || FullKey || FullKey || Pro Controller | ||
|- | |- | ||
| | | 4 || JoyLeft || JoyLeft || Reserved | ||
|- | |- | ||
| | | 5 || JoyRight || JoyRight || Reserved | ||
|- | |- | ||
| | | 6 || FullKey || FullKey || Reserved | ||
|- | |- | ||
| | | 7 || LarkHvcLeft, HandheldLarkHvcLeft || JoyLeft || Famicom left controller | ||
| | |||
|- | |- | ||
| 8 || LarkHvcRight, HandheldLarkHvcRight || JoyRight || Famicom right controller (with microphone) | |||
|- | |- | ||
| | | 9 || LarkNesLeft, HandheldLarkNesLeft || JoyLeft || NES left controller | ||
|- | |- | ||
| | | 10 || LarkNesRight, HandheldLarkNesRight || JoyRight || NES right controller | ||
|- | |- | ||
| | | 11 || Lucia || FullKey || SNES controller | ||
|- | |- | ||
| | | 12 || Palma || Other || Poké Ball Plus controller | ||
|- | |- | ||
| | | 13 || FullKey || FullKey || Gc controller | ||
|- | |- | ||
| | | 14 || HandheldLeft || JoyLeft || Reserved | ||
|- | |- | ||
| | | 15 || FullKey || FullKey || Reserved | ||
|- | |- | ||
| | | 16 || FullKey || FullKey || Reserved | ||
|- | |- | ||
| | | 17 || DebugPad || DebugPad || Debug controller | ||
|- | |- | ||
| | | 18 || HandheldRight || JoyRight || Reserved | ||
|- | |- | ||
| | | 19 || System || Other || Unknown (has [[#NpadStyleTag|NpadFullKey]] style tag) | ||
|- | |- | ||
| | | 20 || System || Other || Unknown (has [[#NpadStyleTag|NpadJoyDual]] style tag) | ||
|- | |- | ||
| | | 21 || System || Other || Unknown (has [[#NpadStyleTag|NpadJoyDual]] style tag) | ||
|} | |||
= NpadPowerInfo = | |||
This is "nn::hid::system::NpadPowerInfo". | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Offset | |||
! Size | |||
! Description | |||
|- | |- | ||
| | | 0x0 | ||
| 0x1 | |||
| IsPowered | |||
|- | |- | ||
| | | 0x1 | ||
| 0x1 | |||
| IsCharging | |||
|- | |- | ||
| | | 0x2 | ||
| 0x6 | |||
| Reserved | |||
|- | |- | ||
| | | 0x8 | ||
| 0x6 | |||
| [[#BatteryLevel|BatteryLevel]] | |||
|} | |||
= BatteryLevel = | |||
This is "nn::hid::system::NpadBatteryLevel". This is a 4 byte value. | |||
= GyroscopeZeroDriftMode = | |||
This is "nn::hid::GyroscopeZeroDriftMode". | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |- | ||
| | | 0 || Loose | ||
|- | |- | ||
| | | 1 || Standard | ||
|- | |- | ||
| | | 2 || Tight | ||
|} | |||
= AbstractedPadState = | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
| | ! Offset || Size || Description | ||
|- | |- | ||
| | | 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. | ||
|- | |- | ||
| | | 0x5 || 0x3 || Padding | ||
|- | |- | ||
| | | 0x8 || 0x4 || RGBA Single Body Color | ||
|- | |- | ||
| | | 0xC || 0x4 || RGBA Single Buttons Color | ||
|- | |- | ||
| | | 0x10 || 0x1 || See [[#HiddbgHdlsDeviceInfo]]::[[#NpadInterfaceType]]. | ||
|- | |- | ||
| | | 0x11 || 0x3 || Padding | ||
|- | |- | ||
| | | 0x14 || 0x24 || [[#HdlsState]]. Unknown if the last 4-bytes are included in this struct, [[#SetAutoPilotVirtualPadState]]/[[#hiddbgGetAbstractedPadsState]] only uses the first 0x20-bytes. | ||
|- | |- | ||
| | | 0x38 || 0x60 || Unused with [[#SetAutoPilotVirtualPadState]]/[[#GetAbstractedPadsState]]. | ||
|} | |||
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. | |||
Type: | |||
{| class="wikitable" border="1" | |||
! Bits | |||
! [[#HdlsDeviceInfo]]::type bits | |||
! Description | |||
! Notes | |||
|- | |- | ||
| | | 0 || 0 || || | ||
|- | |- | ||
| | | 1 || 15 || || [[#DeviceType]] |= BIT(1) | ||
|- | |- | ||
| | | 2 || 1 || || | ||
|- | |- | ||
| | | 3 || 2 || || | ||
|- | |- | ||
| | | 4 || 1 || || | ||
|- | |- | ||
| | | 5 || 2 || || | ||
|- | |- | ||
| | | 6 || 3 || || | ||
|- | |- | ||
| | | 7 || 11 || || [[#DeviceType]] |= BIT(11) | ||
|- | |- | ||
| | | 8 || 12 || || [[#DeviceType]] |= BIT(12) | ||
|- | |- | ||
| | | 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) | ||
|- | |- | ||
| | |} | ||
The above "[[#DeviceType]] |=" notes only apply when type2 is 0x2. | |||
= HdlsNpadAssignment = | |||
This is a 0x208-byte struct. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
| | ! Offset || Size || Description | ||
|- | |- | ||
| | | 0x0 || 0x4 || s32 Total entries | ||
|- | |- | ||
| | | 0x4 || 0x4 || Padding | ||
|- | |- | ||
| | | 0x8 || 0x200(0x20*0x10) || Array of [[#HdlsNpadAssignmentEntry]]. | ||
|} | |||
= HdlsNpadAssignmentEntry = | |||
This is a 0x20-byte struct. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
| | ! Offset || Size || Description | ||
|- | |- | ||
| | | 0x0 || 0x8 || HdlsHandle | ||
|- | |- | ||
| | | 0x8 || 0x4 || ? | ||
|- | |- | ||
| | | 0xC || 0x4 || ? | ||
|- | |- | ||
| | | 0x10 || 0x8 || ? | ||
|- | |- | ||
| | | 0x18 || 0x1 || ? | ||
|- | |- | ||
| | | 0x19 || 0x7 || Padding | ||
|} | |||
= HdlsStateList = | |||
This is a 0x408-byte struct. | |||
[9.0.0+] This is a 0x488-byte struct. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
| | ! Offset || Size || Description | ||
|- | |- | ||
| | | 0x0 || 0x4 || s32 Total entries | ||
|- | |- | ||
| | | 0x4 || 0x4 || Padding | ||
|- | |- | ||
| 0x8 || <[[#HdlsStateListEntry]] size>*0x10 || Array of [[#HdlsStateListEntry]]. | |||
|} | |} | ||
This | This contains a list of all controllers, including non-virtual controllers. | ||
This is a | = HdlsStateListEntry = | ||
This is a 0x40-byte struct. | |||
[9.0.0+] This is a 0x48-byte struct. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Offset || Size || Description | ! Offset || Size || Description | ||
|- | |- | ||
| 0x0 || | | 0x0 || 0x8 || HdlsHandle | ||
|- | |- | ||
| | | 0x8 || [[#HdlsDeviceInfo]] size || [[#HdlsDeviceInfo]]. With [[#ApplyHdlsStateList]] this is only used when creating new devices. | ||
|- | |- | ||
| | | 0x8 + [[#HdlsDeviceInfo]] size, with 8-byte alignment || 0x24 || [[#HdlsState]] | ||
|- | |- | ||
| | | <Immediately following the above> || 0x4 || Padding | ||
|} | |} | ||
= | = HdlsDeviceInfo = | ||
This is | This is a 0x10-byte struct. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| | ! Offset || Size || Description | ||
| | |||
|- | |- | ||
| | | 0x0 || 0x4 || [[#DeviceTypeInternal]] | ||
| | |||
|- | |- | ||
| | | 0x4 || 0x4 || RGBA Single Body Color | ||
| | |||
|- | |- | ||
| | | 0x8 || 0x4 || RGBA Single Buttons Color | ||
| | |||
|- | |- | ||
| | | 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 | ||
| | |} | ||
[9.0.0+] This is a 0x14-byte struct. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
| | ! Offset || Size || Description | ||
| | |||
|- | |- | ||
| | | 0x0 || 0x1 || [[#DeviceTypeInternal]] | ||
| | |||
|- | |- | ||
| | | 0x1 || 0x1 || [[#NpadInterfaceType]]. Similar to the field from the old struct. | ||
| | |||
|- | |- | ||
| | | 0x2 || 0x2 || Padding | ||
| | |||
|- | |- | ||
| | | 0x4 || 0x4 || RGBA Single Body Color | ||
| | |||
|- | |- | ||
| | | 0x8 || 0x4 || RGBA Single Buttons Color | ||
| | |||
|- | |- | ||
| | | 0xC || 0x4 || RGBA Unknown Body Color | ||
| | |||
|- | |- | ||
| | | 0x10 || 0x4 || RGBA Unknown Buttons Color | ||
| | |} | ||
= HdlsState = | |||
This is a 0x24-byte struct. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
| | ! Offset || Size || Description | ||
| | |||
|- | |- | ||
| | | 0x0 || 0x1 || powerConnected for the main PowerInfo. | ||
| | |- | ||
| 0x1 || 0x1 || ORRed with powerConnected to set the value of the first byte for the controller [[HID_Shared_Memory#Flags|flags]]. | |||
|- | |||
| 0x2 || 0x6 || Unknown | |||
|- | |||
| 0x8 || 0x4 || batteryCharge for the main PowerInfo. | |||
|- | |||
| 0xC || 0x4 || Buttons. Bit18 = HOME and bit19 = Capture. | |||
|- | |||
| 0x10 || 0x10(4*2*2) || Joystick data. | |||
|- | |- | ||
| | | 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases). | ||
| | |||
|- | |- | ||
| | | 0x21 || 0x3 || Padding | ||
| | |||
|} | |} | ||
[9.0.0+]: | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| 0x0 || | ! Offset || Size || Description | ||
|- | |||
| 0x0 || 0x4 || batteryCharge for the main PowerInfo. | |||
|- | |||
| 0x4 || 0x4 || Unknown | |||
|- | |- | ||
| | | 0x8 || 0x8 || Buttons, masked with 0xfffffffff00fffff. See above table regarding HOME/Capture buttons. | ||
|- | |- | ||
| | | 0x10 || 0x10(4*2*2) || Joystick data. | ||
|- | |- | ||
| | | 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases). | ||
|- | |- | ||
| 0x4 || | | 0x21 || 0x3 || Padding | ||
|} | |||
= NotificationLedPattern = | |||
This is "nn::hid::system::NotificationLedPattern". This is a 0x48-byte struct. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Subcommand argdata bytepos || Subcommand argdata nibble || Description | |||
|- | |||
| 0x0 || 0x1 || 0x0 || Low || Mini Cycle Base Duration. Value 0x1-0xF: 12.5ms - 187.5ms. Value 0x0 = 0ms/OFF. | |||
|- | |||
| 0x1 || 0x1 || 0x0 || High || Number of Mini Cycles + 1. Value 0x0-0xF: 1 - 16 mini cycles. | |||
|- | |||
| 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. | |||
|- | |||
| 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. | |||
|- | |||
| 0x7 || 0x1 || || || Unused | |||
|- | |||
| 0x8 || 0x1 || 0x2 || Low || Mini Cycle 2 LED Intensity. | |||
|- | |||
| 0x9 || 0x1 || 0x4 || High || Fading Transition Steps to Mini Cycle 2 (see above). | |||
|- | |||
| 0xA || 0x1 || 0x4 || Low || Final Step Duration Multiplier of Mini Cycle 2 (see above). | |||
|- | |||
| 0xB || 0x1 || || || Unused | |||
|- | |||
| 0xC || 0x1 || 0x5 || High || Mini Cycle 3 LED Intensity. | |||
|- | |||
| 0xD || 0x1 || 0x6 || High || Fading Transition Steps to Mini Cycle 3 (see above). | |||
|- | |||
| 0xE || 0x1 || 0x6 || Low || Final Step Duration Multiplier of Mini Cycle 3 (see above). | |||
|- | |||
| 0xF || 0x1 || || || Unused | |||
|- | |||
| 0x10 || 0x1 || 0x5 || Low || Mini Cycle 4 LED Intensity. | |||
|- | |||
| 0x11 || 0x1 || 0x7 || High || Fading Transition Duration to Mini Cycle 4 (see above). | |||
|- | |||
| 0x12 || 0x1 || 0x7 || Low || Final Step Duration Multiplier of Mini Cycle 4 (see above). | |||
|- | |||
| 0x13 || 0x1 || || || Unused | |||
|- | |||
| 0x14 || 0x1 || 0x8 || High || Mini Cycle 5 LED Intensity. | |||
|- | |||
| 0x15 || 0x1 || 0x9 || High || Fading Transition Steps to Mini Cycle 5 (see above). | |||
|- | |||
| 0x16 || 0x1 || 0x9 || Low || Final Step Duration Multiplier of Mini Cycle 5 (see above). | |||
|- | |||
| 0x17 || 0x1 || || || Unused | |||
|- | |||
| 0x18 || 0x1 || 0x8 || Low || Mini Cycle 6 LED Intensity. | |||
|- | |||
| 0x19 || 0x1 || 0xA || High || Fading Transition Steps to Mini Cycle 6 (see above). | |||
|- | |||
| 0x1A || 0x1 || 0xA || Low || Final Step Duration Multiplier of Mini Cycle 6 (see above). | |||
|- | |||
| 0x1B || 0x1 || || || Unused | |||
|- | |||
| 0x1C || 0x1 || 0xB || High || Mini Cycle 7 LED Intensity. | |||
|- | |||
| 0x1D || 0x1 || 0xC || High || Fading Transition Steps to Mini Cycle 7 (see above). | |||
|- | |||
| 0x1E || 0x1 || 0xC || Low || Final Step Duration Multiplier of Mini Cycle 7 (see above). | |||
|- | |||
| 0x1F || 0x1 || || || Unused | |||
|- | |||
| 0x20 || 0x1 || 0xB || Low || Mini Cycle 8 LED Intensity. | |||
|- | |||
| 0x21 || 0x1 || 0xD || Low || Fading Transition Steps to Mini Cycle 8 (see above). | |||
|- | |||
| 0x22 || 0x1 || 0xD || High || Final Step Duration Multiplier of Mini Cycle 8 (see above). | |||
|- | |||
| 0x23 || 0x1 || || || Unused | |||
|- | |||
| 0x24 || 0x1 || 0xE || High || Mini Cycle 9 LED Intensity. | |||
|- | |||
| 0x25 || 0x1 || 0xF || High || Fading Transition Steps to Mini Cycle 9 (see above). | |||
|- | |||
| 0x26 || 0x1 || 0xF || Low || Final Step Duration Multiplier of Mini Cycle 9 (see above). | |||
|- | |||
| 0x27 || 0x1 || || || Unused | |||
|- | |||
| 0x28 || 0x1 || 0xE || Low || Mini Cycle 10 LED Intensity. | |||
|- | |||
| 0x29 || 0x1 || 0x10 || High || Fading Transition Steps to Mini Cycle 10 (see above). | |||
|- | |||
| 0x2A || 0x1 || 0x10 || Low || Final Step Duration Multiplier of Mini Cycle 10 (see above). | |||
|- | |||
| 0x2B || 0x1 || || || Unused | |||
|- | |||
| 0x2C || 0x1 || 0x11 || High || Mini Cycle 11 LED Intensity. | |||
|- | |||
| 0x2D || 0x1 || 0x12 || High || Fading Transition Steps to Mini Cycle 11 (see above). | |||
|- | |||
| 0x2E || 0x1 || 0x12 || Low || Final Step Duration Multiplier of Mini Cycle 11 (see above). | |||
|- | |||
| 0x2F || 0x1 || || || Unused | |||
|- | |||
| 0x30 || 0x1 || 0x11 || Low || Mini Cycle 12 LED Intensity. | |||
|- | |||
| 0x31 || 0x1 || 0x13 || High || Fading Transition Steps to Mini Cycle 12 (see above). | |||
|- | |||
| 0x32 || 0x1 || 0x13 || Low || Final Step Duration Multiplier of Mini Cycle 12 (see above). | |||
|- | |||
| 0x33 || 0x1 || || || Unused | |||
|- | |||
| 0x34 || 0x1 || 0x14 || High || Mini Cycle 13 LED Intensity. | |||
|- | |||
| 0x35 || 0x1 || 0x15 || High || Fading Transition Steps to Mini Cycle 13 (see above). | |||
|- | |||
| 0x36 || 0x1 || 0x15 || Low || Final Step Duration Multiplier of Mini Cycle 13 (see above). | |||
|- | |||
| 0x37 || 0x1 || || || Unused | |||
|- | |||
| 0x38 || 0x1 || 0x14 || Low || Mini Cycle 14 LED Intensity. | |||
|- | |||
| 0x39 || 0x1 || 0x16 || High || Fading Transition Steps to Mini Cycle 14 (see above). | |||
|- | |||
| 0x3A || 0x1 || 0x16 || Low || Final Step Duration Multiplier of Mini Cycle 14 (see above). | |||
|- | |||
| 0x3B || 0x1 || || || Unused | |||
|- | |||
| 0x3C || 0x1 || 0x17 || High || Mini Cycle 15 LED Intensity. | |||
|- | |||
| 0x3D || 0x1 || 0x18 || High || Fading Transition Steps to Mini Cycle 15 (see above). | |||
|- | |||
| 0x3E || 0x1 || 0x18 || Low || Final Step Duration Multiplier of Mini Cycle 15 (see above). | |||
|- | |||
| 0x3F || 0x1 || || || Unused | |||
|- | |||
| 0x40 || 0x1 || 0x17 || Low || Mini Cycle 16 LED Intensity. | |||
|- | |||
| 0x41 || 0x1 || 0x19 || High || Fading Transition Steps to Mini Cycle 16 (see above). (Unused in older Joy-Con / Pro-Con FW. Unknown for new.) | |||
|- | |||
| 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.) | |||
|- | |||
| 0x43 || 0x1 || || || Unused | |||
|- | |||
| 0x44 || 0x1 || 0x1A || High || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.) | |||
|- | |||
| 0x45 || 0x1 || 0x1A || Low || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.) | |||
|- | |||
| 0x46 || 0x1 || || || Padding | |||
|- | |||
| 0x47 || 0x1 || || || Padding | |||
|- | |||
|} | |||
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" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x1B || See above. | |||
|- | |||
| 0x1B || 0xB || Cleared to zero. | |||
|- | |||
| 0x26 || 0x5 || Unused | |||
|- | |||
| 0x2B || 0x8 || Set to an input value, which is hard-coded 0. | |||
|- | |||
| 0x33 || 0x2 || Set to value 0. | |||
|- | |||
| 0x35 || 0x1 || Set to value 1. | |||
|} | |} | ||