IRRST Shared Memory

IRRST Shared Memory

This is the shared-memory for “ir:rst”. The additional New 3DS HID data is stored here. The structure of this is similar to the HID_Shared_Memory sections.

The total size of this shared-mem is 0x98-bytes.

Offset 0x0 #

Relative offsetSizeDescription
0x00x8svcGetSystemTick tick-count output, for when IR module updates entry index0 in the below array.
0x80x8Before the above tick-count field is updated, that value is copied into this field. Therefore, this contains the tick-count for the previous time that entry index0 in the below array was updated by IR module.
0x100x4Index in the following array which was last updated by IR module.
0x180x80Array 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.

Entry format #

Relative offsetSizeDescription
0x00x4PAD state
0x40x4PAD state for buttons which were pressed(bitmasks which changed from value 0 to value 1) since the last HID update.
0x80x4PAD state for buttons which were released(bitmasks which changed from value 1 to value 0) since the last HID update.
0xC0x2C-stick X value (center is exactly 0, ranges from -0x9C to 0x9C)
0xE0x2C-stick Y value (center is exactly 0, ranges from -0x9C to 0x9C)

PAD State #

BitDescription
14ZL
15ZR
24C-stick right
25C-stick left
26C-stick up
27C-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).