|
|
Line 1: |
Line 1: |
| This page describes the format of the [[IR Services|ir:rst]]'s shared memory. It contains the current state of New 3DS input device, ie the c-stick and the ZL/ZR shoulder buttons.
| |
|
| |
|
| Size: 0x88 ?
| |
|
| |
| =Offset 0x0=
| |
| {| class="wikitable" border="1"
| |
| |-
| |
| ! Relative offset
| |
| ! Size
| |
| ! Description
| |
| |-
| |
| | 0x0
| |
| | 0x4
| |
| | A counter that ranges from 0 to 7, presumably to indicate which entry was last updated
| |
| |-
| |
| | 0x4
| |
| | 0x4
| |
| | Unused ? (value 0x0)
| |
| |-
| |
| | 0x8
| |
| | 0x80
| |
| | Array of 8 entries, where each entry (see below) is 0x10-bytes.
| |
| |}
| |
|
| |
| IR module first updates index0, then index1, and so on. When updating the array when the index is already 7, the index is reset to 0.
| |
|
| |
| ==PAD State==
| |
| {| class="wikitable" border="1"
| |
| |-
| |
| ! Bit
| |
| ! Description
| |
| |-
| |
| | 14
| |
| | ZL
| |
| |-
| |
| | 15
| |
| | ZR
| |
| |-
| |
| | 24
| |
| | C-stick right
| |
| |-
| |
| | 25
| |
| | C-stick left
| |
| |-
| |
| | 26
| |
| | C-stick up
| |
| |-
| |
| | 27
| |
| | C-stick down
| |
| |}
| |
|
| |
| The ir:rst PAD entries are the same format as HID ones and meant to be ORd with them (they are complementary, there is no overlap in used bits).
| |
|
| |
| ==Entry format==
| |
| {| class="wikitable" border="1"
| |
| |-
| |
| ! Relative offset
| |
| ! Size
| |
| ! Description
| |
| |-
| |
| | 0x0
| |
| | 0x4
| |
| | Current PAD state.
| |
| |-
| |
| | 0x4
| |
| | 0x4
| |
| | PAD state for buttons which were pressed(bitmasks which changed from value 0 to value 1) since the last HID update.
| |
| |-
| |
| | 0x8
| |
| | 0x4
| |
| | PAD state for buttons which were released(bitmasks which changed from value 1 to value 0) since the last HID update.
| |
| |-
| |
| | 0xC
| |
| | 0x4
| |
| | This stores c-stick info: the low s16 is the X coordinate, the high s16 is the Y coordinate. The c-stick center is exactly 0 for these fields. The range for these fields is approximately: -0x9C(bottom/left) - 0x9C(top/right).
| |
| |}
| |