Changes

11,652 bytes added ,  17:56, 2 April 2020
no edit summary
Line 1,148: Line 1,148:  
= irs =
 
= irs =
 
This is "nn::irsensor::IIrSensorServer".
 
This is "nn::irsensor::IIrSensorServer".
 +
 +
This was added to sdknso with 3.x.
 +
 +
With sdknso versions pre-4.x PointingProcessor used to be DpdProcessor. The [[#PackedPointingProcessorConfig|packed-config]] with DpdProcessor (besides RequiredMcuVersion) used to be initialized from user-specified config, now it's hard-coded.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,221: Line 1,225:  
| 0x0 || 0x4 || [[#IrCameraStatus]]
 
| 0x0 || 0x4 || [[#IrCameraStatus]]
 
|-
 
|-
| 0x4 || 0x4 || IrCameraInternalStatus
+
| 0x4 || 0x4 || [[#IrCameraInternalStatus]]
 
|-
 
|-
 
| 0x8 || 0x8 || [[#IrSensorMode]]
 
| 0x8 || 0x8 || [[#IrSensorMode]]
 
|-
 
|-
| 0x10 || 0xE20 || Array of [[#ProcessorState]]
+
| 0x10 || 0xE20 || [[#ProcessorStateRingLifo]]
 +
|}
 +
 
 +
==== ProcessorStateRingLifo ====
 +
This is "nn::irsensor::detail::RingLifo<X,Y>" where "X" is a specialized processor state (e.g.: "nn::irsensor::MomentProcessorState") and "Y" is the maximum element count (e.g.: 5).
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x8 || Start
 +
|-
 +
| 0x8 || 0x4 || Count
 +
|-
 +
| 0xC || 0x4 || Padding
 +
|-
 +
| 0x10 || Variable || ProcessorState
 
|}
 
|}
   −
[[#ProcessorState]] is specialized depending on the value of [[#IrSensorMode]].
+
The maximum element count is 6 for [[#PointingProcessorMarkerState]] or 5 for any of the other states.
 +
 
 +
ProcessorState is specialized depending on the value of [[#IrSensorMode]].
 +
 
 +
===== MomentProcessorState =====
 +
This is "nn::irsensor::MomentProcessorState".
   −
==== MomentProcessorState ====
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,246: Line 1,270:  
|}
 
|}
   −
===== MomentStatistic =====
+
The array of [[#MomentStatistic]] can hold up to 48 entries. This array can be accessed as [y + x*8] (this is a 6x8 array). region_x = image_x/6, region_y = image_y/8.
 +
 
 +
====== MomentStatistic ======
 +
In sdknso GetMomentProcessorStates, this loops through each MomentProcessorState->MomentStatistic entry: <code>AverageIntensity *= scale;</code> The scale is calculated with: <code>scale = 76800.0f / (float)([[#PackedMomentProcessorConfig|WindowOfInterest]].width * [[#PackedMomentProcessorConfig|WindowOfInterest]].height);</code> Note that <code>76800 == 320*240</code>, hence with the default width/height the calculated scale is 1.0f.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x4 || AverageIntensity
+
| 0x0 || 0x4 || float AverageIntensity
 
|-
 
|-
| 0x4 || 0x4 || CentroidX
+
| 0x4 || 0x4 || float CentroidX
 
|-
 
|-
| 0x8 || 0x4 || CentroidY
+
| 0x8 || 0x4 || float CentroidY
 
|}
 
|}
   −
==== ClusteringProcessorState ====
+
===== ClusteringProcessorState =====
 +
This is "nn::irsensor::ClusteringProcessorState".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,276: Line 1,306:  
|}
 
|}
   −
===== ClusteringData =====
+
The array of [[#ClusteringData]] can hold up to 16 entries.
 +
 
 +
====== ClusteringData ======
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x4 || AverageIntensity
+
| 0x0 || 0x4 || float AverageIntensity
 
|-
 
|-
| 0x4 || 0x4 || CentroidX
+
| 0x4 || 0x4 || float CentroidX
 
|-
 
|-
| 0x8 || 0x4 || CentroidY
+
| 0x8 || 0x4 || float CentroidY
 
|-
 
|-
 
| 0xC || 0x4 || PixelCount
 
| 0xC || 0x4 || PixelCount
Line 1,298: Line 1,330:  
|}
 
|}
   −
==== PointingProcessorState ====
+
===== PointingProcessorMarkerState =====
 +
This is "nn::irsensor::PointingProcessorMarkerState".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,307: Line 1,341:  
| 0x8 || 0x8 || TimeStamp
 
| 0x8 || 0x8 || TimeStamp
 
|-
 
|-
| 0x10 || 0x60 || Unknown
+
| 0x10 || 0x1 || PointingStatus
|}
+
|-
 
+
| 0x11 || 0xB || Reserved
==== TeraPluginProcessorState ====
+
|-
{| class="wikitable" border="1"
+
| 0x1C || 0x4 || float PositionX
 
|-
 
|-
! Offset || Size || Description
+
| 0x20 || 0x4 || float PositionY
 
|-
 
|-
| 0x0 || 0x8 || SamplingNumber
+
| 0x24 || 0xC || Reserved
 
|-
 
|-
| 0x8 || 0x8 || TimeStamp
+
| 0x30 || 0x1 || PointingStatus
 
|-
 
|-
| 0x10 || 0x130 || Unknown
+
| 0x31 || 0xB || Reserved
|}
+
|-
 +
| 0x3C || 0x4 || float PositionX
 +
|-
 +
| 0x40 || 0x4 || float PositionY
 +
|-
 +
| 0x44 || 0xC || Reserved
 +
|-
 +
| 0x50 || 0x1 || PointingStatus
 +
|-
 +
| 0x51 || 0xB || Reserved
 +
|-
 +
| 0x5C || 0x4 || float PositionX
 +
|-
 +
| 0x60 || 0x4 || float PositionY
 +
|-
 +
| 0x64 || 0xC || Reserved
 +
|}
 +
 
 +
===== PointingProcessorState =====
 +
This is "nn::irsensor::PointingProcessorState".
 +
 
 +
This is created from [[#PointingProcessorMarkerState]].
   −
=== AruidFormat ===
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x8 || IrSensorAruid
+
| 0x0 || 0x8 || SamplingNumber
 +
|-
 +
| 0x8 || 0x8 || TimeStamp
 +
|-
 +
| 0x10 || 0x4 || PointingStatus
 +
|-
 +
| 0x14 || 0x4 || float PositionX
 +
|-
 +
| 0x18 || 0x4 || float PositionY
 
|-
 
|-
| 0x8 || 0x8 || IrSensorAruidStatus
+
| 0x1C || 0x4 || Reserved
 
|}
 
|}
   −
== StopImageProcessor ==
+
===== TeraPluginProcessorState =====
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output.
+
This is "nn::irsensor::TeraPluginProcessorState".
 
  −
== RunMomentProcessor ==
  −
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedMomentProcessorConfig]]. No output.
     −
== RunClusteringProcessor ==
+
{| class="wikitable" border="1"
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedClusteringProcessorConfig]]. No output.
+
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x8 || SamplingNumber
 +
|-
 +
| 0x8 || 0x8 || TimeStamp
 +
|-
 +
| 0x10 || 0x4 || AmbientNoiseLevel
 +
|-
 +
| 0x14 || 0x12C || PluginData
 +
|}
   −
== RunImageTransferProcessor ==
+
===== AdaptiveClusteringProcessorState =====
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], a [[#PackedImageTransferProcessorConfig]], an u64 for the TransferMemory's size, and a TransferMemory handle. No output.
+
This is "nn::irsensor::AdaptiveClusteringProcessorState".
   −
The TransferMemory is created with an user specified buffer and permission none.
+
This is created from [[#TeraPluginProcessorState]].
   −
== GetImageTransferProcessorState ==
+
{| class="wikitable" border="1"
Takes a PID-descriptor, a type-0x6 output buffer, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. Returns an [[#ImageTransferProcessorState]]. No output.
+
|-
 
+
! Offset || Size || Description
== RunTeraPluginProcessor==
+
|-
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedTeraPluginProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output.
+
| 0x0 || 0x8 || SamplingNumber
 
+
|-
== GetNpadIrCameraHandle ==
+
| 0x8 || 0x8 || TimeStamp
Takes an input [[#NpadIdType]]. Returns an output [[#IrCameraHandle]].
+
|-
 +
| 0x10 || 0x4 || AmbientNoiseLevel
 +
|-
 +
| 0x14 || 0x4 || AccuracyLevel
 +
|-
 +
| 0x18 || 0x1 || ObjectCount
 +
|-
 +
| 0x19 || 0x1 || BackgroundIntensity
 +
|-
 +
| 0x1A || 0x6 || Reserved
 +
|-
 +
| 0x20 || 0x200 || Array of [[#AdaptiveClusteringData]]
 +
|}
   −
== RunPointingProcessor ==
+
The array of [[#AdaptiveClusteringData]] can hold up to 16 entries.
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedPointingProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output.
     −
== SuspendImageProcessor ==
+
====== AdaptiveClusteringData ======
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output.
+
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || float CentroidX
 +
|-
 +
| 0x4 || 0x4 || float CentroidY
 +
|-
 +
| 0x8 || 0x4 || float Area
 +
|-
 +
| 0xC || 0x4 || IsIncomplete
 +
|}
   −
== CheckFirmwareVersion ==
+
===== HandAnalysisImageState =====
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedMcuVersion]], and an [[AM_services|AppletResourceUserId]]. No output.
+
This is "nn::irsensor::HandAnalysisImageState".
   −
== SetFunctionLevel ==
+
This is created from [[#TeraPluginProcessorState]].
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedFunctionLevel]], and an [[AM_services|AppletResourceUserId]]. No output.
     −
== RunImageTransferExProcessor ==
+
{| class="wikitable" border="1"
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], a [[#PackedImageTransferProcessorExConfig]], an u64 for the TransferMemory's size, and a TransferMemory handle. No output.
+
|-
 
+
! Offset || Size || Description
The TransferMemory is created with an user specified buffer and permission none.
+
|-
 
+
| 0x0 || 0x8 || SamplingNumber
== RunIrLedProcessor ==
+
|-
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedIrLedProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output.
+
| 0x8 || 0x4 || AmbientNoiseLevel
 
+
|-
== StopImageProcessorAsync ==
+
| 0xC || 0x960 || Image
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output.
+
|-
 +
| 0x96C || 0x4 || Reserved
 +
|}
   −
== ActivateIrsensorWithFunctionLevel ==
+
===== HandAnalysisSilhouetteState =====
Takes a PID-descriptor, an [[#PackedFunctionLevel]], and an [[AM_services|AppletResourceUserId]]. No output.
+
This is "nn::irsensor::HandAnalysisSilhouetteState".
   −
= irs:sys =
+
This is created from [[#TeraPluginProcessorState]].
This is "nn::irsensor::IIrSensorSystemServer".
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Offset || Size || Description
 
|-
 
|-
| 500 || [[#SetAppletResourceUserId]]
+
| 0x0 || 0x8 || SamplingNumber
 
|-
 
|-
| 501 || [[#RegisterAppletResourceUserId]]
+
| 0x8 || 0x4 || AmbientNoiseLevel
 
|-
 
|-
| 502 || [[#UnregisterAppletResourceUserId]]
+
| 0xC || 0x1354 || Unknown
|-
  −
| 503 || [[#EnableAppletToGetInput]]
   
|}
 
|}
   −
== SetAppletResourceUserId ==
+
===== HandAnalysisSilhouetteStateWithFullFrameShape =====
Takes an [[AM_services|AppletResourceUserId]]. No output.
+
This is "nn::irsensor::HandAnalysisSilhouetteStateWithFullFrameShape".
 
+
 
== RegisterAppletResourceUserId ==
+
This is created from [[#TeraPluginProcessorState]].
Takes a bool and an [[AM_services|AppletResourceUserId]]. No output.
  −
 
  −
== UnregisterAppletResourceUserId ==
  −
Takes an [[AM_services|AppletResourceUserId]]. No output.
  −
 
  −
== EnableAppletToGetInput ==
  −
Takes a bool and an [[AM_services|AppletResourceUserId]]. No output.
  −
 
  −
= ahid:cd =
  −
This is "nn::ahid::IServerSession".
  −
 
  −
Used for USB HID devices.
  −
 
  −
This service no longer exists in [9.0.0+].
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! Offset || Size || Description
 
|-
 
|-
| 0 || [[#AcquireDevice]]
+
| 0x0 || 0x8 || SamplingNumber
|-
  −
| 1 || [[#ReleaseDevice]]
   
|-
 
|-
| 2 || [[#GetCtrlSession]]
+
| 0x8 || 0x4 || AmbientNoiseLevel
 
|-
 
|-
| 3 || [[#GetReadSession]]
+
| 0xC || 0x156C || Unknown
|-
  −
| 4 || [1.0.0-2.3.0] [[#GetWriteSession]]
   
|}
 
|}
   −
== AcquireDevice ==
+
=== AruidFormat ===
Takes an input s32, no output.
+
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x8 || IrSensorAruid
 +
|-
 +
| 0x8 || 0x8 || IrSensorAruidStatus
 +
|}
   −
== ReleaseDevice ==
+
== StopImageProcessor ==
Takes an input s32, no output.
+
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output.
   −
== GetCtrlSession ==
+
== RunMomentProcessor ==
Takes an input u32, returns an [[#ICtrlSession]].
+
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedMomentProcessorConfig]]. No output.
   −
== GetReadSession ==
+
== RunClusteringProcessor ==
Takes an input u32, returns an [[#IReadSession]].
+
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedClusteringProcessorConfig]]. No output.
   −
== GetWriteSession ==
+
== RunImageTransferProcessor ==
Takes an input u32, returns an [[#IWriteSession]].
+
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], a [[#PackedImageTransferProcessorConfig]], an u64 for the TransferMemory's size, and a TransferMemory handle. No output.
   −
== ICtrlSession ==
+
The TransferMemory is created with an user specified buffer and permission none.
This is "nn::ahid::ICtrlSession".
+
 
 +
== GetImageTransferProcessorState ==
 +
Takes a PID-descriptor, a type-0x6 output buffer, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. Returns an [[#ImageTransferProcessorState]]. No output.
 +
 
 +
== RunTeraPluginProcessor==
 +
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedTeraPluginProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output.
 +
 
 +
== GetNpadIrCameraHandle ==
 +
Takes an input [[#NpadIdType]]. Returns an output [[#IrCameraHandle]].
 +
 
 +
== RunPointingProcessor ==
 +
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedPointingProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output.
   −
This no longer exists in [9.0.0+].
+
== SuspendImageProcessor ==
 +
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output.
   −
{| class="wikitable" border="1"
+
sdknso uses this from the Run*Processor funcs to suspend the current Processor when the current [[#PackedFunctionLevel|FunctionLevel]] is >= 0x1, prior to starting another Processor if needed (depending on  what Processor was already active via a state field). Hence, this cmd is only used with [4.0.0+].
|-
  −
! 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
  −
|}
     −
All of these use USB [[USB_services|CtrlXfer]], except for GetStateChangeEvent and SignalStateChangeEvent, and GetCodeBook which copies 0x4000-bytes from state to output.
+
== CheckFirmwareVersion ==
 +
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedMcuVersion]], and an [[AM_services|AppletResourceUserId]]. No output.
   −
== IReadSession ==
+
sdknso didn't actually use this until 4.x (the RequiredMcuVersion was also updated with that version).
This is "nn::ahid::IReadSession".
     −
This no longer exists in [9.0.0+].
+
== SetFunctionLevel ==
 +
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedFunctionLevel]], and an [[AM_services|AppletResourceUserId]]. No output.
   −
{| class="wikitable" border="1"
+
== RunImageTransferExProcessor ==
|-
+
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], a [[#PackedImageTransferProcessorExConfig]], an u64 for the TransferMemory's size, and a TransferMemory handle. No output.
! Cmd || Name
+
 
|-
+
The TransferMemory is created with an user specified buffer and permission none.
| 0 || [[#Read]]
  −
|}
     −
=== Read ===
+
== RunIrLedProcessor ==
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.
+
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedIrLedProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output.
   −
[3.0.0+] Now takes a total of 8-bytes of input.
+
== StopImageProcessorAsync ==
 +
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output.
   −
== IWriteSession ==
+
== ActivateIrsensorWithFunctionLevel ==
This is "nn::ahid::IWriteSession".
+
Takes a PID-descriptor, an [[#PackedFunctionLevel]], and an [[AM_services|AppletResourceUserId]]. No output.
   −
This was removed with [3.0.0+].
+
= irs:sys =
 +
This is "nn::irsensor::IIrSensorSystemServer".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,510: Line 1,572:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || [[#Write]]
+
| 500 || [[#SetAppletResourceUserId]]
|}
+
|-
 +
| 501 || [[#RegisterAppletResourceUserId]]
 +
|-
 +
| 502 || [[#UnregisterAppletResourceUserId]]
 +
|-
 +
| 503 || [[#EnableAppletToGetInput]]
 +
|}
 +
 
 +
== SetAppletResourceUserId ==
 +
Takes an [[AM_services|AppletResourceUserId]]. No output.
 +
 
 +
== RegisterAppletResourceUserId ==
 +
Takes a bool and an [[AM_services|AppletResourceUserId]]. No output.
 +
 
 +
== UnregisterAppletResourceUserId ==
 +
Takes an [[AM_services|AppletResourceUserId]]. No output.
   −
=== Write ===
+
== EnableAppletToGetInput ==
This is the inverse of [[#IReadSession]] cmd0. Uses the OUTPUT endpoint with an input buffer.
+
Takes a bool and an [[AM_services|AppletResourceUserId]]. No output.
   −
= ahid:hdr =
+
= ahid:cd =
This is "nn::ahid::hdr::ISession".
+
This is "nn::ahid::IServerSession".
   −
Used internally for USB HID devices.
+
Used for USB HID devices.
    
This service no longer exists in [9.0.0+].
 
This service no longer exists in [9.0.0+].
Line 1,527: Line 1,604:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || GetDeviceEntries
+
| 0 || [[#AcquireDevice]]
 
|-
 
|-
| 1 || GetDeviceList
+
| 1 || [[#ReleaseDevice]]
 
|-
 
|-
| 2 || GetDeviceParameters
+
| 2 || [[#GetCtrlSession]]
 
|-
 
|-
| 3 || AttachDevice
+
| 3 || [[#GetReadSession]]
 
|-
 
|-
| 4 || DetachDevice
+
| 4 || [1.0.0-2.3.0] [[#GetWriteSession]]
|-
  −
| 5 || [6.0.0+] SetDeviceFilter
   
|}
 
|}
   −
= xcd:sys =
+
== AcquireDevice ==
This is "nn::xcd::detail::ISystemServer".
+
Takes an input s32, no output.
 +
 
 +
== ReleaseDevice ==
 +
Takes an input s32, no output.
 +
 
 +
== GetCtrlSession ==
 +
Takes an input u32, returns an [[#ICtrlSession]].
   −
{| class="wikitable" border="1"
+
== GetReadSession ==
|-
+
Takes an input u32, returns an [[#IReadSession]].
! Cmd || Name
+
 
|-
+
== GetWriteSession ==
| 0 || GetDataFormat
+
Takes an input u32, returns an [[#IWriteSession]].
|-
+
 
| 1 || SetDataFormat
+
== ICtrlSession ==
|-
+
This is "nn::ahid::ICtrlSession".
| 2 || GetMcuState
+
 
 +
This no longer exists in [9.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 3 || SetMcuState
+
! Cmd || Name
 
|-
 
|-
| 4 || GetMcuVersionForNfc
+
| 0 || GetString
 
|-
 
|-
| 5 || CheckNfcDevicePower
+
| 1 || GetCodeBook
 
|-
 
|-
| 6 || [5.0.0+] SetMcuStateImmediate
+
| 2 || GetReport
 
|-
 
|-
| 10 || SetNfcEvent
+
| 3 || SetReport
 
|-
 
|-
| 11 || GetNfcInfo
+
| 4 || GetIdle
 
|-
 
|-
| 12 || StartNfcDiscovery
+
| 5 || SetIdle
 
|-
 
|-
| 13 || StopNfcDiscovery
+
| 6 || GetProtocol
 
|-
 
|-
| 14 || StartNtagRead
+
| 7 || SetProtocol
 
|-
 
|-
| 15 || StartNtagWrite
+
| 8 || GetDescriptor
 
|-
 
|-
| 16 || SendNfcRawData
+
| 9 || SetDescriptor
 
|-
 
|-
| 17 || RegisterMifareKey
+
| 10 || GetStateChangeEvent
 
|-
 
|-
| 18 || ClearMifareKey
+
| 11 || SignalStateChangeEvent
 
|-
 
|-
| 19 || StartMifareRead
+
| 12 || [3.0.0+] Write
|-
  −
| 20 || StartMifareWrite
  −
|-
  −
| 101 || GetAwakeTriggerReasonForLeftRail
  −
|-
  −
| 102 || GetAwakeTriggerReasonForRightRail
   
|}
 
|}
   −
[5.0.0+] SetDataFormat, SetMcuState, and ClearMifareKey: now takes a total of 0xC-bytes of input instead of 0x10.
+
All of these use USB [[USB_services|CtrlXfer]], except for GetStateChangeEvent and SignalStateChangeEvent, and GetCodeBook which copies 0x4000-bytes from state to output.
   −
[6.0.0+]: The buffer type used by GetNfcInfo is now 0x32 instead of 0x1A.
+
== IReadSession ==
 +
This is "nn::ahid::IReadSession".
   −
= hidbus =
+
This no longer exists in [9.0.0+].
This is "nn::hidbus::IHidbusServer".
     −
This was added with [5.0.0+].
+
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || [[#Read]]
 +
|}
 +
 
 +
=== Read ===
 +
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+] Now takes a total of 8-bytes of input.
   −
Official sw opens a temporary service-session for each func using this, with it being closed once done: no global session is kept open.
+
== IWriteSession ==
 +
This is "nn::ahid::IWriteSession".
 +
 
 +
This was removed with [3.0.0+].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,603: Line 1,694:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 1 || [[#GetBusHandle]]
+
| 0 || [[#Write]]
|-
+
|}
| 2 || [[#IsExternalDeviceConnected]]
+
 
|-
+
=== Write ===
| 3 || [[#Initialize]]
+
This is the inverse of [[#IReadSession]] cmd0. Uses the OUTPUT endpoint with an input buffer.
|-
+
 
| 4 || [[#Finalize]]
+
= ahid:hdr =
 +
This is "nn::ahid::hdr::ISession".
 +
 
 +
Used internally for USB HID devices.
 +
 
 +
This service no longer exists in [9.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 5 || [[#EnableExternalDevice]]
+
! Cmd || Name
 
|-
 
|-
| 6 || [[#GetExternalDeviceId]]
+
| 0 || GetDeviceEntries
 
|-
 
|-
| 7 || [[#SendCommandAsync]]
+
| 1 || GetDeviceList
 
|-
 
|-
| 8 || [[#GetSendCommandAsynceResult]]
+
| 2 || GetDeviceParameters
 
|-
 
|-
| 9 || [[#SetEventForSendCommandAsycResult]]
+
| 3 || AttachDevice
 
|-
 
|-
| 10 || [[#GetSharedMemoryHandle]]
+
| 4 || DetachDevice
 
|-
 
|-
| 11 || [[#EnableJoyPollingReceiveMode]]
+
| 5 || [6.0.0+] SetDeviceFilter
|-
  −
| 12 || [[#DisableJoyPollingReceiveMode]]
  −
|-
  −
| 13 || [5.0.0-6.2.0] GetPollingData
  −
|-
  −
| 14 || [6.0.0+] [[#SetStatusManagerType]]
   
|}
 
|}
   −
sdknso doesn't use the GetPollingData cmd.
+
= xcd:sys =
 +
This is "nn::xcd::detail::ISystemServer".
   −
== GetBusHandle ==
+
{| class="wikitable" border="1"
Takes an input u32 [[#NpadIdType]], an u64 [[#BusType]], an u64 [[AM_services|AppletResourceUserId]], returns an output u8 bool and a [[#BusHandle]].
+
|-
 
+
! Cmd || Name
The bool indicates whether the [[#BusHandle]] is valid.
+
|-
 
+
| 0 || GetDataFormat
Official sw will assert when [[#BusHandle]] InternalIndex is >=0x11 (>=0x13 with [6.0.0+]). This same check is also done for all funcs using [[#BusHandle]] as input.
+
|-
 
+
| 1 || SetDataFormat
This cmd will throw an error when [[#BusType]] is invalid.
+
|-
 
+
| 2 || GetMcuState
== IsExternalDeviceConnected ==
+
|-
Takes an input [[#BusHandle]], returns an output u8 bool.
+
| 3 || SetMcuState
 
+
|-
This is not used by sdknso.
+
| 4 || GetMcuVersionForNfc
 
+
|-
== Initialize ==
+
| 5 || CheckNfcDevicePower
Takes an input [[#BusHandle]], an u64 [[AM_services|AppletResourceUserId]], no output.
+
|-
 
+
| 6 || [5.0.0+] SetMcuStateImmediate
Prior to using this cmd, sdknso handles [[#GetSharedMemoryHandle|sharedmem]] mapping if not done previously.
+
|-
 
+
| 10 || SetNfcEvent
== Finalize ==
+
|-
Takes an input [[#BusHandle]], an u64 [[AM_services|AppletResourceUserId]], no output.
+
| 11 || GetNfcInfo
 
+
|-
== EnableExternalDevice ==
+
| 12 || StartNfcDiscovery
Takes an input u8 bool, a [[#BusHandle]], an u64, an u64 [[AM_services|AppletResourceUserId]], no output.
+
|-
 
+
| 13 || StopNfcDiscovery
sdknso passes value 0x38900050018 (0x3A600050018 with 7.x+) for the u64.
+
|-
 
+
| 14 || StartNtagRead
The bool flag indicates whether to enable the device (true = enable, false = disable).  When false, this will use [[#DisableJoyPollingReceiveMode]] if needed.
+
|-
 +
| 15 || StartNtagWrite
 +
|-
 +
| 16 || SendNfcRawData
 +
|-
 +
| 17 || RegisterMifareKey
 +
|-
 +
| 18 || ClearMifareKey
 +
|-
 +
| 19 || StartMifareRead
 +
|-
 +
| 20 || StartMifareWrite
 +
|-
 +
| 101 || GetAwakeTriggerReasonForLeftRail
 +
|-
 +
| 102 || GetAwakeTriggerReasonForRightRail
 +
|}
   −
== GetExternalDeviceId ==
+
[5.0.0+] SetDataFormat, SetMcuState, and ClearMifareKey: now takes a total of 0xC-bytes of input instead of 0x10.
Takes an input [[#BusHandle]], returns an output u32 ExternalDeviceId.
     −
== SendCommandAsync ==
+
[6.0.0+]: The buffer type used by GetNfcInfo is now 0x32 instead of 0x1A.
Takes a type-0x21 input buffer and a [[#BusHandle]], no output.
     −
== GetSendCommandAsynceResult ==
+
= hidbus =
Takes a type-0x22 output buffer and a [[#BusHandle]], returns an output u32.
+
This is "nn::hidbus::IHidbusServer".
   −
Official sw copies the u32 to an output u64, for the actual output size.
+
This was added with [5.0.0+].
   −
== SetEventForSendCommandAsycResult ==
+
Official sw opens a temporary service-session for each func using this, with it being closed once done: no global session is kept open.
Takes an input [[#BusHandle]], returns an output Event handle with EventClearMode=0.
  −
 
  −
Official sw with SendAndReceive clears this event (6.x+ sdknso), uses [[#SendCommandAsync]], waits on + clears this event, then uses [[#GetSendCommandAsynceResult]].
  −
 
  −
== GetSharedMemoryHandle ==
  −
No input, returns an output SharedMemory handle.
  −
 
  −
The SharedMemory is mapped with size 0x1000 and permissions=R--.
  −
 
  −
See also [[#SetStatusManagerType]].
  −
 
  −
This sharedmem is the StatusManager. This sharedmem contains an array of 0x100-byte (0x80-byte with [[#SetStatusManagerType|[6.0.0+]]]) entries, with entry-count {max [[#GetBusHandle|BusHandles]]}.
  −
 
  −
sdknso only uses the first 0x10-bytes of these entries, the rest is the ignored. Entry structure:
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Offset || Size || Description
+
! Cmd || Name
 
|-
 
|-
| 0x0 || 0x1 || Bool flag
+
| 1 || [[#GetBusHandle]]
 
|-
 
|-
| 0x1 || 0x3 || Padding
+
| 2 || [[#IsExternalDeviceConnected]]
 
|-
 
|-
| 0x4 || 0x4 || Result
+
| 3 || [[#Initialize]]
 
|-
 
|-
| 0x8 || 0x1 || DeviceEnabled. Bool flag indicating whether a device is [[#EnableExternalDevice|enabled]].
+
| 4 || [[#Finalize]]
 
|-
 
|-
| 0x9 || 0x1 || IsValid. Bool flag indicating whether this entry is valid.
+
| 5 || [[#EnableExternalDevice]]
 
|-
 
|-
| 0xA || 0x1 || PollingEnabled. Bool flag indicating whether polling is [[#EnableJoyPollingReceiveMode|enabled]].
+
| 6 || [[#GetExternalDeviceId]]
 
|-
 
|-
| 0xB || 0x1 || Unknown / padding?
+
| 7 || [[#SendCommandAsync]]
 
|-
 
|-
| 0xC || 0x4 || [[#JoyPollingMode]]
+
| 8 || [[#GetSendCommandAsynceResult]]
|}
  −
 
  −
== EnableJoyPollingReceiveMode ==
  −
Takes a type-0x21 input buffer, a TransferMemory handle, an u32 tmem_size, an u32 [[#JoyPollingMode]], a [[#BusHandle]], no output.
  −
 
  −
The TransferMemory is created with an user-specified output buffer, with permissions=R--.
  −
 
  −
The content of the TransferMemory depends of the [[#JoyPollingMode]]. This is used by GetJoyPollingReceivedData. Structure of the TransferMemory (DisableSixAxisPollingDataAccessor, EnableSixAxisPollingDataAccessor, JoyButtonOnlyPollingDataAccessor):
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Description
+
| 9 || [[#SetEventForSendCommandAsycResult]]
 
|-
 
|-
| 0x0 || 0x4 || Result.
+
| 10 || [[#GetSharedMemoryHandle]]
 
|-
 
|-
| 0x0 || 0x4 || Padding.
+
| 11 || [[#EnableJoyPollingReceiveMode]]
 
|-
 
|-
| 0x8 || 0x18 || Initialized sysmodule-side, not used by sdknso.
+
| 12 || [[#DisableJoyPollingReceiveMode]]
 
|-
 
|-
| 0x20 || 0x8 || Latest entry.
+
| 13 || [5.0.0-6.2.0] GetPollingData
 
|-
 
|-
| 0x28 || 0x8 || Total entries.
+
| 14 || [6.0.0+] [[#SetStatusManagerType]]
 
|}
 
|}
   −
The entries specific to the [[#JoyPollingMode]] follow, with 0xA entries total. Each entry starts with an u64 timestamp. Structure for each mode, after the timestamp:
+
sdknso doesn't use the GetPollingData cmd.
 +
 
 +
== GetBusHandle ==
 +
Takes an input u32 [[#NpadIdType]], an u64 [[#BusType]], an u64 [[AM_services|AppletResourceUserId]], returns an output u8 bool and a [[#BusHandle]].
   −
DisableSixAxisPollingDataAccessor:
+
The bool indicates whether the [[#BusHandle]] is valid.
   −
{| class="wikitable" border="1"
+
Official sw will assert when [[#BusHandle]] InternalIndex is >=0x11 (>=0x13 with [6.0.0+]). This same check is also done for all funcs using [[#BusHandle]] as input.
|-
  −
! Offset || Size || Description
  −
|-
  −
| 0x0 || 0x26 || Data
  −
|-
  −
| 0x26 || 0x1 || Size of data.
  −
|-
  −
| 0x27 || 0x1 || Padding
  −
|-
  −
| 0x28 || 0x8 || Timestamp
  −
|}
     −
JoyEnableSixAxisPollingDataAccessor:
+
This cmd will throw an error when [[#BusType]] is invalid.
   −
{| class="wikitable" border="1"
+
== IsExternalDeviceConnected ==
|-
+
Takes an input [[#BusHandle]], returns an output u8 bool.
! Offset || Size || Description
  −
|-
  −
| 0x0 || 0x8 || Data
  −
|-
  −
| 0x8 || 0x1 || Size of data.
  −
|-
  −
| 0x9 || 0x7 || Padding
  −
|-
  −
| 0x10 || 0x8 || Timestamp
  −
|}
     −
JoyButtonOnlyPollingDataAccessor:
+
This is not used by sdknso.
   −
{| class="wikitable" border="1"
+
== Initialize ==
|-
+
Takes an input [[#BusHandle]], an u64 [[AM_services|AppletResourceUserId]], no output.
! Offset || Size || Description
  −
|-
  −
| 0x0 || 0x2C || Data
  −
|-
  −
| 0x2C || 0x1 || Size of data.
  −
|-
  −
| 0x2D || 0x3 || Padding
  −
|-
  −
| 0x30 || 0x8 || Timestamp
  −
|}
     −
== DisableJoyPollingReceiveMode ==
+
Prior to using this cmd, sdknso handles [[#GetSharedMemoryHandle|sharedmem]] mapping if not done previously.
Takes an input [[#BusHandle]], no output.
     −
== SetStatusManagerType ==
+
== Finalize ==
Takes an input u32, no output.
+
Takes an input [[#BusHandle]], an u64 [[AM_services|AppletResourceUserId]], no output.
   −
This is used by sdknso immediately after mapping [[#GetSharedMemoryHandle|sharedmem]] (before [[#Initialize]]) with hard-coded value 0x2.
+
== EnableExternalDevice ==
 +
Takes an input u8 bool, a [[#BusHandle]], an u64, an u64 [[AM_services|AppletResourceUserId]], no output.
   −
= GyroscopeZeroDriftMode =
+
sdknso passes value 0x38900050018 (0x3A600050018 with 7.x+) for the u64.
This is "nn::hid::GyroscopeZeroDriftMode".
     −
{| class="wikitable" border="1"
+
The bool flag indicates whether to enable the device (true = enable, false = disable). When false, this will use [[#DisableJoyPollingReceiveMode]] if needed.
! Value
  −
!  Description
  −
|-
  −
| 0 || Loose
  −
|-
  −
| 1 || Standard
  −
|-
  −
| 2 || Tight
  −
|}
     −
= NpadStyleTag =
+
== GetExternalDeviceId ==
This is "nn::hid::NpadStyleTag".
+
Takes an input [[#BusHandle]], returns an output u32 ExternalDeviceId.
   −
{| class="wikitable" border="1"
+
== SendCommandAsync ==
!  Bits
+
Takes a type-0x21 input buffer and a [[#BusHandle]], no output.
!  Description
+
 
!  Notes
+
== GetSendCommandAsynceResult ==
 +
Takes a type-0x22 output buffer and a [[#BusHandle]], returns an output u32.
 +
 
 +
Official sw copies the u32 to an output u64, for the actual output size.
 +
 
 +
== SetEventForSendCommandAsycResult ==
 +
Takes an input [[#BusHandle]], returns an output Event handle with EventClearMode=0.
 +
 
 +
Official sw with SendAndReceive clears this event (6.x+ sdknso), uses [[#SendCommandAsync]], waits on + clears this event, then uses [[#GetSendCommandAsynceResult]].
 +
 
 +
== GetSharedMemoryHandle ==
 +
No input, returns an output SharedMemory handle.
 +
 
 +
The SharedMemory is mapped with size 0x1000 and permissions=R--.
 +
 
 +
See also [[#SetStatusManagerType]].
 +
 
 +
This sharedmem is the StatusManager. This sharedmem contains an array of 0x100-byte (0x80-byte with [[#SetStatusManagerType|[6.0.0+]]]) entries, with entry-count {max [[#GetBusHandle|BusHandles]]}.
 +
 
 +
sdknso only uses the first 0x10-bytes of these entries, the rest is the ignored. Entry structure:
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0
+
! Offset || Size || Description
| NpadFullKey
  −
| Pro Controller
   
|-
 
|-
| 1
+
| 0x0 || 0x1 || Bool flag
| NpadHandheld
  −
| Joy-Con controller in handheld mode
   
|-
 
|-
| 2
+
| 0x1 || 0x3 || Padding
| NpadJoyDual
  −
| Joy-Con controller in dual mode
   
|-
 
|-
| 3
+
| 0x4 || 0x4 || Result
| NpadJoyLeft
  −
| Joy-Con left controller in single mode
   
|-
 
|-
| 4
+
| 0x8 || 0x1 || DeviceEnabled. Bool flag indicating whether a device is [[#EnableExternalDevice|enabled]].
| NpadJoyRight
  −
| Joy-Con right controller in single mode
   
|-
 
|-
| 5
+
| 0x9 || 0x1 || IsValid. Bool flag indicating whether this entry is valid.
| NpadGc
  −
| GameCube controller
   
|-
 
|-
| 6
+
| 0xA || 0x1 || PollingEnabled. Bool flag indicating whether polling is [[#EnableJoyPollingReceiveMode|enabled]].
| NpadPalma
  −
| Poké Ball Plus controller
   
|-
 
|-
| 7
+
| 0xB || 0x1 || Unknown / padding?
| NpadLark
+
|-
| NES/Famicom controller
+
| 0xC || 0x4 || [[#JoyPollingMode]]
 +
|}
 +
 
 +
== EnableJoyPollingReceiveMode ==
 +
Takes a type-0x21 input buffer, a TransferMemory handle, an u32 tmem_size, an u32 [[#JoyPollingMode]], a [[#BusHandle]], no output.
 +
 
 +
The TransferMemory is created with an user-specified output buffer, with permissions=R--.
 +
 
 +
The content of the TransferMemory depends of the [[#JoyPollingMode]]. This is used by GetJoyPollingReceivedData. Structure of the TransferMemory (DisableSixAxisPollingDataAccessor, EnableSixAxisPollingDataAccessor, JoyButtonOnlyPollingDataAccessor):
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 8
+
! Offset || Size || Description
| NpadHandheldLark
  −
| NES/Famicom controller in handheld mode
   
|-
 
|-
| 9
+
| 0x0 || 0x4 || Result.
| NpadLucia
  −
| SNES controller
   
|-
 
|-
| 10-28
+
| 0x0 || 0x4 || Padding.
| Reserved
  −
|
   
|-
 
|-
| 29
+
| 0x8 || 0x18 || Initialized sysmodule-side, not used by sdknso.
| NpadSystemExt
  −
| Generic external controller
   
|-
 
|-
| 30
+
| 0x20 || 0x8 || Latest entry.
| NpadSystem
  −
| Generic controller
   
|-
 
|-
| 31
+
| 0x28 || 0x8 || Total entries.
| Reserved
  −
|
   
|}
 
|}
   −
= NpadIdType =
+
The entries specific to the [[#JoyPollingMode]] follow, with 0xA entries total. Each entry starts with an u64 timestamp. Structure for each mode, after the timestamp:
This is "nn::hid::NpadIdType". This is the controller index used in [[HID_Shared_Memory#Controllers|sharedmem]].
+
 
 +
DisableSixAxisPollingDataAccessor:
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
!  Value
  −
!  Description
   
|-
 
|-
| 0x0 || No1
+
! Offset || Size || Description
 
|-
 
|-
| 0x1 || No2
+
| 0x0 || 0x26 || Data
 
|-
 
|-
| 0x2 || No3
+
| 0x26 || 0x1 || Size of data.
 
|-
 
|-
| 0x3 || No4
+
| 0x27 || 0x1 || Padding
 
|-
 
|-
| 0x4 || No5
+
| 0x28 || 0x8 || Timestamp
|-
  −
| 0x5 || No6
  −
|-
  −
| 0x6 || No7
  −
|-
  −
| 0x7 || No8
  −
|-
  −
| 0x10 || Other
  −
|-
  −
| 0x20 || Handheld
   
|}
 
|}
   −
= NpadInterfaceType =
+
JoyEnableSixAxisPollingDataAccessor:
This is "nn::hid::NpadInterfaceType".
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
!  Value
  −
!  Description
   
|-
 
|-
| 1 || Bluetooth
+
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x8 || Data
 
|-
 
|-
| 2 || Rail
+
| 0x8 || 0x1 || Size of data.
 
|-
 
|-
| 3 || USB
+
| 0x9 || 0x7 || Padding
 
|-
 
|-
| 4 || Unknown
+
| 0x10 || 0x8 || Timestamp
 
|}
 
|}
   −
= AbstractedPadState =
+
JoyButtonOnlyPollingDataAccessor:
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x4 || Type, only 1 bit can be set. Converted to [[#HdlsDeviceInfo]]::type internally by [[#SetAutoPilotVirtualPadState]].
+
| 0x0 || 0x2C || Data
 
|-
 
|-
| 0x4 || 0x1 || Flags. [[#SetAutoPilotVirtualPadState]] only uses bit0: when clear it will skip using the rest of the input and run [[#UnsetAutoPilotVirtualPadState]] internally.
+
| 0x2C || 0x1 || Size of data.
 
|-
 
|-
| 0x5 || 0x3 || Padding
+
| 0x2D || 0x3 || Padding
 
|-
 
|-
| 0x8 || 0x4 || RGBA Single Body Color
+
| 0x30 || 0x8 || Timestamp
|-
  −
| 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.
+
== DisableJoyPollingReceiveMode ==
 +
Takes an input [[#BusHandle]], no output.
 +
 
 +
== SetStatusManagerType ==
 +
Takes an input u32, no output.
   −
Type:
+
This is used by sdknso immediately after mapping [[#GetSharedMemoryHandle|sharedmem]] (before [[#Initialize]]) with hard-coded value 0x2.
{| class="wikitable" border="1"
+
 
Bits
+
= GyroscopeZeroDriftMode =
!  [[#HdlsDeviceInfo]]::type bits
+
This is "nn::hid::GyroscopeZeroDriftMode".
 +
 
 +
{| class="wikitable" border="1"
 +
Value
 
!  Description
 
!  Description
!  Notes
   
|-
 
|-
| 0 || 0 || ||
+
| 0 || Loose
 
|-
 
|-
| 1 || 15 || || [[#DeviceType]] |= BIT(1)
+
| 1 || Standard
 
|-
 
|-
| 2 || 1 || ||  
+
| 2 || Tight
 +
|}
 +
 
 +
= NpadStyleTag =
 +
This is "nn::hid::NpadStyleTag".
 +
 
 +
{| class="wikitable" border="1"
 +
!  Bits
 +
!  Description
 +
!  Notes
 
|-
 
|-
| 3 || 2 || ||  
+
| 0
 +
| NpadFullKey
 +
| Pro Controller
 
|-
 
|-
| 4 || 1 || ||
+
| 1
 +
| NpadHandheld
 +
| Joy-Con controller in handheld mode
 
|-
 
|-
| 5 || 2 || ||
+
| 2
 +
| NpadJoyDual
 +
| Joy-Con controller in dual mode
 
|-
 
|-
| 6 || 3 || ||
+
| 3
 +
| NpadJoyLeft
 +
| Joy-Con left controller in single mode
 
|-
 
|-
| 7 || 11 || || [[#DeviceType]] |= BIT(11)
+
| 4
 +
| NpadJoyRight
 +
| Joy-Con right controller in single mode
 
|-
 
|-
| 8 || 12 || || [[#DeviceType]] |= BIT(12)
+
| 5
 +
| NpadGc
 +
| GameCube controller
 
|-
 
|-
| 9 || 13 || || [[#DeviceType]] |= BIT(13)
+
| 6
 +
| NpadPalma
 +
| Poké Ball Plus controller
 
|-
 
|-
| 10 || 14 || || [[#DeviceType]] |= BIT(14)
+
| 7
 +
| NpadLark
 +
| NES/Famicom controller
 
|-
 
|-
| 11 || 15 || || [[#DeviceType]] |= BIT(11)
+
| 8
 +
| NpadHandheldLark
 +
| NES/Famicom controller in handheld mode
 
|-
 
|-
| 12 || 12 || || [[#DeviceType]] |= BIT(12)
+
| 9
 +
| NpadLucia
 +
| SNES controller
 
|-
 
|-
| 13 || 13 || || [[#DeviceType]] |= BIT(13)
+
| 10-28
 +
| Reserved
 +
|
 
|-
 
|-
| 14 || 14 || || [[#DeviceType]] |= BIT(14)
+
| 29
 +
| NpadSystemExt
 +
| Generic external controller
 
|-
 
|-
| 15 || 17 || ||
+
| 30
|-
+
| NpadSystem
| 31 || 21 || || [[#DeviceType]] = BIT(31)
+
| Generic controller
 
|-
 
|-
 +
| 31
 +
| Reserved
 +
|
 
|}
 
|}
   −
The above "[[#DeviceType]] |=" notes only apply when type2 is 0x2.
+
= NpadIdType =
 +
This is "nn::hid::NpadIdType". This is the controller index used in [[HID_Shared_Memory#Controllers|sharedmem]].
   −
= HdlsNpadAssignment =
+
{| class="wikitable" border="1"
This is a 0x208-byte struct.
+
!  Value
 
+
!  Description
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Description
+
| 0x0 || No1
 
|-
 
|-
| 0x0 || 0x4 || s32 Total entries
+
| 0x1 || No2
 
|-
 
|-
| 0x4 || 0x4 || Padding
+
| 0x2 || No3
 
|-
 
|-
| 0x8 || 0x200(0x20*0x10) || Array of [[#HdlsNpadAssignmentEntry]].
+
| 0x3 || No4
|}
  −
 
  −
= HdlsNpadAssignmentEntry =
  −
This is a 0x20-byte struct.
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Description
+
| 0x4 || No5
 
|-
 
|-
| 0x0 || 0x8 || HdlsHandle
+
| 0x5 || No6
 
|-
 
|-
| 0x8 || 0x4 || ?
+
| 0x6 || No7
 
|-
 
|-
| 0xC || 0x4 || ?
+
| 0x7 || No8
 
|-
 
|-
| 0x10 || 0x8 || ?
+
| 0x10 || Other
 
|-
 
|-
| 0x18 || 0x1 || ?
+
| 0x20 || Handheld
|-
  −
| 0x19 || 0x7 || Padding
   
|}
 
|}
   −
= HdlsStateList =
+
= NpadInterfaceType =
This is a 0x408-byte struct.
+
This is "nn::hid::NpadInterfaceType".
 
  −
[9.0.0+] This is a 0x488-byte struct.
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 
|-
 
|-
! Offset || Size || Description
+
| 1 || Bluetooth
 
|-
 
|-
| 0x0 || 0x4 || s32 Total entries
+
| 2 || Rail
 
|-
 
|-
| 0x4 || 0x4 || Padding
+
| 3 || USB
 
|-
 
|-
| 0x8 || <[[#HdlsStateListEntry]] size>*0x10 || Array of [[#HdlsStateListEntry]].
+
| 4 || Unknown
 
|}
 
|}
   −
This contains a list of all controllers, including non-virtual controllers.
+
= AbstractedPadState =
 
+
{| class="wikitable" border="1"
= HdlsStateListEntry =
+
|-
This is a 0x40-byte struct.
+
! Offset || Size || Description
 
+
|-
[9.0.0+] This is a 0x48-byte struct.
+
| 0x0 || 0x4 || Type, only 1 bit can be set. Converted to [[#HdlsDeviceInfo]]::type internally by [[#SetAutoPilotVirtualPadState]].
 
+
|-
{| class="wikitable" border="1"
+
| 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
 
|-
 
|-
! Offset || Size || Description
+
| 0xC || 0x4 || RGBA Single Buttons Color
 
|-
 
|-
| 0x0 || 0x8 || HdlsHandle
+
| 0x10 || 0x1 || See [[#HiddbgHdlsDeviceInfo]]::[[#NpadInterfaceType]].
 
|-
 
|-
| 0x8 || [[#HdlsDeviceInfo]] size || [[#HdlsDeviceInfo]]. With [[#ApplyHdlsStateList]] this is only used when creating new devices.
+
| 0x11 || 0x3 || Padding
 
|-
 
|-
| 0x8 + [[#HdlsDeviceInfo]] size, with 8-byte alignment || 0x24 || [[#HdlsState]]
+
| 0x14 || 0x24 || [[#HdlsState]]. Unknown if the last 4-bytes are included in this struct, [[#SetAutoPilotVirtualPadState]]/[[#hiddbgGetAbstractedPadsState]] only uses the first 0x20-bytes.
 
|-
 
|-
| <Immediately following the above> || 0x4 || Padding
+
| 0x38 || 0x60 || Unused with [[#SetAutoPilotVirtualPadState]]/[[#GetAbstractedPadsState]].
 
|}
 
|}
   −
= HdlsDeviceInfo =
+
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 is a 0x10-byte struct.
      +
Type:
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 +
!  Bits
 +
!  [[#HdlsDeviceInfo]]::type bits
 +
!  Description
 +
!  Notes
 
|-
 
|-
! Offset || Size || Description
+
| 0 || 0 || ||  
 
|-
 
|-
| 0x0 || 0x4 || [[#DeviceTypeInternal]]
+
| 1 || 15 || || [[#DeviceType]] |= BIT(1)
 
|-
 
|-
| 0x4 || 0x4 || RGBA Single Body Color
+
| 2 || 1 || ||  
 
|-
 
|-
| 0x8 || 0x4 || RGBA Single Buttons Color
+
| 3 || 2 || ||  
 
|-
 
|-
| 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.
+
| 4 || 1 || ||  
 
|-
 
|-
| 0xD || 0x3 || Padding
+
| 5 || 2 || ||  
|}
  −
 
  −
[9.0.0+] This is a 0x14-byte struct.
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Description
+
| 6 || 3 || ||  
 
|-
 
|-
| 0x0 || 0x1 || [[#DeviceTypeInternal]]
+
| 7 || 11 || || [[#DeviceType]] |= BIT(11)
 
|-
 
|-
| 0x1 || 0x1 || [[#NpadInterfaceType]]. Similar to the field from the old struct.
+
| 8 || 12 || || [[#DeviceType]] |= BIT(12)
 
|-
 
|-
| 0x2 || 0x2 || Padding
+
| 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)
 
|-
 
|-
| 0x4 || 0x4 || RGBA Single Body Color
+
| 14 || 14 || || [[#DeviceType]] |= BIT(14)
 
|-
 
|-
| 0x8 || 0x4 || RGBA Single Buttons Color
+
| 15 || 17 || ||  
 
|-
 
|-
| 0xC || 0x4 || RGBA Unknown Body Color
+
| 31 || 21 || || [[#DeviceType]] = BIT(31)
 
|-
 
|-
| 0x10 || 0x4 || RGBA Unknown Buttons Color
   
|}
 
|}
   −
= DeviceTypeInternal =
+
The above "[[#DeviceType]] |=" notes only apply when type2 is 0x2.
This is "nn::hid::detail::DeviceTypeInternal".
+
 
 +
= HdlsNpadAssignment =
 +
This is a 0x208-byte struct.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
!  Bits
  −
!  Description
   
|-
 
|-
| 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 left controller
   
|-
 
|-
| 12
+
| 0x8 || 0x200(0x20*0x10) || Array of [[#HdlsNpadAssignmentEntry]].
| Famicom right controller (with microphone)
+
|}
 +
 
 +
= HdlsNpadAssignmentEntry =
 +
This is a 0x20-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 13
+
! Offset || Size || Description
| NES left controller
   
|-
 
|-
| 14
+
| 0x0 || 0x8 || HdlsHandle
| NES right controller
   
|-
 
|-
| 15-16
+
| 0x8 || 0x4 || ?
| Invalid
   
|-
 
|-
| 17
+
| 0xC || 0x4 || ?
| Generic external controller
   
|-
 
|-
| 18-20
+
| 0x10 || 0x8 || ?
| Invalid
+
|-
 +
| 0x18 || 0x1 || ?
 
|-
 
|-
| 21-23
+
| 0x19 || 0x7 || Padding
| Generic controller
   
|}
 
|}
   −
[9.0.0+] This is "nn::hidtypes::DeviceType".
+
= HdlsStateList =
 +
This is a 0x408-byte struct.
 +
 
 +
[9.0.0+] This is a 0x488-byte struct.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
!  Value
  −
!  [[#DeviceType|DeviceType]]
  −
!  [[#UniquePadType|UniquePadType]]
  −
!  Description
   
|-
 
|-
| 1 || JoyRight, HandheldRight || JoyRight || Joy-Con right controller
+
! Offset || Size || Description
 
|-
 
|-
| 2 || JoyLeft, HandheldLeft || JoyLeft || Joy-Con left controller
+
| 0x0 || 0x4 || s32 Total entries
 
|-
 
|-
| 3 || FullKey || FullKey || Pro Controller
+
| 0x4 || 0x4 || Padding
 
|-
 
|-
| 4 || JoyLeft || JoyLeft || Reserved
+
| 0x8 || <[[#HdlsStateListEntry]] size>*0x10 || Array of [[#HdlsStateListEntry]].
|-
+
|}
| 5 || JoyRight || JoyRight || Reserved
+
 
 +
This contains a list of all controllers, including non-virtual controllers.
 +
 
 +
= HdlsStateListEntry =
 +
This is a 0x40-byte struct.
 +
 
 +
[9.0.0+] This is a 0x48-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 6 || FullKey || FullKey || Reserved
+
! Offset || Size || Description
 
|-
 
|-
| 7 || LarkHvcLeft, HandheldLarkHvcLeft || JoyLeft || Famicom left controller
+
| 0x0 || 0x8 || HdlsHandle
 
|-
 
|-
| 8 || LarkHvcRight, HandheldLarkHvcRight || JoyRight || Famicom right controller (with microphone)
+
| 0x8 || [[#HdlsDeviceInfo]] size || [[#HdlsDeviceInfo]]. With [[#ApplyHdlsStateList]] this is only used when creating new devices.
 
|-
 
|-
| 9 || LarkNesLeft, HandheldLarkNesLeft || JoyLeft || NES left controller
+
| 0x8 + [[#HdlsDeviceInfo]] size, with 8-byte alignment || 0x24 || [[#HdlsState]]
 
|-
 
|-
| 10 || LarkNesRight, HandheldLarkNesRight || JoyRight || NES right controller
+
| <Immediately following the above> || 0x4 || Padding
 +
|}
 +
 
 +
= HdlsDeviceInfo =
 +
This is a 0x10-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 11 || Lucia || FullKey || SNES controller
+
! Offset || Size || Description
 
|-
 
|-
| 12 || Palma || Other || Poké Ball Plus controller
+
| 0x0 || 0x4 || [[#DeviceTypeInternal]]
 
|-
 
|-
| 13 || FullKey || FullKey || Gc controller
+
| 0x4 || 0x4 || RGBA Single Body Color
 
|-
 
|-
| 14 || HandheldLeft || JoyLeft || Reserved
+
| 0x8 || 0x4 || RGBA Single Buttons Color
 
|-
 
|-
| 15 || FullKey || FullKey || Reserved
+
| 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.
 
|-
 
|-
| 16 || FullKey || FullKey || Reserved
+
| 0xD || 0x3 || Padding
|-
  −
| 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)
   
|}
 
|}
   −
= HdlsState =
+
[9.0.0+] This is a 0x14-byte struct.
This is a 0x24-byte struct.
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 2,187: Line 2,260:  
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x1 || powerConnected for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
+
| 0x0 || 0x1 || [[#DeviceTypeInternal]]
 
|-
 
|-
| 0x1 || 0x1 || ORRed with powerConnected to set the value of the first byte for the controller [[HID_Shared_Memory#Flags|flags]].
+
| 0x1 || 0x1 || [[#NpadInterfaceType]]. Similar to the field from the old struct.
 
|-
 
|-
| 0x2 || 0x6 || Unknown
+
| 0x2 || 0x2 || Padding
 
|-
 
|-
| 0x8 || 0x4 || batteryCharge for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
+
| 0x4 || 0x4 || RGBA Single Body Color
 
|-
 
|-
| 0xC || 0x4 || [[HID_Shared_Memory#Button_State|Buttons]]. Bit18 = HOME and bit19 = Capture.
+
| 0x8 || 0x4 || RGBA Single Buttons Color
 
|-
 
|-
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]].
+
| 0xC || 0x4 || RGBA Unknown Body Color
 
|-
 
|-
| 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases).
+
| 0x10 || 0x4 || RGBA Unknown Buttons Color
|-
  −
| 0x21 || 0x3 || Padding
   
|}
 
|}
   −
[9.0.0+]:
+
= DeviceTypeInternal =
 +
This is "nn::hid::detail::DeviceTypeInternal".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 +
!  Bits
 +
!  Description
 
|-
 
|-
! Offset || Size || 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.
 
|-
 
|-
| 0x0 || 0x4 || batteryCharge for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
+
| 8-10
 +
| Pro Controller
 
|-
 
|-
| 0x4 || 0x4 || Unknown
+
| 11
 +
| Famicom left controller
 
|-
 
|-
| 0x8 || 0x8 || [[HID_Shared_Memory#Button_State|Buttons]], masked with 0xfffffffff00fffff. See above table regarding HOME/Capture buttons.
+
| 12
 +
| Famicom right controller (with microphone)
 
|-
 
|-
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]].
+
| 13
 +
| NES left controller
 +
|-
 +
| 14
 +
| NES right controller
 +
|-
 +
| 15-16
 +
| Invalid
 +
|-
 +
| 17
 +
| Generic external controller
 
|-
 
|-
| 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases).
+
| 18-20
 +
| Invalid
 
|-
 
|-
| 0x21 || 0x3 || Padding
+
| 21-23
 +
| Generic controller
 
|}
 
|}
   −
= NotificationLedPattern =
+
[9.0.0+] This is "nn::hidtypes::DeviceType".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 +
!  Value
 +
!  [[#DeviceType|DeviceType]]
 +
!  [[#UniquePadType|UniquePadType]]
 +
!  Description
 
|-
 
|-
! Offset || Size || Subcommand argdata bytepos || Subcommand argdata nibble || Description
+
| 1 || JoyRight, HandheldRight || JoyRight || Joy-Con right controller
 
|-
 
|-
| 0x0 || 0x1 || 0x0 || Low || Mini Cycle Base Duration. Value 0x1-0xF: 12.5ms - 187.5ms. Value 0x0 = 0ms/OFF.
+
| 2 || JoyLeft, HandheldLeft || JoyLeft || Joy-Con left controller
 
|-
 
|-
| 0x1 || 0x1 || 0x0 || High || Number of Mini Cycles + 1. Value 0x0-0xF: 1 - 16 mini cycles.
+
| 3 || FullKey || FullKey || Pro Controller
 
|-
 
|-
| 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.
+
| 4 || JoyLeft || JoyLeft || Reserved
 
|-
 
|-
| 0x3 || 0x1 || 0x1 || High || LED Start Intensity. Value 0x0-0xF: 0% - 100%. (In HW, 1 - 241 duty)
+
| 5 || JoyRight || JoyRight || Reserved
 
|-
 
|-
| 0x4 || 0x1 || 0x2 || High || Mini Cycle 1 LED Intensity. Value 0x0-0xF: 0% - 100%. (In HW, 1 - 241 duty)
+
| 6 || FullKey || FullKey || Reserved
 
|-
 
|-
| 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.
+
| 7 || LarkHvcLeft, HandheldLarkHvcLeft || JoyLeft || Famicom left controller
 
|-
 
|-
| 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.
+
| 8 || LarkHvcRight, HandheldLarkHvcRight || JoyRight || Famicom right controller (with microphone)
 
|-
 
|-
| 0x7 || 0x1 || || || Unused
+
| 9 || LarkNesLeft, HandheldLarkNesLeft || JoyLeft || NES left controller
 
|-
 
|-
| 0x8 || 0x1 || 0x2 || Low || Mini Cycle 2 LED Intensity.
+
| 10 || LarkNesRight, HandheldLarkNesRight || JoyRight || NES right controller
 
|-
 
|-
| 0x9 || 0x1 || 0x4 || High || Fading Transition Steps to Mini Cycle 2 (see above).
+
| 11 || Lucia || FullKey || SNES controller
 
|-
 
|-
| 0xA || 0x1 || 0x4 || Low || Final Step Duration Multiplier of Mini Cycle 2 (see above).
+
| 12 || Palma || Other || Poké Ball Plus controller
 
|-
 
|-
| 0xB || 0x1 || || || Unused
+
| 13 || FullKey || FullKey || Gc controller
 
|-
 
|-
| 0xC || 0x1 || 0x5 || High || Mini Cycle 3 LED Intensity.
+
| 14 || HandheldLeft || JoyLeft || Reserved
 
|-
 
|-
| 0xD || 0x1 || 0x6 || High || Fading Transition Steps to Mini Cycle 3 (see above).
+
| 15 || FullKey || FullKey || Reserved
 
|-
 
|-
| 0xE || 0x1 || 0x6 || Low || Final Step Duration Multiplier of Mini Cycle 3 (see above).
+
| 16 || FullKey || FullKey || Reserved
 
|-
 
|-
| 0xF || 0x1 || || || Unused
+
| 17 || DebugPad || DebugPad || Debug controller
 
|-
 
|-
| 0x10 || 0x1 || 0x5 || Low || Mini Cycle 4 LED Intensity.
+
| 18 || HandheldRight || JoyRight || Reserved
 
|-
 
|-
| 0x11 || 0x1 || 0x7 || High || Fading Transition Duration to Mini Cycle 4 (see above).
+
| 19 || System || Other || Unknown (has [[#NpadStyleTag|NpadFullKey]] style tag)
 
|-
 
|-
| 0x12 || 0x1 || 0x7 || Low || Final Step Duration Multiplier of Mini Cycle 4 (see above).
+
| 20 || System || Other || Unknown (has [[#NpadStyleTag|NpadJoyDual]] style tag)
 
|-
 
|-
| 0x13 || 0x1 || || || Unused
+
| 21 || System || Other || Unknown (has [[#NpadStyleTag|NpadJoyDual]] style tag)
 +
|}
 +
 
 +
= HdlsState =
 +
This is a 0x24-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x14 || 0x1 || 0x8 || High || Mini Cycle 5 LED Intensity.
+
! Offset || Size || Description
 
|-
 
|-
| 0x15 || 0x1 || 0x9 || High || Fading Transition Steps to Mini Cycle 5 (see above).
+
| 0x0 || 0x1 || powerConnected for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
 
|-
 
|-
| 0x16 || 0x1 || 0x9 || Low || Final Step Duration Multiplier of Mini Cycle 5 (see above).
+
| 0x1 || 0x1 || ORRed with powerConnected to set the value of the first byte for the controller [[HID_Shared_Memory#Flags|flags]].
 
|-
 
|-
| 0x17 || 0x1 || || || Unused
+
| 0x2 || 0x6 || Unknown
 
|-
 
|-
| 0x18 || 0x1 || 0x8 || Low || Mini Cycle 6 LED Intensity.
+
| 0x8 || 0x4 || batteryCharge for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
 
|-
 
|-
| 0x19 || 0x1 || 0xA || High || Fading Transition Steps to Mini Cycle 6 (see above).
+
| 0xC || 0x4 || [[HID_Shared_Memory#Button_State|Buttons]]. Bit18 = HOME and bit19 = Capture.
 
|-
 
|-
| 0x1A || 0x1 || 0xA || Low || Final Step Duration Multiplier of Mini Cycle 6 (see above).
+
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]].
 
|-
 
|-
| 0x1B || 0x1 || || || Unused
+
| 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases).
 
|-
 
|-
| 0x1C || 0x1 || 0xB || High || Mini Cycle 7 LED Intensity.
+
| 0x21 || 0x3 || Padding
 +
|}
 +
 
 +
[9.0.0+]:
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x1D || 0x1 || 0xC || High || Fading Transition Steps  to Mini Cycle 7 (see above).
+
! Offset || Size || Description
 
|-
 
|-
| 0x1E || 0x1 || 0xC || Low || Final Step Duration Multiplier of Mini Cycle 7 (see above).
+
| 0x0 || 0x4 || batteryCharge for the main [[HID_Shared_Memory#Controllers|PowerInfo]].
 
|-
 
|-
| 0x1F || 0x1 || || || Unused
+
| 0x4 || 0x4 || Unknown
 
|-
 
|-
| 0x20 || 0x1 || 0xB || Low || Mini Cycle 8 LED Intensity.
+
| 0x8 || 0x8 || [[HID_Shared_Memory#Button_State|Buttons]], masked with 0xfffffffff00fffff. See above table regarding HOME/Capture buttons.
 
|-
 
|-
| 0x21 || 0x1 || 0xD || Low || Fading Transition Steps to Mini Cycle 8 (see above).
+
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]].
 
|-
 
|-
| 0x22 || 0x1 || 0xD || High || Final Step Duration Multiplier of Mini Cycle 8 (see above).
+
| 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases).
 
|-
 
|-
| 0x23 || 0x1 || || || Unused
+
| 0x21 || 0x3 || Padding
 +
|}
 +
 
 +
= NotificationLedPattern =
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x24 || 0x1 || 0xE || High || Mini Cycle 9 LED Intensity.
+
! Offset || Size || Subcommand argdata bytepos || Subcommand argdata nibble || Description
 
|-
 
|-
| 0x25 || 0x1 || 0xF || High || Fading Transition Steps to Mini Cycle 9 (see above).
+
| 0x0 || 0x1 || 0x0 || Low || Mini Cycle Base Duration. Value 0x1-0xF: 12.5ms - 187.5ms. Value 0x0 = 0ms/OFF.
 
|-
 
|-
| 0x26 || 0x1 || 0xF || Low || Final Step Duration Multiplier of Mini Cycle 9 (see above).
+
| 0x1 || 0x1 || 0x0 || High || Number of Mini Cycles + 1. Value 0x0-0xF: 1 - 16 mini cycles.
 
|-
 
|-
| 0x27 || 0x1 || || || Unused
+
| 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.
 
|-
 
|-
| 0x28 || 0x1 || 0xE || Low || Mini Cycle 10 LED Intensity.
+
| 0x3 || 0x1 || 0x1 || High || LED Start Intensity. Value 0x0-0xF: 0% - 100%. (In HW, 1 - 241 duty)
 
|-
 
|-
| 0x29 || 0x1 || 0x10 || High || Fading Transition Steps to Mini Cycle 10 (see above).
+
| 0x4 || 0x1 || 0x2 || High || Mini Cycle 1 LED Intensity. Value 0x0-0xF: 0% - 100%. (In HW, 1 - 241 duty)
 
|-
 
|-
| 0x2A || 0x1 || 0x10 || Low || Final Step Duration Multiplier of Mini Cycle 10 (see above).
+
| 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.
 
|-
 
|-
| 0x2B || 0x1 || || || Unused
+
| 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.
 
|-
 
|-
| 0x2C || 0x1 || 0x11 || High || Mini Cycle 11 LED Intensity.
+
| 0x7 || 0x1 || || || Unused
 
|-
 
|-
| 0x2D || 0x1 || 0x12 || High || Fading Transition Steps to Mini Cycle 11 (see above).
+
| 0x8 || 0x1 || 0x2 || Low || Mini Cycle 2 LED Intensity.
 
|-
 
|-
| 0x2E || 0x1 || 0x12 || Low || Final Step Duration Multiplier of Mini Cycle 11 (see above).
+
| 0x9 || 0x1 || 0x4 || High || Fading Transition Steps to Mini Cycle 2 (see above).
 
|-
 
|-
| 0x2F || 0x1 || || || Unused
+
| 0xA || 0x1 || 0x4 || Low || Final Step Duration Multiplier of Mini Cycle 2 (see above).
 
|-
 
|-
| 0x30 || 0x1 || 0x11 || Low || Mini Cycle 12 LED Intensity.
+
| 0xB || 0x1 || || || Unused
 
|-
 
|-
| 0x31 || 0x1 || 0x13 || High || Fading Transition Steps to Mini Cycle 12 (see above).
+
| 0xC || 0x1 || 0x5 || High || Mini Cycle 3 LED Intensity.
 
|-
 
|-
| 0x32 || 0x1 || 0x13 || Low || Final Step Duration Multiplier of Mini Cycle 12 (see above).
+
| 0xD || 0x1 || 0x6 || High || Fading Transition Steps to Mini Cycle 3 (see above).
 
|-
 
|-
| 0x33 || 0x1 || || || Unused
+
| 0xE || 0x1 || 0x6 || Low || Final Step Duration Multiplier of Mini Cycle 3 (see above).
 
|-
 
|-
| 0x34 || 0x1 || 0x14 || High || Mini Cycle 13 LED Intensity.
+
| 0xF || 0x1 || || || Unused
 
|-
 
|-
| 0x35 || 0x1 || 0x15 || High || Fading Transition Steps to Mini Cycle 13 (see above).
+
| 0x10 || 0x1 || 0x5 || Low || Mini Cycle 4 LED Intensity.
 
|-
 
|-
| 0x36 || 0x1 || 0x15 || Low || Final Step Duration Multiplier of Mini Cycle 13 (see above).
+
| 0x11 || 0x1 || 0x7 || High || Fading Transition Duration to Mini Cycle 4 (see above).
 
|-
 
|-
| 0x37 || 0x1 || || || Unused
+
| 0x12 || 0x1 || 0x7 || Low || Final Step Duration Multiplier of Mini Cycle 4 (see above).
 
|-
 
|-
| 0x38 || 0x1 || 0x14 || Low || Mini Cycle 14 LED Intensity.
+
| 0x13 || 0x1 || || || Unused
 
|-
 
|-
| 0x39 || 0x1 || 0x16 || High || Fading Transition Steps to Mini Cycle 14 (see above).
+
| 0x14 || 0x1 || 0x8 || High || Mini Cycle 5 LED Intensity.
 
|-
 
|-
| 0x3A || 0x1 || 0x16 || Low || Final Step Duration Multiplier of Mini Cycle 14 (see above).
+
| 0x15 || 0x1 || 0x9 || High || Fading Transition Steps to Mini Cycle 5 (see above).
 
|-
 
|-
| 0x3B || 0x1 || || || Unused
+
| 0x16 || 0x1 || 0x9 || Low || Final Step Duration Multiplier of Mini Cycle 5 (see above).
 
|-
 
|-
| 0x3C || 0x1 || 0x17 || High || Mini Cycle 15 LED Intensity.
+
| 0x17 || 0x1 || || || Unused
 
|-
 
|-
| 0x3D || 0x1 || 0x18 || High || Fading Transition Steps to Mini Cycle 15 (see above).
+
| 0x18 || 0x1 || 0x8 || Low || Mini Cycle 6 LED Intensity.
 
|-
 
|-
| 0x3E || 0x1 || 0x18 || Low || Final Step Duration Multiplier of Mini Cycle 15 (see above).
+
| 0x19 || 0x1 || 0xA || High || Fading Transition Steps to Mini Cycle 6 (see above).
 
|-
 
|-
| 0x3F || 0x1 || || || Unused
+
| 0x1A || 0x1 || 0xA || Low || Final Step Duration Multiplier of Mini Cycle 6 (see above).
 
|-
 
|-
| 0x40 || 0x1 || 0x17 || Low || Mini Cycle 16 LED Intensity.
+
| 0x1B || 0x1 || || || Unused
 
|-
 
|-
| 0x41 || 0x1 || 0x19 || High || Fading Transition Steps to Mini Cycle 16 (see above). (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
+
| 0x1C || 0x1 || 0xB || High || Mini Cycle 7 LED Intensity.
 
|-
 
|-
| 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.)
+
| 0x1D || 0x1 || 0xC || High || Fading Transition Steps  to Mini Cycle 7 (see above).
 
|-
 
|-
| 0x43 || 0x1 || || || Unused
+
| 0x1E || 0x1 || 0xC || Low || Final Step Duration Multiplier of Mini Cycle 7 (see above).
 
|-
 
|-
| 0x44 || 0x1 || 0x1A || High || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
+
| 0x1F || 0x1 || || || Unused
 
|-
 
|-
| 0x45 || 0x1 || 0x1A || Low || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
+
| 0x20 || 0x1 || 0xB || Low || Mini Cycle 8 LED Intensity.
 
|-
 
|-
| 0x46 || 0x1 || || || Padding
+
| 0x21 || 0x1 || 0xD || Low || Fading Transition Steps to Mini Cycle 8 (see above).
 
|-
 
|-
| 0x47 || 0x1 || || || Padding
+
| 0x22 || 0x1 || 0xD || High || Final Step Duration Multiplier of Mini Cycle 8 (see above).
 
|-
 
|-
|}
+
| 0x23 || 0x1 || || || Unused
 
  −
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"
   
|-
 
|-
! Offset || Size || Description
+
| 0x24 || 0x1 || 0xE || High || Mini Cycle 9 LED Intensity.
 
|-
 
|-
| 0x0 || 0x1B || See above.
+
| 0x25 || 0x1 || 0xF || High || Fading Transition Steps to Mini Cycle 9 (see above).
 
|-
 
|-
| 0x1B || 0xB || Cleared to zero.
+
| 0x26 || 0x1 || 0xF || Low || Final Step Duration Multiplier of Mini Cycle 9 (see above).
 
|-
 
|-
| 0x26 || 0x5 || Unused
+
| 0x27 || 0x1 || || || Unused
 
|-
 
|-
| 0x2B || 0x8 || Set to an input value, which is hard-coded 0.
+
| 0x28 || 0x1 || 0xE || Low || Mini Cycle 10 LED Intensity.
 
|-
 
|-
| 0x33 || 0x2 || Set to value 0.
+
| 0x29 || 0x1 || 0x10 || High || Fading Transition Steps to Mini Cycle 10 (see above).
 
|-
 
|-
| 0x35 || 0x1 || Set to value 1.
+
| 0x2A || 0x1 || 0x10 || Low || Final Step Duration Multiplier of Mini Cycle 10 (see above).
|}
  −
 
  −
= DeviceType =
  −
This is "nn::hid::system::DeviceType".
  −
 
  −
{| class="wikitable" border="1"
  −
!  Bits
  −
!  Description
   
|-
 
|-
| 0
+
| 0x2B || 0x1 || || || Unused
| FullKey
   
|-
 
|-
| 1
+
| 0x2C || 0x1 || 0x11 || High || Mini Cycle 11 LED Intensity.
| DebugPad
   
|-
 
|-
| 2
+
| 0x2D || 0x1 || 0x12 || High || Fading Transition Steps to Mini Cycle 11 (see above).
| HandheldLeft
   
|-
 
|-
| 3
+
| 0x2E || 0x1 || 0x12 || Low || Final Step Duration Multiplier of Mini Cycle 11 (see above).
| HandheldRight
   
|-
 
|-
| 4
+
| 0x2F || 0x1 || || || Unused
| JoyLeft
   
|-
 
|-
| 5
+
| 0x30 || 0x1 || 0x11 || Low || Mini Cycle 12 LED Intensity.
| JoyRight
   
|-
 
|-
| 6
+
| 0x31 || 0x1 || 0x13 || High || Fading Transition Steps to Mini Cycle 12 (see above).
| Palma
   
|-
 
|-
| 7
+
| 0x32 || 0x1 || 0x13 || Low || Final Step Duration Multiplier of Mini Cycle 12 (see above).
| LarkHvcLeft
   
|-
 
|-
| 8
+
| 0x33 || 0x1 || || || Unused
| LarkHvcRight
   
|-
 
|-
| 9
+
| 0x34 || 0x1 || 0x14 || High || Mini Cycle 13 LED Intensity.
| LarkNesLeft
   
|-
 
|-
| 10
+
| 0x35 || 0x1 || 0x15 || High || Fading Transition Steps to Mini Cycle 13 (see above).
| LarkNesRight
   
|-
 
|-
| 11
+
| 0x36 || 0x1 || 0x15 || Low || Final Step Duration Multiplier of Mini Cycle 13 (see above).
| HandheldLarkHvcLeft
   
|-
 
|-
| 12
+
| 0x37 || 0x1 || || || Unused
| HandheldLarkHvcRight
   
|-
 
|-
| 13
+
| 0x38 || 0x1 || 0x14 || Low || Mini Cycle 14 LED Intensity.
| HandheldLarkNesLeft
   
|-
 
|-
| 14
+
| 0x39 || 0x1 || 0x16 || High || Fading Transition Steps to Mini Cycle 14 (see above).
| HandheldLarkNesRight
   
|-
 
|-
| 15
+
| 0x3A || 0x1 || 0x16 || Low || Final Step Duration Multiplier of Mini Cycle 14 (see above).
| Lucia
   
|-
 
|-
| 16-30
+
| 0x3B || 0x1 || || || Unused
| Reserved
   
|-
 
|-
| 31
+
| 0x3C || 0x1 || 0x17 || High || Mini Cycle 15 LED Intensity.
| System
  −
|}
  −
 
  −
= UniquePadType =
  −
This is "nn::hid::system::UniquePadType".
  −
 
  −
{| class="wikitable" border="1"
  −
!  Value
  −
!  Description
   
|-
 
|-
| 0x0 || Other
+
| 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.
 
|-
 
|-
| 0x1 || FullKey
+
| 0x41 || 0x1 || 0x19 || High || Fading Transition Steps to Mini Cycle 16 (see above). (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
 
|-
 
|-
| 0x2 || JoyRight
+
| 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.)
 
|-
 
|-
| 0x3 || JoyLeft
+
| 0x43 || 0x1 || || || Unused
 
|-
 
|-
| 0x4 || DebugPad
+
| 0x44 || 0x1 || 0x1A || High || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
|}
  −
 
  −
= IrCameraHandle =
  −
This is "nn::irsensor::IrCameraHandle". This is an u32.
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Description
+
| 0x45 || 0x1 || 0x1A || Low || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.)
 
|-
 
|-
| 0x0 || 0x1 || PlayerNumber
+
| 0x46 || 0x1 || || || Padding
 
|-
 
|-
| 0x1 || 0x1 || DeviceType
+
| 0x47 || 0x1 || || || Padding
 
|-
 
|-
| 0x2 || 0x2 || Reserved
   
|}
 
|}
   −
= IrCameraStatus =
+
This is "nn::hid::system::NotificationLedPattern".
This is "nn::irsensor::IrCameraStatus". This is an u32.
+
 
 +
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"
 
{| class="wikitable" border="1"
!  Value
  −
!  Description
   
|-
 
|-
| 0 || Available
+
! 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.
 
|-
 
|-
| 1 || Unsupported
+
| 0x33 || 0x2 || Set to value 0.
 
|-
 
|-
| 2 || Unconnected
+
| 0x35 || 0x1 || Set to value 1.
 
|}
 
|}
   −
= IrSensorMode =
+
= DeviceType =
This is "nn::irsensor::detail::StatusManager::IrSensorMode". This is an u32.
+
This is "nn::hid::system::DeviceType".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Value
+
Bits
 
!  Description
 
!  Description
 
|-
 
|-
| 0 || None
+
| 0
 +
| FullKey
 
|-
 
|-
| 1 || [[#MomentProcessorState|MomentProcessor]]
+
| 1
 +
| DebugPad
 
|-
 
|-
| 2 || [[#ClusteringProcessorState|ClusteringProcessor]]
+
| 2
 +
| HandheldLeft
 
|-
 
|-
| 3 || [[#ImageTransferProcessorState|ImageTransferProcessor]]
+
| 3
 +
| HandheldRight
 
|-
 
|-
| 4 || [[#PointingProcessorState|PointingProcessor]]
+
| 4
 +
| JoyLeft
 
|-
 
|-
| 5 || [[#TeraPluginProcessorState|TeraPluginProcessor]]
+
| 5
 +
| JoyRight
 
|-
 
|-
| 6 || Unknown
+
| 6
|}
+
| Palma
 
  −
= PackedMomentProcessorConfig =
  −
This is "nn::irsensor::PackedMomentProcessorConfig". This is a 0x20-byte struct.
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Description
+
| 7
 +
| LarkHvcLeft
 
|-
 
|-
| 0x0 || 0x8 || ExposureTime (default is 0x493E0)
+
| 8
 +
| LarkHvcRight
 
|-
 
|-
| 0x8 || 0x1 || LightTarget (default is 0)
+
| 9
 +
| LarkNesLeft
 
|-
 
|-
| 0x9 || 0x1 || Gain (default is 0x8)
+
| 10
 +
| LarkNesRight
 
|-
 
|-
| 0xA || 0x1 || IsNegativeImageUsed (default is 0)
+
| 11
 +
| HandheldLarkHvcLeft
 
|-
 
|-
| 0xB || 0x5 || Reserved
+
| 12
 +
| HandheldLarkHvcRight
 
|-
 
|-
| 0x10 || 0x2 || WindowOfInterestX (default is 0)
+
| 13
 +
| HandheldLarkNesLeft
 
|-
 
|-
| 0x12 || 0x2 || WindowOfInterestY (default is 0)
+
| 14
 +
| HandheldLarkNesRight
 
|-
 
|-
| 0x14 || 0x2 || WindowOfInterestWidth (default is 0x140)
+
| 15
 +
| Lucia
 
|-
 
|-
| 0x16 || 0x2 || WindowOfInterestHeight (default is 0xF0)
+
| 16-30
 +
| Reserved
 +
|-
 +
| 31
 +
| System
 +
|}
 +
 
 +
= UniquePadType =
 +
This is "nn::hid::system::UniquePadType".
 +
 
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
|-
 +
| 0x0 || Other
 
|-
 
|-
| 0x18 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]] (default is 0xA0003)
+
| 0x1 || FullKey
 
|-
 
|-
| 0x1C || 0x1 || Preprocess (default is 0x1)
+
| 0x2 || JoyRight
 
|-
 
|-
| 0x1D || 0x1 || PreprocessIntensityThreshold (default is 0x50)
+
| 0x3 || JoyLeft
 
|-
 
|-
| 0x1E || 0x2 || Reserved
+
| 0x4 || DebugPad
 
|}
 
|}
   −
= PackedClusteringProcessorConfig =
+
= IrCameraHandle =
This is "nn::irsensor::PackedClusteringProcessorConfig". This is a 0x28-byte struct.
+
This is "nn::irsensor::IrCameraHandle".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 2,570: Line 2,670:  
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x8 || ExposureTime
+
| 0x0 || 0x1 || PlayerNumber
 
|-
 
|-
| 0x8 || 0x1 || LightTarget
+
| 0x1 || 0x1 || DeviceType
 
|-
 
|-
| 0x9 || 0x1 || Gain
+
| 0x2 || 0x2 || Reserved
 +
|}
 +
 
 +
= IrCameraStatus =
 +
This is "nn::irsensor::IrCameraStatus".
 +
 
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 
|-
 
|-
| 0xA || 0x1 || IsNegativeImageUsed
+
| 0 || Available
 
|-
 
|-
| 0xB || 0x5 || Reserved
+
| 1 || Unsupported
 
|-
 
|-
| 0x10 || 0x2 || WindowOfInterestX
+
| 2 || Unconnected
 +
|}
 +
 
 +
= IrCameraInternalStatus =
 +
This is "nn::irsensor::IrCameraInternalStatus".
 +
 
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 
|-
 
|-
| 0x12 || 0x2 || WindowOfInterestY
+
| 0 || Stopped
 
|-
 
|-
| 0x14 || 0x2 || WindowOfInterestWidth
+
| 1 || FirmwareUpdateNeeded
 
|-
 
|-
| 0x16 || 0x2 || WindowOfInterestHeight
+
| 2 ||  
 
|-
 
|-
| 0x18 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
+
| 3 ||  
 
|-
 
|-
| 0x1C || 0x4 || ObjectPixelCountMin
+
| 4 ||  
 
|-
 
|-
| 0x20 || 0x4 || ObjectPixelCountMax
+
| 5 || FirmwareVersionRequested
 
|-
 
|-
| 0x24 || 0x1 || ObjectIntensityMin
+
| 6 || FirmwareVersionIsInvalid
 
|-
 
|-
| 0x25 || 0x1 || IsExternalLightFilterEnabled
+
| 7 || [4.0.0+] Ready
 
|-
 
|-
| 0x26 || 0x2 || Reserved
+
| 8 || [4.0.0+] Setting
 
|}
 
|}
   −
= PackedImageTransferProcessorConfig =
+
= IrSensorMode =
This is "nn::irsensor::PackedImageTransferProcessorConfig". This is a 0x18-byte struct.
+
This is "nn::irsensor::detail::StatusManager::IrSensorMode".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 
|-
 
|-
! Offset || Size || Description
+
| 0 || None
 
|-
 
|-
| 0x0 || 0x8 || ExposureTime
+
| 1 || [[#MomentProcessorState|MomentProcessor]]
 
|-
 
|-
| 0x8 || 0x1 || LightTarget
+
| 2 || [[#ClusteringProcessorState|ClusteringProcessor]]
 
|-
 
|-
| 0x9 || 0x1 || Gain
+
| 3 || [[#ImageTransferProcessorState|ImageTransferProcessor]]
|-
  −
| 0xA || 0x1 || IsNegativeImageUsed
   
|-
 
|-
| 0xB || 0x5 || Reserved
+
| 4 || [[#PointingProcessorMarkerState|PointingProcessorMarker]]
 
|-
 
|-
| 0x10 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
+
| 5 || [[#TeraPluginProcessorState|TeraPluginProcessor]]
 
|-
 
|-
| 0x14 || 0x1 || Format
+
| 6 || Unknown
|-
  −
| 0x15 || 0x3 || Reserved
   
|}
 
|}
   −
= ImageTransferProcessorState =
+
= ImageProcessorStatus =
This is "nn::irsensor::ImageTransferProcessorState". This is a 0x10-byte struct.
+
This is "nn::irsensor::ImageProcessorStatus".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 
|-
 
|-
! Offset || Size || Description
+
| 0 || Stopped
 
|-
 
|-
| 0x0 || 0x8 || SamplingNumber
+
| 1 || Running
|-
  −
| 0x8 || 0x1 || AmbientNoiseLevel
  −
|-
  −
| 0x9 || 0x7 || Reserved
   
|}
 
|}
   −
= PackedTeraPluginProcessorConfig =
+
= ImageTransferProcessorFormat =
This is "nn::irsensor::PackedTeraPluginProcessorConfig". This is a 0x8-byte struct.
+
This is "nn::irsensor::ImageTransferProcessorFormat".
 +
 
 +
This controls the IR Sensor image resolution.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 
|-
 
|-
! Offset || Size || Description
+
| 0 || 320x240
|-
  −
| 0x0 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
   
|-
 
|-
| 0x4 || 0x1 || Mode
+
| 1 || 160x120
 
|-
 
|-
| 0x5 || 0x1 ||  
+
| 2 || 80x60
 
|-
 
|-
| 0x6 || 0x1 ||  
+
| 3 || [4.0.0+] 40x30
 
|-
 
|-
| 0x7 || 0x1 ||  
+
| 4 || [4.0.0+] 20x15
 
|}
 
|}
   −
= PackedPointingProcessorConfig =
+
= MomentProcessorConfig =
This is "nn::irsensor::PackedPointingProcessorConfig". This is a 0xC-byte struct.
+
This is "nn::irsensor::MomentProcessorConfig".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 2,664: Line 2,778:  
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x8 ||  
+
| 0x0 || 0x8 || ExposureTime (default is 0x493E0)
 +
|-
 +
| 0x8 || 0x4 || LightTarget (default is 0)
 +
|-
 +
| 0xC || 0x4 || Gain (default is 0x8)
 +
|-
 +
| 0x10 || 0x1 || IsNegativeImageUsed (default is 0)
 +
|-
 +
| 0x11 || 0x7 || Reserved
 +
|-
 +
| 0x18 || 0x2 || WindowOfInterestX (default is 0)
 +
|-
 +
| 0x1A || 0x2 || WindowOfInterestY (default is 0)
 +
|-
 +
| 0x1C || 0x2 || WindowOfInterestWidth (default is 0x140)
 +
|-
 +
| 0x1E || 0x2 || WindowOfInterestHeight (default is 0xF0)
 +
|-
 +
| 0x20 || 0x4 || Preprocess (default is 0x1)
 
|-
 
|-
| 0x8 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
+
| 0x24 || 0x4 || PreprocessIntensityThreshold (default is 0x50)
 
|}
 
|}
   −
= PackedMcuVersion =
+
= PackedMomentProcessorConfig =
This is "nn::irsensor::PackedMcuVersion". This is an u32.
+
This is "nn::irsensor::PackedMomentProcessorConfig".
 +
 
 +
This is converted from [[#MomentProcessorConfig]].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 2,676: Line 2,810:  
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x2 || MajorVersion
+
| 0x0 || 0x8 || ExposureTime (default is 0x493E0)
 
|-
 
|-
| 0x2 || 0x2 || MinorVersion
+
| 0x8 || 0x1 || LightTarget (default is 0)
|}
  −
 
  −
= PackedFunctionLevel =
  −
This is nn::irsensor::PackedFunctionLevel. This is an u32.
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Description
+
| 0x9 || 0x1 || Gain (default is 0x8)
 
|-
 
|-
| 0x0 || 0x1 || IrSensorFunctionLevel
+
| 0xA || 0x1 || IsNegativeImageUsed (default is 0)
 
|-
 
|-
| 0x1 || 0x3 || Reserved
+
| 0xB || 0x5 || Reserved
|}
  −
 
  −
= PackedImageTransferProcessorExConfig =
  −
This is "nn::irsensor::PackedImageTransferProcessorExConfig". This is a 0x20-byte struct.
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Description
+
| 0x10 || 0x2 || WindowOfInterestX (default is 0)
 
|-
 
|-
| 0x0 || 0x8 || ExposureTime
+
| 0x12 || 0x2 || WindowOfInterestY (default is 0)
 
|-
 
|-
| 0x8 || 0x1 || LightTarget
+
| 0x14 || 0x2 || WindowOfInterestWidth (default is 0x140)
 
|-
 
|-
| 0x9 || 0x1 || Gain
+
| 0x16 || 0x2 || WindowOfInterestHeight (default is 0xF0)
 
|-
 
|-
| 0xA || 0x1 || IsNegativeImageUsed
+
| 0x18 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
 
|-
 
|-
| 0xB || 0x5 || Reserved
+
| 0x1C || 0x1 || Preprocess (default is 0x1)
 
|-
 
|-
| 0x10 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
+
| 0x1D || 0x1 || PreprocessIntensityThreshold (default is 0x50)
 
|-
 
|-
| 0x14 || 0x1 || OrigFormat
+
| 0x1E || 0x2 || Reserved
|-
  −
| 0x15 || 0x1 || TrimmingFormat
  −
|-
  −
| 0x16 || 0x2 || TrimmingStartX
  −
|-
  −
| 0x18 || 0x2 || TrimmingStartY
  −
|-
  −
| 0x1A || 0x1 || IsExternalLightFilterEnabled
  −
|-
  −
| 0x1B || 0x5 || Reserved
   
|}
 
|}
   −
= PackedIrLedProcessorConfig =
+
= ClusteringProcessorConfig =
This is "nn::irsensor::PackedIrLedProcessorConfig". This is a 0x8-byte struct.
+
This is "nn::irsensor::ClusteringProcessorConfig".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 2,732: Line 2,844:  
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
+
| 0x0 || 0x8 || ExposureTime (default is 200000)
 +
|-
 +
| 0x8 || 0x4 || LightTarget (default is 0)
 +
|-
 +
| 0xC || 0x4 || Gain (default is 0x2)
 
|-
 
|-
| 0x4 || 0x4 ||  
+
| 0x10 || 0x1 || IsNegativeImageUsed (default is 0)
|}
  −
 
  −
= BusHandle =
  −
This is "nn::hidbus::BusHandle". This is 0x8-bytes.
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset || Size || Description
+
| 0x11 || 0x7 || Reserved
 
|-
 
|-
| 0x0 || 0x4 || AbstractedPadId
+
| 0x18 || 0x2 || WindowOfInterestX (default is 0)
 
|-
 
|-
| 0x4 || 0x1 || InternalIndex
+
| 0x1A || 0x2 || WindowOfInterestY (default is 0)
 
|-
 
|-
| 0x5 || 0x1 || PlayerNumber
+
| 0x1C || 0x2 || WindowOfInterestWidth (default is 320)
 
|-
 
|-
| 0x6 || 0x1 || BusTypeId
+
| 0x1E || 0x2 || WindowOfInterestHeight (default is 240)
 
|-
 
|-
| 0x7 || 0x1 || IsValid
+
| 0x20 || 0x4 || ObjectPixelCountMin (default is 0x3)
 +
|-
 +
| 0x24 || 0x4 || ObjectPixelCountMax (default is 0x12C00)
 +
|-
 +
| 0x28 || 0x4 || ObjectIntensityMin (default is 150)
 +
|-
 +
| 0x2C || 0x1 || IsExternalLightFilterEnabled (default is 0x1)
 
|}
 
|}
   −
= JoyPollingReceivedData =
+
= PackedClusteringProcessorConfig =
This is "nn::hidbus::JoyPollingReceivedData". This is 0x40-bytes.
+
This is "nn::irsensor::PackedClusteringProcessorConfig".
   −
This is copied from the entries in [[#EnableJoyPollingReceiveMode|TransferMemory]] by GetJoyPollingReceivedData.
+
This is converted from [[#ClusteringProcessorConfig]].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 2,764: Line 2,880:  
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x30 || Data
+
| 0x0 || 0x8 || ExposureTime
 +
|-
 +
| 0x8 || 0x1 || LightTarget
 +
|-
 +
| 0x9 || 0x1 || Gain
 +
|-
 +
| 0xA || 0x1 || IsNegativeImageUsed
 +
|-
 +
| 0xB || 0x5 || Reserved
 +
|-
 +
| 0x10 || 0x2 || WindowOfInterestX
 +
|-
 +
| 0x12 || 0x2 || WindowOfInterestY
 +
|-
 +
| 0x14 || 0x2 || WindowOfInterestWidth
 +
|-
 +
| 0x16 || 0x2 || WindowOfInterestHeight
 +
|-
 +
| 0x18 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
 +
|-
 +
| 0x1C || 0x4 || ObjectPixelCountMin
 
|-
 
|-
| 0x30 || 0x8 || Size of data.
+
| 0x20 || 0x4 || ObjectPixelCountMax
|-
+
|-
| 0x38 || 0x8 || Timestamp
+
| 0x24 || 0x1 || ObjectIntensityMin
|}
+
|-
 
+
| 0x25 || 0x1 || IsExternalLightFilterEnabled
= BusType =
+
|-
This is "nn::hidbus::BusType". This is an u32.
+
| 0x26 || 0x2 || Reserved
 
+
|}
{| class="wikitable" border="1"
+
 
!  Value
+
= ImageTransferProcessorConfig =
!  Description
+
This is "nn::irsensor::ImageTransferProcessorConfig".
|-
+
 
| 0 || JoyLeftRail
+
{| class="wikitable" border="1"
|-
+
|-
| 1 || JoyRightRail
+
! Offset || Size || Description
|-
+
|-
| 2 || [6.0.0+] LarkRightRail (for microphone)
+
| 0x0 || 0x8 || ExposureTime
 +
|-
 +
| 0x8 || 0x4 || LightTarget
 +
|-
 +
| 0xC || 0x4 || Gain
 +
|-
 +
| 0x10 || 0x1 || IsNegativeImageUsed
 +
|-
 +
| 0x11 || 0x7 || Reserved
 +
|-
 +
| 0x18 || 0x4 || [[#ImageTransferProcessorFormat|Format]]
 +
|}
 +
 
 +
= PackedImageTransferProcessorConfig =
 +
This is "nn::irsensor::PackedImageTransferProcessorConfig".
 +
 
 +
This is converted from [[#ImageTransferProcessorConfig]].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x8 || ExposureTime
 +
|-
 +
| 0x8 || 0x1 || LightTarget
 +
|-
 +
| 0x9 || 0x1 || Gain
 +
|-
 +
| 0xA || 0x1 || IsNegativeImageUsed
 +
|-
 +
| 0xB || 0x5 || Reserved
 +
|-
 +
| 0x10 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
 +
|-
 +
| 0x14 || 0x1 || [[#ImageTransferProcessorFormat|Format]]
 +
|-
 +
| 0x15 || 0x3 || Reserved
 +
|}
 +
 
 +
= ImageTransferProcessorState =
 +
This is "nn::irsensor::ImageTransferProcessorState".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x8 || SamplingNumber
 +
|-
 +
| 0x8 || 0x4 || AmbientNoiseLevel
 +
|-
 +
| 0xC || 0x4 || Reserved
 +
|}
 +
 
 +
= TeraPluginProcessorConfig =
 +
This is "nn::irsensor::TeraPluginProcessorConfig".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x1 || Mode
 +
|-
 +
| 0x1 || 0x1 ||
 +
|-
 +
| 0x2 || 0x1 ||
 +
|-
 +
| 0x3 || 0x1 ||
 +
|}
 +
 
 +
= PackedTeraPluginProcessorConfig =
 +
This is "nn::irsensor::PackedTeraPluginProcessorConfig".
 +
 
 +
This is converted from [[#TeraPluginProcessorConfig]]. The data starting at offset 0x5 is only initialized by the user-process with [6.0.0+].
 +
 
 +
[[#TeraPluginProcessorConfig]] +0x0, +0x2, and +0x3 are copied to +0x4, 0x6, and +0x7 here. +0x5 here is set to 0x2 | ([[#TeraPluginProcessorConfig]]+0x1 << 7).
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
 +
|-
 +
| 0x4 || 0x1 || Mode
 +
|-
 +
| 0x5 || 0x1 ||
 +
|-
 +
| 0x6 || 0x1 ||
 +
|-
 +
| 0x7 || 0x1 ||
 +
|}
 +
 
 +
= PointingProcessorConfig =
 +
This is "nn::irsensor::PointingProcessorConfig".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x2 || WindowOfInterestX (default is 0)
 +
|-
 +
| 0x2 || 0x2 || WindowOfInterestY (default is 0)
 +
|-
 +
| 0x4 || 0x2 || WindowOfInterestWidth (default is 320)
 +
|-
 +
| 0x6 || 0x2 || WindowOfInterestHeight (default is 240)
 +
|}
 +
 
 +
= PackedPointingProcessorConfig =
 +
This is "nn::irsensor::PackedPointingProcessorConfig".
 +
 
 +
This is converted from [[#PointingProcessorConfig]].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x2 || WindowOfInterestX (default is 0)
 +
|-
 +
| 0x2 || 0x2 || WindowOfInterestY (default is 0)
 +
|-
 +
| 0x4 || 0x2 || WindowOfInterestWidth (default is 320)
 +
|-
 +
| 0x6 || 0x2 || WindowOfInterestHeight (default is 240)
 +
|-
 +
| 0x8 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
 +
|}
 +
 
 +
= PackedMcuVersion =
 +
This is "nn::irsensor::PackedMcuVersion".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x2 || MajorVersion
 +
|-
 +
| 0x2 || 0x2 || MinorVersion
 +
|}
 +
 
 +
== Versions ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! MajorVersion || MinorVersion || SystemVersion
 +
|-
 +
| 0x3 || 0xB || [1.0.0+]
 +
|-
 +
| 0x4 || 0x12 || [4.0.0+]
 +
|-
 +
| 0x5 || 0x18 || [5.0.0+]
 +
|-
 +
| 0x6 || 0x1A || [6.0.0+]
 +
|-
 +
| 0x8 || 0x1B || [8.0.0+]
 +
|}
 +
 
 +
= PackedFunctionLevel =
 +
This is nn::irsensor::PackedFunctionLevel.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x1 || [[#IrSensorFunctionLevel]]
 +
|-
 +
| 0x1 || 0x3 || Reserved
 +
|}
 +
 
 +
== IrSensorFunctionLevel ==
 +
This is "nn::irsensor::IrSensorFunctionLevel".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value || SystemVersion
 +
|-
 +
| 0 || [1.0.0+]
 +
|-
 +
| 1 || [4.0.0+]
 +
|-
 +
| 2 || [5.0.0+]
 +
|-
 +
| 3 || [6.0.0+]
 +
|-
 +
| 4 || [8.0.0+]
 +
|}
 +
 
 +
= ImageTransferProcessorExConfig =
 +
This is "nn::irsensor::ImageTransferProcessorExConfig".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x8 || ExposureTime
 +
|-
 +
| 0x8 || 0x4 || LightTarget
 +
|-
 +
| 0xC || 0x4 || Gain
 +
|-
 +
| 0x10 || 0x1 || IsNegativeImageUsed
 +
|-
 +
| 0x11 || 0x7 || Reserved
 +
|-
 +
| 0x18 || 0x4 || [[#ImageTransferProcessorFormat|OrigFormat]]
 +
|-
 +
| 0x1C || 0x4 || [[#ImageTransferProcessorFormat|TrimmingFormat]]
 +
|-
 +
| 0x20 || 0x2 || TrimmingStartX
 +
|-
 +
| 0x22 || 0x2 || TrimmingStartY
 +
|-
 +
| 0x24 || 0x1 || IsExternalLightFilterEnabled
 +
|}
 +
 
 +
= PackedImageTransferProcessorExConfig =
 +
This is "nn::irsensor::PackedImageTransferProcessorExConfig".
 +
 
 +
This is converted from [[#ImageTransferProcessorExConfig]].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x8 || ExposureTime
 +
|-
 +
| 0x8 || 0x1 || LightTarget
 +
|-
 +
| 0x9 || 0x1 || Gain
 +
|-
 +
| 0xA || 0x1 || IsNegativeImageUsed
 +
|-
 +
| 0xB || 0x5 || Reserved
 +
|-
 +
| 0x10 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
 +
|-
 +
| 0x14 || 0x1 || [[#ImageTransferProcessorFormat|OrigFormat]]
 +
|-
 +
| 0x15 || 0x1 || [[#ImageTransferProcessorFormat|TrimmingFormat]]
 +
|-
 +
| 0x16 || 0x2 || TrimmingStartX
 +
|-
 +
| 0x18 || 0x2 || TrimmingStartY
 +
|-
 +
| 0x1A || 0x1 || IsExternalLightFilterEnabled
 +
|-
 +
| 0x1B || 0x5 || Reserved
 +
|}
 +
 
 +
= IrLedProcessorConfig =
 +
This is "nn::irsensor::IrLedProcessorConfig".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || LightTarget
 +
|}
 +
 
 +
= PackedIrLedProcessorConfig =
 +
This is "nn::irsensor::PackedIrLedProcessorConfig".
 +
 
 +
This is converted from [[#IrLedProcessorConfig]].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]]
 +
|-
 +
| 0x4 || 0x1 || LightTarget
 +
|-
 +
| 0x5 || 0x3 || Padding
 +
|}
 +
 
 +
= AdaptiveClusteringProcessorConfig =
 +
This is "nn::irsensor::AdaptiveClusteringProcessorConfig".
 +
 
 +
AdaptiveClusteringProcessor was added with [5.0.0+].
 +
 
 +
This is converted to [[#TeraPluginProcessorConfig]] by the user-process. [[#TeraPluginProcessorConfig]]+0x3 is zero.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#AdaptiveClusteringMode]]
 +
|-
 +
| 0x4 || 0x4 || [6.0.0+] [[#AdaptiveClusteringTargetDistance]]
 +
|}
 +
 
 +
== AdaptiveClusteringMode ==
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
|-
 +
| 0 || StaticFov
 +
|-
 +
| 1 || DynamicFov
 +
|}
 +
 
 +
Controls the mode for [[#TeraPluginProcessorConfig]] (DynamicFov -> 0x10; StaticFov -> 0x0F).
 +
 
 +
== AdaptiveClusteringTargetDistance ==
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
|-
 +
| 0 || Near
 +
|-
 +
| 1 || Middle
 +
|-
 +
| 2 || Far
 +
|}
 +
 
 +
Controls the second and third bytes for [[#TeraPluginProcessorConfig]] (Near-> 0x00, 0x00; Middle -> 0x01, 0x03; Far -> 0x01, 0x08).
 +
 
 +
= HandAnalysisConfig =
 +
This is "nn::irsensor::HandAnalysisConfig".
 +
 
 +
This is converted to [[#TeraPluginProcessorConfig]] by the user-process, which is all-zero except the mode.
 +
* pre-4.0.0: [[#TeraPluginProcessorConfig]] mode = [[#HandAnalysisMode]] - 1.
 +
* [4.0.0+]: Silhouette = 0x5, Image = 0x6, SilhouetteAndImage = 0x7, SilhouetteOnly = 0xA.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || [[#HandAnalysisMode]]
 +
|}
 +
 
 +
== HandAnalysisMode ==
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
|-
 +
| 0 || None (invalid)
 +
|-
 +
| 1 || Silhouette
 +
|-
 +
| 2 || Image
 +
|-
 +
| 3 || SilhouetteAndImage
 +
|-
 +
| 4 || [4.0.0+] SilhouetteOnly
 +
|}
 +
 
 +
= BusHandle =
 +
This is "nn::hidbus::BusHandle".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || AbstractedPadId
 +
|-
 +
| 0x4 || 0x1 || InternalIndex
 +
|-
 +
| 0x5 || 0x1 || PlayerNumber
 +
|-
 +
| 0x6 || 0x1 || BusTypeId
 +
|-
 +
| 0x7 || 0x1 || IsValid
 +
|}
 +
 
 +
= JoyPollingReceivedData =
 +
This is "nn::hidbus::JoyPollingReceivedData".
 +
 
 +
This is copied from the entries in [[#EnableJoyPollingReceiveMode|TransferMemory]] by GetJoyPollingReceivedData.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x30 || Data
 +
|-
 +
| 0x30 || 0x8 || Size of data.
 +
|-
 +
| 0x38 || 0x8 || Timestamp
 +
|}
 +
 
 +
= BusType =
 +
This is "nn::hidbus::BusType".
 +
 
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
|-
 +
| 0 || JoyLeftRail
 +
|-
 +
| 1 || JoyRightRail
 +
|-
 +
| 2 || [6.0.0+] LarkRightRail (for microphone)
 +
|}
 +
 
 +
= JoyPollingMode =
 +
This is "nn::hidbus::JoyPollingMode".
 +
 
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
|-
 +
| 0 || sdknso uses <code>GetJoyDisableSixAxisPollingDataAccessor</code> with this.
 +
|-
 +
| 1 || sdknso uses <code>GetJoyEnableSixAxisPollingDataAccessor</code> with this.
 +
|-
 +
| 2 || [6.0.0+] sdknso uses <code>GetJoyButtonOnlyPollingDataAccessor</code> with this.
 
|}
 
|}
   −
= JoyPollingMode =
+
Other values causes [[#EnableJoyPollingReceiveMode]] to assert.
This is "nn::hidbus::JoyPollingMode". This is an u32. This must be one of the below values otherwise [[#EnableJoyPollingReceiveMode]] will assert.
  −
 
  −
{| class="wikitable" border="1"
  −
!  Value
  −
!  Description
  −
|-
  −
| 0 || sdknso uses <code>GetJoyDisableSixAxisPollingDataAccessor</code> with this.
  −
|-
  −
| 1 || sdknso uses <code>GetJoyEnableSixAxisPollingDataAccessor</code> with this.
  −
|-
  −
| 2 || [6.0.0+] sdknso uses <code>GetJoyButtonOnlyPollingDataAccessor</code> with this.
  −
|}
      
= ExternalDevices =
 
= ExternalDevices =