Changes

864 bytes added ,  20:00, 17 March 2020
no edit summary
Line 1,016: Line 1,016:     
== HdlsNpadAssignment ==
 
== HdlsNpadAssignment ==
 +
This is a 0x208-byte struct.
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,027: Line 1,029:  
|}
 
|}
   −
This is a 0x208-byte struct.
+
=== HdlsNpadAssignmentEntry ===
 +
This is a 0x20-byte struct.
   −
=== HdlsNpadAssignmentEntry ===
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,047: Line 1,049:  
|}
 
|}
   −
This is a 0x20-byte struct.
+
== HdlsStateList ==
 +
This is a 0x408-byte struct.
 +
 
 +
[9.0.0+] This is a 0x488-byte struct.
   −
== HdlsStateList ==
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,060: Line 1,064:  
| 0x8 || <[[#HdlsStateListEntry]] size>*0x10 || Array of [[#HdlsStateListEntry]].
 
| 0x8 || <[[#HdlsStateListEntry]] size>*0x10 || Array of [[#HdlsStateListEntry]].
 
|}
 
|}
  −
This is a 0x408-byte struct. [9.0.0+] This is a 0x488-byte struct.
      
This contains a list of all controllers, including non-virtual controllers.
 
This contains a list of all controllers, including non-virtual controllers.
    
=== HdlsStateListEntry ===
 
=== HdlsStateListEntry ===
 +
This is a 0x40-byte struct.
 +
 +
[9.0.0+] This is a 0x48-byte struct.
 +
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,079: Line 1,085:  
|}
 
|}
   −
This is a 0x40-byte struct. [9.0.0+] This is a 0x48-byte struct.
+
== HdlsDeviceInfo ==
 +
This is a 0x10-byte struct.
   −
== HdlsDeviceInfo ==
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,097: Line 1,103:  
|}
 
|}
   −
[9.0.0+]:
+
[9.0.0+] This is a 0x14-byte struct.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,116: Line 1,123:  
| 0x10 || 0x4 || RGBA Unknown Buttons Color
 
| 0x10 || 0x4 || RGBA Unknown Buttons Color
 
|}
 
|}
  −
This is a 0x10-byte struct. [9.0.0+] This is a 0x14-byte struct.
      
== DeviceTypeInternal ==
 
== DeviceTypeInternal ==
This is an u32 "nn::hid::detail::DeviceTypeInternal".
+
This is "nn::hid::detail::DeviceTypeInternal".
 
  −
[9.0.0+] This an u8 "nn::hidtypes::DeviceType".
  −
 
  −
Bits for "nn::hid::detail::DeviceTypeInternal", only 1 bit can be set:
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
!  Bits
 
!  Bits
 
!  Description
 
!  Description
!  Notes
   
|-
 
|-
 
| 0-7
 
| 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.
 
| 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
 
| 8-10
|
   
| Pro Controller
 
| Pro Controller
 
|-
 
|-
 
| 11
 
| 11
|
   
| Famicom left controller
 
| Famicom left controller
 
|-
 
|-
 
| 12
 
| 12
|
   
| Famicom right controller (with microphone)
 
| Famicom right controller (with microphone)
 
|-
 
|-
 
| 13
 
| 13
|
   
| NES left controller
 
| NES left controller
 
|-
 
|-
 
| 14
 
| 14
|
   
| NES right controller
 
| NES right controller
 
|-
 
|-
 
| 15-16
 
| 15-16
|
   
| Invalid
 
| Invalid
 
|-
 
|-
 
| 17
 
| 17
|
   
| Generic external controller
 
| Generic external controller
 
|-
 
|-
 
| 18-20
 
| 18-20
|
   
| Invalid
 
| Invalid
 
|-
 
|-
 
| 21-23
 
| 21-23
|
   
| Generic controller
 
| Generic controller
 
|}
 
|}
   −
u8 values for "nn::hidtypes::DeviceType", must match one of the these values:
+
[9.0.0+] This is "nn::hidtypes::DeviceType".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
!  Value
 
!  Value
 +
!  [[#DeviceType|DeviceType]]
 +
!  [[#UniquePadType|UniquePadType]]
 
!  Description
 
!  Description
!  Notes
   
|-
 
|-
| 1 || JoyRight ||  
+
| 1 || JoyRight, HandheldRight || JoyRight || Joy-Con right controller
 +
|-
 +
| 2 || JoyLeft, HandheldLeft || JoyLeft || Joy-Con left controller
 
|-
 
|-
| 2 || JoyLeft ||  
+
| 3 || FullKey || FullKey || Pro Controller
 
|-
 
|-
| 3 || FullKey ||  
+
| 4 || JoyLeft || JoyLeft || SNES left controller
 
|-
 
|-
| 4 || JoyLeft ||  
+
| 5 || JoyRight || JoyRight || SNES right controller
 
|-
 
|-
| 5 || JoyRight ||  
+
| 6 || FullKey || FullKey || Gc Controller
 
|-
 
|-
| 6 || FullKey ||  
+
| 7 || HvcLarkLeft, HandheldHvcLarkLeft || JoyLeft || Famicom left controller
 
|-
 
|-
| 7 || LarkLeft (HVC) ||
+
| 8 || HvcLarkRight, HandheldHvcLarkRight || JoyRight || Famicom right controller (with microphone)
 
|-
 
|-
| 8 || LarkRight (HVC) ||  
+
| 9 || NesLarkLeft, HandheldNesLarkLeft || JoyLeft || NES left controller
 
|-
 
|-
| 9 || LarkLeft (NES) ||  
+
| 10 || NesLarkRight, HandheldNesLarkRight || JoyRight || NES right controller
 
|-
 
|-
| 10 || LarkRight (NES) ||  
+
| 11 || SystemExt || FullKey || Unknown
 
|-
 
|-
| 11 || Invalid ||  
+
| 12 || Palma || System || Poké Ball Plus controller
 
|-
 
|-
| 12 || Palma ||  
+
| 13 || FullKey || FullKey || Unknown
 
|-
 
|-
| 13 || FullKey ||  
+
| 14 || HandheldLeft || JoyLeft || SNES left controller in handheld mode
 
|-
 
|-
| 14 || Invalid ||  
+
| 15 || FullKey || FullKey || Unknown
 
|-
 
|-
| 15 || FullKey ||  
+
| 16 || FullKey || FullKey || Unknown
 
|-
 
|-
| 16 || Controller is missing in sharedmem.
+
| 17 || Unknown || Unknown || Unknown
 
|-
 
|-
| 17-18 || Invalid ||  
+
| 18 || HandheldRight || JoyRight || SNES right controller in handheld mode
 
|-
 
|-
| 19 || [[#DeviceType]] System with [[#NpadStyleTag]] |= NpadFullKey
+
| 19 || System || System || Unknown (has [[#NpadStyleTag|NpadFullKey]] style tag)
 
|-
 
|-
| 20 || [[#DeviceType]] System with [[#NpadStyleTag]] |= NpadJoyDual
+
| 20 || System || System || Unknown (has [[#NpadStyleTag|NpadJoyDual]] style tag)
 
|-
 
|-
| 21 || [[#DeviceType]] System with [[#NpadStyleTag]] |= NpadJoyDual
+
| 21 || System || System || Unknown (has [[#NpadStyleTag|NpadJoyDual]] style tag)
 
|}
 
|}
    
== HdlsState ==
 
== HdlsState ==
 +
This is a 0x24-byte struct.
   −
Pre-9.0.0:
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,261: Line 1,254:  
| 0x21 || 0x3 || Padding
 
| 0x21 || 0x3 || Padding
 
|}
 
|}
  −
This is a 0x24-byte struct.
      
= hid:sys =
 
= hid:sys =
Line 1,407: Line 1,398:  
| 806 || [3.0.0+] DisconnectUniquePad
 
| 806 || [3.0.0+] DisconnectUniquePad
 
|-
 
|-
| 807 || [5.0.0+] GetUniquePadType
+
| 807 || [5.0.0+] [[#GetUniquePadType]]
 
|-
 
|-
 
| 808 || [5.0.0+] GetUniquePadInterface
 
| 808 || [5.0.0+] GetUniquePadInterface
Line 1,534: Line 1,525:  
The output buffer contains an array of u64 '''UniquePadId'''.
 
The output buffer contains an array of u64 '''UniquePadId'''.
   −
== NotifyInputDetector ==
+
== GetUniquePadType ==
Takes an input u32 bitmask InputSourceId, no output.
+
Takes an input u64 '''UniquePadId''' and returns an output u64 [[#UniquePadType]].
 
  −
This is the only hid:sys command used by USB-sysmodule (with value 0x40).
      
== SetNotificationLedPattern ==
 
== SetNotificationLedPattern ==
Line 1,553: Line 1,542:  
== PrepareHidsForNotificationWake ==
 
== PrepareHidsForNotificationWake ==
 
Takes a type-0x9 input buffer containing an array of u64 '''UniquePadId''', no output.
 
Takes a type-0x9 input buffer containing an array of u64 '''UniquePadId''', no output.
 +
 +
== NotifyInputDetector ==
 +
Takes an input u32 bitmask InputSourceId, no output.
 +
 +
This is the only hid:sys command used by USB-sysmodule (with value 0x40).
    
== GetHidbusSystemServiceObject ==
 
== GetHidbusSystemServiceObject ==
Line 1,751: Line 1,745:     
== DeviceType ==
 
== DeviceType ==
This is a bitmask describing the controller device type.
+
This is "nn::hid::system::DeviceType".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 1,817: Line 1,811:  
| System
 
| System
 
| Generic controller.
 
| Generic controller.
 +
|}
 +
 +
== UniquePadType ==
 +
This is "nn::hid::system::UniquePadType".
 +
 +
{| class="wikitable" border="1"
 +
!  Value
 +
!  Description
 +
|-
 +
| 0x0 || System
 +
|-
 +
| 0x1 || FullKey
 +
|-
 +
| 0x2 || JoyRight
 +
|-
 +
| 0x3 || JoyLeft
 +
|-
 +
| 0x4 || Unknown
 
|}
 
|}