Changes

Jump to navigation Jump to search
6,888 bytes added ,  18:35, 18 November 2020
no edit summary
Line 1: Line 1:  
HID shared memory is a 0x40000 byte read-only segment of memory shared between applications for input. The segment contains structures for most if not all input methods available to applications.
 
HID shared memory is a 0x40000 byte read-only segment of memory shared between applications for input. The segment contains structures for most if not all input methods available to applications.
   −
In sdknso this is "nn::hid::detail::SharedMemoryFormat".
+
= SharedMemoryFormat =
 +
This is "nn::hid::detail::SharedMemoryFormat".
   −
= Memory Map =
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 12: Line 12:  
| 0x0
 
| 0x0
 
| 0x400
 
| 0x400
| [[#DebugPad]]
+
| [[#DebugPadSharedMemoryFormat|DebugPad]]
 
|-
 
|-
 
| 0x400
 
| 0x400
 
| 0x3000
 
| 0x3000
| [[#TouchScreen]]
+
| [[#TouchScreenSharedMemoryFormat|TouchScreen]]
 
|-
 
|-
 
| 0x3400
 
| 0x3400
 
| 0x400
 
| 0x400
| [[#Mouse]]
+
| [[#MouseSharedMemoryFormat|Mouse]]
 
|-
 
|-
 
| 0x3800
 
| 0x3800
 
| 0x400
 
| 0x400
| [[#Keyboard]]
+
| [[#KeyboardSharedMemoryFormat|Keyboard]]
 
|-
 
|-
 
| 0x3C00
 
| 0x3C00
| 0x1000 (0x400 * 0x04)
+
| 0x1000
| [1.0.0-9.2.0] [[#BasicXpad]]
+
| [1.0.0-9.2.0] [[#BasicXpadSharedMemoryFormat|BasicXpad]]
 
|-
 
|-
 
| 0x3C00
 
| 0x3C00
 
|  
 
|  
| [10.0.0+] Digitizer
+
| [10.0.0+] [[#DigitizerSharedMemoryFormat|Digitizer]]
 
|-
 
|-
 
| 0x4C00
 
| 0x4C00
 
| 0x200
 
| 0x200
| [[#HomeButton]]
+
| [[#HomeButtonSharedMemoryFormat|HomeButton]]
 
|-
 
|-
 
| 0x4E00
 
| 0x4E00
 
| 0x200
 
| 0x200
| [[#SleepButton]]
+
| [[#SleepButtonSharedMemoryFormat|SleepButton]]
 
|-
 
|-
 
| 0x5000
 
| 0x5000
 
| 0x200
 
| 0x200
| [[#CaptureButton]]
+
| [[#CaptureButtonSharedMemoryFormat|CaptureButton]]
 
|-
 
|-
 
| 0x5200
 
| 0x5200
 
| 0x800 (0x80 * 0x10)
 
| 0x800 (0x80 * 0x10)
| [[#InputDetector]]
+
| [[#InputDetectorSharedMemoryFormat|InputDetector]]
 
|-
 
|-
 
| 0x5A00
 
| 0x5A00
 
| 0x4000 (0x400 * 0x10)
 
| 0x4000 (0x400 * 0x10)
| [1.0.0-4.1.0] [[#UniquePad]]
+
| [1.0.0-4.1.0] [[#UniquePadSharedMemoryFormat|UniquePad]]
 
|-
 
|-
 
| 0x9A00
 
| 0x9A00
 
| 0x32000 (0x5000 * 0x0A)
 
| 0x32000 (0x5000 * 0x0A)
| [[#Npad]]
+
| [[#NpadSharedMemoryFormat|Npad]]
 
|-
 
|-
 
| 0x3BA00
 
| 0x3BA00
 
| 0x800
 
| 0x800
| [[#Gesture]]
+
| [[#GestureSharedMemoryFormat|Gesture]]
 
|-
 
|-
 
| 0x3C200
 
| 0x3C200
 
| 0x20
 
| 0x20
| [5.0.0+] [[#ConsoleSixAxisSensor]]
+
| [5.0.0+] [[#ConsoleSixAxisSensorSharedMemoryFormat|ConsoleSixAxisSensor]]
 
|}
 
|}
   −
== DebugPad ==
+
== DebugPadSharedMemoryFormat ==
 +
This is "nn::hid::detail::DebugPadSharedMemoryFormat".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 75: Line 77:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x20
+
| 0x2C8
| [[#DebugPadHeader]]
+
| [[#DebugPadLifo]]
|-
  −
| 0x20
  −
| 0x28 * 17
  −
| Array of [[#DebugPadState]]
   
|}
 
|}
   −
=== DebugPadHeader ===
+
=== DebugPadLifo ===
 +
This is "nn::hid::detail::DebugPadLifo". This is a RingLifo object.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 92: Line 92:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in ticks
+
| RingLifoVptr
 
|-
 
|-
 
| 0x8
 
| 0x8
 
| 0x8
 
| 0x8
| Number of Entries (always 17)
+
| BufferCount
 
|-
 
|-
 
| 0x10
 
| 0x10
 
| 0x8
 
| 0x8
| Latest Entry Index
+
| Tail
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| 0x8
 
| 0x8
| Maximum Entry Index (always 16)
+
| Count
 +
|-
 +
| 0x20
 +
| 0x28 * 17
 +
| Array of [[#DebugPadStateAtomicStorage]]
 
|}
 
|}
   −
=== DebugPadState ===
+
==== DebugPadStateAtomicStorage ====
 +
This is "nn::hid::detail::DebugPadStateAtomicStorage".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 116: Line 122:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in samples (global)
+
| SamplingNumber
 
|-
 
|-
 
| 0x8
 
| 0x8
 
| 0x20
 
| 0x20
|  
+
| [[#DebugPadState]]
 
|}
 
|}
   −
== TouchScreen ==
+
===== DebugPadState =====
 +
This is "nn::hid::DebugPadState".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 131: Line 139:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x20
+
| 0x8
| [[#TouchScreenHeader]]
+
| SamplingNumber
 
|-
 
|-
| 0x20
+
| 0x8
| 0x298 * 17
+
| 0x4
| Array of [[#TouchScreenState]]
+
| [[#DebugPadAttributeSet|Attributes]]
|}
  −
 
  −
=== TouchScreenHeader ===
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset
+
| 0xC
! Size
+
| 0x4
! Description
+
| [[#DebugPadButtonSet|Buttons]]
|-
  −
| 0x0
  −
| 0x8
  −
| Timestamp in ticks
  −
|-
  −
| 0x8
  −
| 0x8
  −
| Number of Entries (always 17)
   
|-
 
|-
 
| 0x10
 
| 0x10
 
| 0x8
 
| 0x8
| Latest Entry Index
+
| [[#AnalogStickState|AnalogStickR]]
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| 0x8
 
| 0x8
| Maximum Entry Index (always 16)
+
| [[#AnalogStickState|AnalogStickL]]
 
|}
 
|}
   −
=== TouchScreenState ===
+
== TouchScreenSharedMemoryFormat ==
 +
This is "nn::hid::detail::TouchScreenSharedMemoryFormat".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 171: Line 169:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x8
+
| 0x2C38
| Timestamp in samples (global)
+
| [[#TouchScreenLifo]]
 +
|}
 +
 
 +
=== TouchScreenLifo ===
 +
This is "nn::hid::detail::TouchScreenLifo". This is a RingLifo object.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| RingLifoVptr
 
|-
 
|-
 
| 0x8
 
| 0x8
| 0x8
+
| 0x8
| Timestamp in samples
+
| BufferCount
 
|-
 
|-
 
| 0x10
 
| 0x10
 
| 0x8
 
| 0x8
| Touch count
+
| Tail
 
|-
 
|-
 
| 0x18
 
| 0x18
| 0x28 * 16
+
| 0x8
| [[#TouchScreenStateData]]
+
| Count
 +
|-
 +
| 0x20
 +
| 0x298 * 17
 +
| Array of [[#TouchScreenStateAtomicStorage]]
 
|}
 
|}
   −
==== TouchScreenStateData ====
+
==== TouchScreenStateAtomicStorage ====
 +
This is "nn::hid::detail::TouchScreenStateAtomicStorage".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 196: Line 214:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in samples
+
| SamplingNumber
 
|-
 
|-
 
| 0x8
 
| 0x8
| 0x4
+
| 0x290
| Padding
+
| [[#TouchScreenState]]
 +
|}
 +
 
 +
===== TouchScreenState =====
 +
This is "nn::hid::detail::TouchScreenState".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0xC
+
! Offset
| 0x4
+
! Size
| Touch Index
+
! Description
 
|-
 
|-
| 0x10
+
| 0x0
| 0x4
+
| 0x8
| Touch X
+
| SamplingNumber
 
|-
 
|-
| 0x14
+
| 0x8
 
| 0x4
 
| 0x4
| Touch Y
+
| Count
 
|-
 
|-
| 0x18
+
| 0xC
 
| 0x4
 
| 0x4
| Touch Diameter X
+
| Reserved
 
|-
 
|-
| 0x1C
+
| 0x10
| 0x4
+
| 0x28 * 16
| Touch Diameter Y
+
| [[#TouchState|Touches]]
|-
  −
| 0x20
  −
| 0x4
  −
| Angle
  −
|-
  −
| 0x24
  −
| 0x4
  −
| Padding
   
|}
 
|}
   −
== Mouse ==
+
====== TouchState ======
{| class="wikitable" border="1"
+
This is "nn::hid::TouchState".
|-
  −
! Offset
  −
! Size
  −
! Description
  −
|-
  −
| 0x0
  −
| 0x20
  −
| [[#MouseHeader]]
  −
|-
  −
| 0x20
  −
| 0x30 * 17
  −
| Array of [[#MouseState]]
  −
|}
     −
=== MouseHeader ===
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 256: Line 258:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in ticks
+
| DeltaTime
 
|-
 
|-
 
| 0x8
 
| 0x8
| 0x8
+
| 0x4
| Number of Entries (always 17)
+
| [[#TouchAttributeSet|Attributes]]
 +
|-
 +
| 0xC
 +
| 0x4
 +
| FingerId
 
|-
 
|-
 
| 0x10
 
| 0x10
| 0x8
+
| 0x4
| Latest Entry Index
+
| X
 +
|-
 +
| 0x14
 +
| 0x4
 +
| Y
 
|-
 
|-
 
| 0x18
 
| 0x18
| 0x8
+
| 0x4
| Maximum Entry Index (always 16)
+
| DiameterX
|}
  −
 
  −
=== MouseState ===
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Offset
+
| 0x1C
! Size
+
| 0x4
! Description
+
| DiameterY
|-
  −
| 0x0
  −
| 0x8
  −
| Timestamp in samples (global)
  −
|-
  −
| 0x8
  −
| 0x8
  −
| Timestamp in samples
  −
|-
  −
| 0x10
  −
| 0x4
  −
| Mouse X
  −
|-
  −
| 0x14
  −
| 0x4
  −
| Mouse Y
  −
|-
  −
| 0x18
  −
| 0x4
  −
| Mouse X Change
  −
|-
  −
| 0x1C
  −
| 0x4
  −
| Mouse Y Change
   
|-
 
|-
 
| 0x20
 
| 0x20
 
| 0x4
 
| 0x4
| Scroll Change Y
+
| RotationAngle
 
|-
 
|-
 
| 0x24
 
| 0x24
 
| 0x4
 
| 0x4
| Scroll Change X
+
| Reserved
|-
  −
| 0x28
  −
| 0x8
  −
| Mouse Buttons
   
|}
 
|}
   −
== Keyboard ==
+
== MouseSharedMemoryFormat ==
 +
This is "nn::hid::detail::MouseSharedMemoryFormat".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 322: Line 302:  
! Description
 
! Description
 
|-
 
|-
| 0x0
+
| 0x0
| 0x20
+
| 0x350
| [[#KeyboardHeader]]
+
| [[#MouseLifo]]
|-
  −
| 0x20
  −
| 0x38 * 17
  −
| Array of [[#KeyboardState]]
   
|}
 
|}
   −
=== KeyboardHeader ===
+
=== MouseLifo ===
 +
This is "nn::hid::detail::MouseLifo". This is a RingLifo object.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 340: Line 318:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in ticks
+
| RingLifoVptr
 
|-
 
|-
 
| 0x8
 
| 0x8
 
| 0x8
 
| 0x8
| Number of Entries (always 17)
+
| BufferCount
 
|-
 
|-
 
| 0x10
 
| 0x10
 
| 0x8
 
| 0x8
| Latest Entry Index
+
| Tail
 
|-
 
|-
| 0x18
+
| 0x18
 
| 0x8
 
| 0x8
| Maximum Entry Index (always 16)
+
| Count
 +
|-
 +
| 0x20
 +
| 0x30 * 17
 +
| Array of [[#MouseStateAtomicStorage]]
 
|}
 
|}
   −
=== KeyboardState ===
+
==== MouseStateAtomicStorage ====
 +
This is "nn::hid::detail::MouseStateAtomicStorage".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 364: Line 348:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in samples (global)
+
| SamplingNumber
 
|-
 
|-
 
| 0x8
 
| 0x8
| 0x8
+
| 0x28
| Timestamp in samples
+
| [[#MouseState]]
|-
  −
| 0x10
  −
| 0x8
  −
| Modifier Mask
  −
|-
  −
| 0x18
  −
| 0x20
  −
| Keys Down, each key gets one bit based on the HID keyboard scan code (F1 is 0x3A, bit 0x3A is set)
   
|}
 
|}
   −
== BasicXpad ==
+
===== MouseState =====
 +
This is "nn::hid::detail::MouseState".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 387: Line 365:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x20
+
| 0x8
| [[#BasicXpadHeader]]
+
| SamplingNumber
 
|-
 
|-
| 0x20
+
| 0x8
| 0x28 * 17
+
| 0x4
| Array of [[#BasicXpadState]]
+
| X
 +
|-
 +
| 0xC
 +
| 0x4
 +
| Y
 +
|-
 +
| 0x10
 +
| 0x4
 +
| DeltaX
 +
|-
 +
| 0x14
 +
| 0x4
 +
| DeltaY
 +
|-
 +
| 0x18
 +
| 0x4
 +
| WheelDeltaX
 +
|-
 +
| 0x1C
 +
| 0x4
 +
| WheelDeltaY
 +
|-
 +
| 0x20
 +
| 0x4
 +
| [[#MouseButtonSet|Buttons]]
 +
|-
 +
| 0x24
 +
| 0x4
 +
| [[#MouseAttributeSet|Attributes]]
 
|}
 
|}
   −
=== BasicXpadHeader ===
+
== KeyboardSharedMemoryFormat ==
 +
This is "nn::hid::detail::KeyboardSharedMemoryFormat".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x3D8
 +
| [[#KeyboardLifo]]
 +
|}
 +
 
 +
=== KeyboardLifo ===
 +
This is "nn::hid::detail::KeyboardLifo". This is a RingLifo object.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 404: Line 426:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in ticks
+
| RingLifoVptr
 
|-
 
|-
 
| 0x8
 
| 0x8
 
| 0x8
 
| 0x8
| Number of Entries (always 17)
+
| BufferCount
 
|-
 
|-
 
| 0x10
 
| 0x10
 
| 0x8
 
| 0x8
| Latest Entry Index
+
| Tail
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| 0x8
 
| 0x8
| Maximum Entry Index (always 16)
+
| Count
 +
|-
 +
| 0x20
 +
| 0x38 * 17
 +
| Array of [[#KeyboardStateAtomicStorage]]
 
|}
 
|}
   −
=== BasicXpadState ===
+
==== KeyboardStateAtomicStorage ====
 +
This is "nn::hid::detail::KeyboardStateAtomicStorage".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 428: Line 456:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in samples (global)
+
| SamplingNumber
 
|-
 
|-
 
| 0x8
 
| 0x8
| 0x20
+
| 0x30
|  
+
| [[#KeyboardState]]
 
|}
 
|}
   −
== HomeButton ==
+
===== KeyboardState =====
 +
This is "nn::hid::detail::KeyboardState".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 443: Line 473:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x20
+
| 0x8
| [[#HomeButtonHeader]]
+
| SamplingNumber
 
|-
 
|-
 +
| 0x8
 +
| 0x8
 +
| [[#KeyboardModifierSet|Modifiers]]
 +
|-
 +
| 0x10
 
| 0x20
 
| 0x20
| 0x18 * 17
+
| [[#KeyboardKeySet|Keys]]
| Array of [[#HomeButtonState]]
   
|}
 
|}
   −
=== HomeButtonHeader ===
+
== BasicXpadSharedMemoryFormat ==
 +
This is "nn::hid::detail::BasicXpadSharedMemoryFormat".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 459: Line 495:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x8
+
| 0x400 * 4
| Timestamp in ticks
+
| Array of [[#BasicXpadSharedMemoryEntry]]
 +
|}
 +
 
 +
=== BasicXpadSharedMemoryEntry ===
 +
This is "nn::hid::detail::BasicXpadSharedMemoryEntry".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 0x8
+
! Offset
| 0x8
+
! Size
| Number of Entries (always 17)
+
! Description
 
|-
 
|-
| 0x10
+
| 0x0
| 0x8
+
| 0x2C8
| Latest Entry Index
+
| [[#BasicXpadLifo]]
|-
  −
| 0x18
  −
| 0x8
  −
| Maximum Entry Index (always 16)
   
|}
 
|}
   −
=== HomeButtonState ===
+
==== BasicXpadLifo ====
 +
This is "nn::hid::detail::BasicXpadLifo". This is a RingLifo object.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 484: Line 524:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in samples (global)
+
| RingLifoVptr
 
|-
 
|-
 
| 0x8
 
| 0x8
 +
| 0x8
 +
| BufferCount
 +
|-
 
| 0x10
 
| 0x10
|  
+
| 0x8
 +
| Tail
 +
|-
 +
| 0x18
 +
| 0x8
 +
| Count
 +
|-
 +
| 0x20
 +
| 0x28 * 17
 +
| Array of [[#BasicXpadStateAtomicStorage]]
 
|}
 
|}
   −
== SleepButton ==
+
===== BasicXpadStateAtomicStorage =====
 +
This is "nn::hid::detail::BasicXpadStateAtomicStorage".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 499: Line 553:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x20
+
| 0x8
| [[#SleepButtonHeader]]
+
| SamplingNumber
 
|-
 
|-
 +
| 0x8
 
| 0x20
 
| 0x20
| 0x18 * 17
+
| [[#BasicXpadState]]
| Array of [[#SleepButtonState]]
   
|}
 
|}
   −
=== SleepButtonHeader ===
+
====== BasicXpadState ======
 +
This is "nn::hid::detail::BasicXpadState".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 516: Line 572:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in ticks
+
| SamplingNumber
 
|-
 
|-
 
| 0x8
 
| 0x8
| 0x8
+
| 0x4
| Number of Entries (always 17)
+
| [[#BasicXpadAttributeSet|Attributes]]
 +
|-
 +
| 0xC
 +
| 0x4
 +
| [[#BasicXpadButtonSet|Buttons]]
 
|-
 
|-
 
| 0x10
 
| 0x10
 
| 0x8
 
| 0x8
| Latest Entry Index
+
| [[#AnalogStickState|AnalogStickL]]
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| 0x8
 
| 0x8
| Maximum Entry Index (always 16)
+
| [[#AnalogStickState|AnalogStickR]]
 
|}
 
|}
   −
=== SleepButtonState ===
+
== HomeButtonSharedMemoryFormat ==
 +
This is "nn::hid::detail::HomeButtonSharedMemoryFormat".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 539: Line 601:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x8
+
| 0x1B8
| Timestamp in samples (global)
+
| [[#HomeButtonLifo]]
|-
  −
| 0x8
  −
| 0x10
  −
|  
   
|}
 
|}
   −
== CaptureButton ==
+
=== HomeButtonLifo ===
{| class="wikitable" border="1"
+
This is "nn::hid::detail::HomeButtonLifo". This is a RingLifo object.
|-
  −
! Offset
  −
! Size
  −
! Description
  −
|-
  −
| 0x0
  −
| 0x20
  −
| [[#CaptureButtonHeader]]
  −
|-
  −
| 0x20
  −
| 0x18 * 17
  −
| Array of [[#CaptureButtonState]]
  −
|}
     −
=== CaptureButtonHeader ===
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 572: Line 616:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in ticks
+
| RingLifoVptr
 
|-
 
|-
 
| 0x8
 
| 0x8
 
| 0x8
 
| 0x8
| Number of Entries (always 17)
+
| BufferCount
 
|-
 
|-
 
| 0x10
 
| 0x10
 
| 0x8
 
| 0x8
| Latest Entry Index
+
| Tail
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| 0x8
 
| 0x8
| Maximum Entry Index (always 16)
+
| Count
 +
|-
 +
| 0x20
 +
| 0x18 * 17
 +
| Array of [[#HomeButtonStateAtomicStorage]]
 
|}
 
|}
   −
=== CaptureButtonState ===
+
==== HomeButtonStateAtomicStorage ====
 +
This is "nn::hid::detail::HomeButtonStateAtomicStorage".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 596: Line 646:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in samples (global)
+
| SamplingNumber
 
|-
 
|-
 
| 0x8
 
| 0x8
 
| 0x10
 
| 0x10
|  
+
| [[#HomeButtonState]]
 
|}
 
|}
   −
== InputDetector ==
+
===== HomeButtonState =====
 +
This is "nn::hid::system::HomeButtonState".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 611: Line 663:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x20
+
| 0x8
| [[#InputDetectorHeader]]
+
| SamplingNumber
 
|-
 
|-
| 0x20
+
| 0x8
| 0x18 * 2
+
| 0x8
| Array of [[#InputDetectorState]]
+
| [[#HomeButtonSet|Buttons]]
 
|}
 
|}
   −
=== InputDetectorHeader ===
+
== SleepButtonSharedMemoryFormat ==
 +
This is "nn::hid::detail::SleepButtonSharedMemoryFormat".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 627: Line 681:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x8
+
| 0x1B8
| Timestamp in ticks
+
| [[#SleepButtonLifo]]
|-
  −
| 0x8
  −
| 0x8
  −
| Number of Entries (always 17)
  −
|-
  −
| 0x10
  −
| 0x8
  −
| Latest Entry Index
  −
|-
  −
| 0x18
  −
| 0x8
  −
| Maximum Entry Index (always 16)
   
|}
 
|}
   −
=== InputDetectorState ===
+
=== SleepButtonLifo ===
 +
This is "nn::hid::detail::SleepButtonLifo". This is a RingLifo object.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 652: Line 696:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in samples (global)
+
| RingLifoVptr
 
|-
 
|-
 
| 0x8
 
| 0x8
 +
| 0x8
 +
| BufferCount
 +
|-
 
| 0x10
 
| 0x10
|  
+
| 0x8
 +
| Tail
 +
|-
 +
| 0x18
 +
| 0x8
 +
| Count
 +
|-
 +
| 0x20
 +
| 0x18 * 17
 +
| Array of [[#SleepButtonStateAtomicStorage]]
 
|}
 
|}
   −
== UniquePad ==
+
==== SleepButtonStateAtomicStorage ====
This section contains a series of 16 structures 0x400 bytes large.
+
This is "nn::hid::detail::SleepButtonStateAtomicStorage".
 
  −
[5.0.0+] This section has been removed from SharedMemoryFormat. [[#UniquePad]] is now a specialization of [[#Npad]].
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 671: Line 725:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x80
+
| 0x8
| [[#UniquePadConfig]]
+
| SamplingNumber
 
|-
 
|-
| 0x80
+
| 0x8
| 0x70 * 2
+
| 0x10
| Array of [[#AnalogStickCalibration]]
+
| [[#SleepButtonState]]
 
|}
 
|}
   −
=== UniquePadConfig ===
+
===== SleepButtonState =====
 +
This is "nn::hid::system::SleepButtonState".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 687: Line 743:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x20
+
| 0x8
| [[#UniquePadConfigHeader]]
+
| SamplingNumber
 
|-
 
|-
| 0x20
+
| 0x8
| 0x30 * 2
+
| 0x8
| Array of [[#UniquePadConfigState]]
+
| [[#SleepButtonSet|Buttons]]
 
|}
 
|}
   −
==== UniquePadConfigHeader ====
+
== CaptureButtonSharedMemoryFormat ==
 +
This is "nn::hid::detail::CaptureButtonSharedMemoryFormat".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x1B8
 +
| [[#CaptureButtonLifo]]
 +
|}
 +
 
 +
=== CaptureButtonLifo ===
 +
This is "nn::hid::detail::CaptureButtonLifo". This is a RingLifo object.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 704: Line 776:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in ticks
+
| RingLifoVptr
 
|-
 
|-
 
| 0x8
 
| 0x8
 
| 0x8
 
| 0x8
| Number of Entries (always 17)
+
| BufferCount
 
|-
 
|-
 
| 0x10
 
| 0x10
 
| 0x8
 
| 0x8
| Latest Entry Index
+
| Tail
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| 0x8
 
| 0x8
| Maximum Entry Index (always 16)
+
| Count
 +
|-
 +
| 0x20
 +
| 0x18 * 17
 +
| Array of [[#CaptureButtonStateAtomicStorage]]
 
|}
 
|}
   −
==== UniquePadConfigState ====
+
==== CaptureButtonStateAtomicStorage ====
 +
This is "nn::hid::detail::CaptureButtonStateAtomicStorage".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 728: Line 806:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in samples (global)
+
| SamplingNumber
 
|-
 
|-
 
| 0x8
 
| 0x8
| 0x8
  −
|
  −
|-
   
| 0x10
 
| 0x10
| 0x20
+
| [[#CaptureButtonState]]
| Controller Serial
   
|}
 
|}
   −
=== AnalogStickCalibration ===
+
===== CaptureButtonState =====
 +
This is "nn::hid::system::CaptureButtonState".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 747: Line 823:  
|-
 
|-
 
| 0x0
 
| 0x0
| 0x20
+
| 0x8
| [[#AnalogStickCalibrationHeader]]
+
| SamplingNumber
|-
+
|-
| 0x20
+
| 0x8
| 0x28 * 2
+
| 0x8
| Array of [[#AnalogStickCalibrationState]]
+
| [[#CaptureButtonSet|Buttons]]
|}
+
|}
 
+
 
==== AnalogStickCalibrationHeader ====
+
== InputDetectorSharedMemoryFormat ==
{| class="wikitable" border="1"
+
This is "nn::hid::detail::InputDetectorSharedMemoryFormat".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x80 * 16
 +
| Array of [[#InputDetectorSharedMemoryEntry]]
 +
|}
 +
 
 +
=== InputDetectorSharedMemoryEntry ===
 +
This is "nn::hid::detail::InputDetectorSharedMemoryEntry".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x50
 +
| [[#InputDetectorLifo]]
 +
|}
 +
 
 +
==== InputDetectorLifo ====
 +
This is "nn::hid::detail::InputDetectorLifo". This is a RingLifo object.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| RingLifoVptr
 +
|-
 +
| 0x8
 +
| 0x8
 +
| BufferCount
 +
|-
 +
| 0x10
 +
| 0x8
 +
| Tail
 +
|-
 +
| 0x18
 +
| 0x8
 +
| Count
 +
|-
 +
| 0x20
 +
| 0x18 * 2
 +
| Array of [[#InputDetectorStateAtomicStorage]]
 +
|}
 +
 
 +
===== InputDetectorStateAtomicStorage =====
 +
This is "nn::hid::detail::InputDetectorStateAtomicStorage".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| SamplingNumber
 +
|-
 +
| 0x8
 +
| 0x10
 +
| [[#InputDetectorState]]
 +
|}
 +
 
 +
====== InputDetectorState ======
 +
This is "nn::hid::detail::InputDetectorState".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| InputSourceState
 +
|-
 +
| 0x8
 +
| 0x8
 +
| SamplingNumber
 +
|}
 +
 
 +
== UniquePadSharedMemoryFormat ==
 +
This is "nn::hid::detail::UniquePadSharedMemoryFormat".
 +
 
 +
[5.0.0+] This section has been removed from [[#SharedMemoryFormat]]. [[#UniquePadSharedMemoryFormat]] is now a specialization of [[#NpadSharedMemoryFormat]].
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x400 * 16
 +
| Array of [[#UniquePadSharedMemoryEntry]]
 +
|}
 +
 
 +
=== UniquePadSharedMemoryEntry ===
 +
This is "nn::hid::detail::UniquePadSharedMemoryEntry".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x1E0
 +
| [[#UniquePadLifo]]
 +
|}
 +
 
 +
==== UniquePadLifo ====
 +
This is "nn::hid::detail::UniquePadLifo". This is a RingLifo object.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x80
 +
| [[#UniquePadConfigLifo]]
 +
|-
 +
| 0x80
 +
| 0x70 * 2
 +
| Array of [[#AnalogStickCalibrationStateImplLifo]]
 +
|-
 +
| 0x160
 +
| 0x40
 +
| [[#SixAxisSensorUserCalibrationStateLifo]]
 +
|-
 +
| 0x1A0
 +
| 0x8
 +
| UniquePadConfigMutex
 +
|}
 +
 
 +
===== UniquePadConfigLifo =====
 +
This is "nn::hid::detail::UniquePadConfigLifo". This is a RingLifo object.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| RingLifoVptr
 +
|-
 +
| 0x8
 +
| 0x8
 +
| BufferCount
 +
|-
 +
| 0x10
 +
| 0x8
 +
| Tail
 +
|-
 +
| 0x18
 +
| 0x8
 +
| Count
 +
|-
 +
| 0x20
 +
| 0x30 * 2
 +
| Array of [[#UniquePadConfigAtomicStorage]]
 +
|}
 +
 
 +
====== UniquePadConfigAtomicStorage ======
 +
This is "nn::hid::detail::UniquePadConfigAtomicStorage".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| SamplingNumber
 +
|-
 +
| 0x8
 +
| 0x28
 +
| [[#UniquePadConfig]]
 +
|}
 +
 
 +
======= UniquePadConfig =======
 +
This is "nn::hid::detail::UniquePadConfig".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| [[#UniquePadType|Type]]
 +
|-
 +
| 0x4
 +
| 0x4
 +
| [[#UniquePadInterface|Interface]]
 +
|-
 +
| 0x8
 +
| 0x10
 +
| [[#UniquePadSerialNumber|SerialNumber]]
 +
|-
 +
| 0x18
 +
| 0x4
 +
| ControllerNumber
 +
|-
 +
| 0x1C
 +
| 0x1
 +
| IsActive
 +
|-
 +
| 0x1D
 +
| 0x3
 +
| Reserved
 +
|-
 +
| 0x20
 +
| 0x8
 +
| SamplingNumber
 +
|}
 +
 
 +
===== AnalogStickCalibrationStateImplLifo =====
 +
This is "nn::hid::detail::AnalogStickCalibrationStateImplLifo". This is a RingLifo object.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| RingLifoVptr
 +
|-
 +
| 0x8
 +
| 0x8
 +
| BufferCount
 +
|-
 +
| 0x10
 +
| 0x8
 +
| Tail
 +
|-
 +
| 0x18
 +
| 0x8
 +
| Count
 +
|-
 +
| 0x20
 +
| 0x28 * 2
 +
| Array of [[#AnalogStickCalibrationStateImpl]]
 +
|}
 +
 
 +
====== AnalogStickCalibrationStateImplAtomicStorage ======
 +
This is "nn::hid::detail::AnalogStickCalibrationStateImplAtomicStorage".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| SamplingNumber
 +
|-
 +
| 0x8
 +
| 0x20
 +
| [[#AnalogStickCalibrationStateImpl]]
 +
|}
 +
 
 +
======= AnalogStickCalibrationStateImpl =======
 +
This is "nn::hid::detail::AnalogStickCalibrationStateImpl".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| [[#AnalogStickState|State]]
 +
|-
 +
| 0x8
 +
| 0x8
 +
| [[#AnalogStickCalibrationFlagsSet|Flags]]
 +
|-
 +
| 0x10
 +
| 0x8
 +
| Stage
 +
|-
 +
| 0x18
 +
| 0x8
 +
| SamplingNumber
 +
|}
 +
 
 +
===== SixAxisSensorUserCalibrationStateLifo =====
 +
This is "nn::hid::detail::SixAxisSensorUserCalibrationStateLifo". This is a RingLifo object.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| RingLifoVptr
 +
|-
 +
| 0x8
 +
| 0x8
 +
| BufferCount
 +
|-
 +
| 0x10
 +
| 0x8
 +
| Tail
 +
|-
 +
| 0x18
 +
| 0x8
 +
| Count
 +
|-
 +
| 0x20
 +
| 0x20 * 2
 +
| Array of [[#SixAxisSensorUserCalibrationStateAtomicStorage]]
 +
|}
 +
 
 +
====== SixAxisSensorUserCalibrationStateAtomicStorage ======
 +
This is "nn::hid::detail::SixAxisSensorUserCalibrationStateAtomicStorage".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| SamplingNumber
 +
|-
 +
| 0x8
 +
| 0x18
 +
| [[#SixAxisSensorUserCalibrationState]]
 +
|}
 +
 
 +
======= UniquePadConfig =======
 +
This is "nn::hid::detail::UniquePadConfig".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset
 
! Offset
Line 764: Line 1,200:  
| 0x0
 
| 0x0
 
| 0x8
 
| 0x8
| Timestamp in ticks
+
| [[#SixAxisSensorUserCalibrationFlagsSet|Flags]]
 
|-
 
|-
 
| 0x8
 
| 0x8
 
| 0x8
 
| 0x8
| Number of Entries (always 17)
+
| Stage
 
|-
 
|-
 
| 0x10
 
| 0x10
 
| 0x8
 
| 0x8
| Latest Entry Index
+
| SamplingNumber
|-
  −
| 0x18
  −
| 0x8
  −
| Maximum Entry Index (always 16)
   
|}
 
|}
   −
==== AnalogStickCalibrationState ====
+
== NpadSharedMemoryFormat ==
{| class="wikitable" border="1"
+
This is "nn::hid::detail::NpadSharedMemoryFormat".
|-
  −
! Offset
  −
! Size
  −
! Description
  −
|-
  −
| 0x0
  −
| 0x8
  −
| Timestamp in samples (global)
  −
|-
  −
| 0x8
  −
| 0x28
  −
|
  −
|}
     −
== Npad ==
   
This section contains a series of 10 0x5000 byte structures describing each available controller.
 
This section contains a series of 10 0x5000 byte structures describing each available controller.
   Line 1,399: Line 1,817:  
|}
 
|}
   −
== Gesture ==
+
== GestureSharedMemoryFormat ==
 +
This is "nn::hid::detail::GestureSharedMemoryFormat".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 1,455: Line 1,875:  
|}
 
|}
   −
== ConsoleSixAxisSensor ==
+
== ConsoleSixAxisSensorSharedMemoryFormat ==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-

Navigation menu