ScarletNX / 3DS IPC
hid:USER
The interface snx::ctr::hid of hid.swipc, the service hid:USER. 8 commands; the handlers are in src/3ds/services.
hid:USER, and hid:SPVR, which has the same commands (Azahar's hid_user.cpp and hid_spvr.cpp)
command 0xa: request 0x000a0000, response 0x000a0047
Request
| Word | Contents |
|---|
| 0 | header 0x000a0000: command 0xa, 0 normal words, 0 translated |
Response
| Word | Contents |
|---|
| 0 | header 0x000a0047: command 0xa, 1 normal word, 7 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | 0x14000000: copied handles, 6 |
| 3 | memory: handle<copy> |
| 4 | pad1: handle<copy> |
| 5 | pad2: handle<copy> |
| 6 | accelerometer: handle<copy> |
| 7 | gyroscope: handle<copy> |
| 8 | debug_pad: handle<copy> |
Handler
uint32_t snx_ctr_hid_GetIPCHandles(SnxCtrIpc* c, uint32_t* a_memory, uint32_t* a_pad1, uint32_t* a_pad2, uint32_t* a_accelerometer, uint32_t* a_gyroscope, uint32_t* a_debug_pad)
hid.c, line 200
EnableAccelerometer hid.swipc
command 0x11: request 0x00110000, response 0x00110040
Request
| Word | Contents |
|---|
| 0 | header 0x00110000: command 0x11, 0 normal words, 0 translated |
Response
| Word | Contents |
|---|
| 0 | header 0x00110040: command 0x11, 1 normal word, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
Handler
uint32_t snx_ctr_hid_EnableAccelerometer(SnxCtrIpc* c)
hid.c, line 227
DisableAccelerometer hid.swipc
command 0x12: request 0x00120000, response 0x00120040
Request
| Word | Contents |
|---|
| 0 | header 0x00120000: command 0x12, 0 normal words, 0 translated |
Response
| Word | Contents |
|---|
| 0 | header 0x00120040: command 0x12, 1 normal word, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
Handler
uint32_t snx_ctr_hid_DisableAccelerometer(SnxCtrIpc* c)
hid.c, line 232
EnableGyroscopeLow hid.swipc
command 0x13: request 0x00130000, response 0x00130040
Request
| Word | Contents |
|---|
| 0 | header 0x00130000: command 0x13, 0 normal words, 0 translated |
Response
| Word | Contents |
|---|
| 0 | header 0x00130040: command 0x13, 1 normal word, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
Handler
uint32_t snx_ctr_hid_EnableGyroscopeLow(SnxCtrIpc* c)
hid.c, line 237
DisableGyroscopeLow hid.swipc
command 0x14: request 0x00140000, response 0x00140040
Request
| Word | Contents |
|---|
| 0 | header 0x00140000: command 0x14, 0 normal words, 0 translated |
Response
| Word | Contents |
|---|
| 0 | header 0x00140040: command 0x14, 1 normal word, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
Handler
uint32_t snx_ctr_hid_DisableGyroscopeLow(SnxCtrIpc* c)
hid.c, line 242
GetGyroscopeLowRawToDpsCoefficient hid.swipc
command 0x15: request 0x00150000, response 0x00150080
Request
| Word | Contents |
|---|
| 0 | header 0x00150000: command 0x15, 0 normal words, 0 translated |
Response
| Word | Contents |
|---|
| 0 | header 0x00150080: command 0x15, 2 normal words, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | coefficient: u32 |
Handler
uint32_t snx_ctr_hid_GetGyroscopeLowRawToDpsCoefficient(SnxCtrIpc* c, uint32_t* a_coefficient)
hid.c, line 248
GetGyroscopeLowCalibrateParam hid.swipc
command 0x16: request 0x00160000, response 0x00160180
Request
| Word | Contents |
|---|
| 0 | header 0x00160000: command 0x16, 0 normal words, 0 translated |
Response
| Word | Contents |
|---|
| 0 | header 0x00160180: command 0x16, 6 normal words, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | param0: u32 |
| 3 | param1: u32 |
| 4 | param2: u32 |
| 5 | param3: u32 |
| 6 | param4: u32 |
Handler
uint32_t snx_ctr_hid_GetGyroscopeLowCalibrateParam(SnxCtrIpc* c, uint32_t* a_param0, uint32_t* a_param1, uint32_t* a_param2, uint32_t* a_param3, uint32_t* a_param4)
hid.c, line 255
command 0x17: request 0x00170000, response 0x00170080
Request
| Word | Contents |
|---|
| 0 | header 0x00170000: command 0x17, 0 normal words, 0 translated |
Response
| Word | Contents |
|---|
| 0 | header 0x00170080: command 0x17, 2 normal words, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | volume: u32 |
Handler
uint32_t snx_ctr_hid_GetSoundVolume(SnxCtrIpc* c, uint32_t* a_volume)
hid.c, line 266