HID services: Difference between revisions
No edit summary |
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 | === HdlsNpadAssignmentEntry === | ||
This is a 0x20-byte struct. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,047: | Line 1,049: | ||
|} | |} | ||
This is a | == HdlsStateList == | ||
This is a 0x408-byte struct. | |||
[9.0.0+] This is a 0x488-byte struct. | |||
{| 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 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 | == HdlsDeviceInfo == | ||
This is a 0x10-byte struct. | |||
{| 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 | ||
|} | |} | ||
== DeviceTypeInternal == | == DeviceTypeInternal == | ||
This is | This is "nn::hid::detail::DeviceTypeInternal". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Bits | ! Bits | ||
! Description | ! Description | ||
|- | |- | ||
| 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 | ||
|} | |} | ||
[9.0.0+] This is "nn::hidtypes::DeviceType". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Value | ! Value | ||
! [[#DeviceType|DeviceType]] | |||
! [[#UniquePadType|UniquePadType]] | |||
! Description | ! Description | ||
|- | |- | ||
| 1 || JoyRight || | | 1 || JoyRight, HandheldRight || JoyRight || Joy-Con right controller | ||
|- | |||
| 2 || JoyLeft, HandheldLeft || JoyLeft || Joy-Con left controller | |||
|- | |- | ||
| | | 3 || FullKey || FullKey || Pro Controller | ||
|- | |- | ||
| | | 4 || JoyLeft || JoyLeft || SNES left controller | ||
|- | |- | ||
| | | 5 || JoyRight || JoyRight || SNES right controller | ||
|- | |- | ||
| | | 6 || FullKey || FullKey || Gc Controller | ||
|- | |- | ||
| | | 7 || HvcLarkLeft, HandheldHvcLarkLeft || JoyLeft || Famicom left controller | ||
|- | |- | ||
| | | 8 || HvcLarkRight, HandheldHvcLarkRight || JoyRight || Famicom right controller (with microphone) | ||
|- | |- | ||
| | | 9 || NesLarkLeft, HandheldNesLarkLeft || JoyLeft || NES left controller | ||
|- | |- | ||
| | | 10 || NesLarkRight, HandheldNesLarkRight || JoyRight || NES right controller | ||
|- | |- | ||
| | | 11 || SystemExt || FullKey || Unknown | ||
|- | |- | ||
| | | 12 || Palma || System || Poké Ball Plus controller | ||
|- | |- | ||
| | | 13 || FullKey || FullKey || Unknown | ||
|- | |- | ||
| | | 14 || HandheldLeft || JoyLeft || SNES left controller in handheld mode | ||
|- | |- | ||
| | | 15 || FullKey || FullKey || Unknown | ||
|- | |- | ||
| | | 16 || FullKey || FullKey || Unknown | ||
|- | |- | ||
| | | 17 || Unknown || Unknown || Unknown | ||
|- | |- | ||
| | | 18 || HandheldRight || JoyRight || SNES right controller in handheld mode | ||
|- | |- | ||
| 19 || | | 19 || System || System || Unknown (has [[#NpadStyleTag|NpadFullKey]] style tag) | ||
|- | |- | ||
| 20 || | | 20 || System || System || Unknown (has [[#NpadStyleTag|NpadJoyDual]] style tag) | ||
|- | |- | ||
| 21 || | | 21 || System || System || Unknown (has [[#NpadStyleTag|NpadJoyDual]] style tag) | ||
|} | |} | ||
== HdlsState == | == HdlsState == | ||
This is a 0x24-byte struct. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,261: | Line 1,254: | ||
| 0x21 || 0x3 || Padding | | 0x21 || 0x3 || Padding | ||
|} | |} | ||
= 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'''. | ||
== | == GetUniquePadType == | ||
Takes an input | Takes an input u64 '''UniquePadId''' and returns an output u64 [[#UniquePadType]]. | ||
== 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 | 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 | |||
|} | |} | ||