ScarletNX / 3DS IPC
APT:S
The interface snx::ctr::apt_wire of apt.swipc, the service APT:S. 10 commands; the handlers are in src/3ds/services.
Scalar/owned-handle commands. PreloadLibraryApplet and GetAppletInfo, like the parameter commands' static buffers and objects (Send, Receive, Glance, StartLibraryApplet), are checked in apt.c.
command 0x1: request 0x00010040, response 0x000100c2
Request
| Word | Contents |
|---|
| 0 | header 0x00010040: command 0x1, 1 normal word, 0 translated |
| 1 | attributes: u32 |
Response
| Word | Contents |
|---|
| 0 | header 0x000100c2: command 0x1, 3 normal words, 2 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | corrected: u32 |
| 3 | state: u32 |
| 4 | 0x0: copied handle, 1 |
| 5 | lock: handle<copy> |
Handler
uint32_t snx_ctr_apt_wire_GetLockHandle(SnxCtrIpc* c, uint32_t a_attributes, uint32_t* a_corrected, uint32_t* a_state, uint32_t* a_lock)
apt.c, line 27
command 0x2: request 0x00020080, response 0x00020043
Request
| Word | Contents |
|---|
| 0 | header 0x00020080: command 0x2, 2 normal words, 0 translated |
| 1 | app_id: u32 |
| 2 | attributes: u32 |
Response
| Word | Contents |
|---|
| 0 | header 0x00020043: command 0x2, 1 normal word, 3 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | 0x4000000: copied handles, 2 |
| 3 | notification: handle<copy> |
| 4 | parameter: handle<copy> |
Handler
uint32_t snx_ctr_apt_wire_Initialize(SnxCtrIpc* c, uint32_t a_app_id, uint32_t a_attributes, uint32_t* a_notification, uint32_t* a_parameter)
apt.c, line 50
command 0x3: request 0x00030040, response 0x00030040
Request
| Word | Contents |
|---|
| 0 | header 0x00030040: command 0x3, 1 normal word, 0 translated |
| 1 | attributes: u32 |
Response
| Word | Contents |
|---|
| 0 | header 0x00030040: command 0x3, 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_apt_wire_Enable(SnxCtrIpc* c, uint32_t a_attributes)
apt.c, line 72
command 0x9: request 0x00090040, response 0x00090080
Request
| Word | Contents |
|---|
| 0 | header 0x00090040: command 0x9, 1 normal word, 0 translated |
| 1 | app_id: u32 |
Response
| Word | Contents |
|---|
| 0 | header 0x00090080: command 0x9, 2 normal words, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | registered: u32 |
Handler
uint32_t snx_ctr_apt_wire_IsRegistered(SnxCtrIpc* c, uint32_t a_app_id, uint32_t* a_registered)
apt.c, line 104
command 0xf: request 0x000f0100, response 0x000f0080
Request
| Word | Contents |
|---|
| 0 | header 0x000f0100: command 0xf, 4 normal words, 0 translated |
| 1 | check_sender: u32 |
| 2 | sender: u32 |
| 3 | check_receiver: u32 |
| 4 | receiver: u32 |
Response
| Word | Contents |
|---|
| 0 | header 0x000f0080: command 0xf, 2 normal words, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | cancelled: u32 |
Handler
uint32_t snx_ctr_apt_wire_CancelParameter(SnxCtrIpc* c, uint32_t a_check_sender, uint32_t a_sender, uint32_t a_check_receiver, uint32_t a_receiver, uint32_t* a_cancelled)
apt.c, line 115
PrepareToStartLibraryApplet apt.swipc
command 0x18: request 0x00180040, response 0x00180040
Request
| Word | Contents |
|---|
| 0 | header 0x00180040: command 0x18, 1 normal word, 0 translated |
| 1 | app_id: u32 |
Response
| Word | Contents |
|---|
| 0 | header 0x00180040: command 0x18, 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_apt_wire_PrepareToStartLibraryApplet(SnxCtrIpc* c, uint32_t a_app_id)
apt.c, line 126
command 0x43: request 0x00430040, response 0x00430040
Request
| Word | Contents |
|---|
| 0 | header 0x00430040: command 0x43, 1 normal word, 0 translated |
| 1 | app_id: u32 |
Response
| Word | Contents |
|---|
| 0 | header 0x00430040: command 0x43, 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_apt_wire_NotifyToWait(SnxCtrIpc* c, uint32_t a_app_id)
apt.c, line 81
command 0x44: request 0x00440000, response 0x00440082
Request
| Word | Contents |
|---|
| 0 | header 0x00440000: command 0x44, 0 normal words, 0 translated |
Response
| Word | Contents |
|---|
| 0 | header 0x00440082: command 0x44, 2 normal words, 2 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | address: u32 |
| 3 | 0x0: copied handle, 1 |
| 4 | font: handle<copy> |
Handler
uint32_t snx_ctr_apt_wire_GetSharedFont(SnxCtrIpc* c, uint32_t* a_address, uint32_t* a_font)
apt.c, line 187
command 0x101: request 0x01010000, response 0x01010080
Request
| Word | Contents |
|---|
| 0 | header 0x01010000: command 0x101, 0 normal words, 0 translated |
Response
| Word | Contents |
|---|
| 0 | header 0x01010080: command 0x101, 2 normal words, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | platform: u32 |
Handler
uint32_t snx_ctr_apt_wire_GetTargetPlatform(SnxCtrIpc* c, uint32_t* a_platform)
apt.c, line 191
command 0x102: request 0x01020000, response 0x01020080
Request
| Word | Contents |
|---|
| 0 | header 0x01020000: command 0x102, 0 normal words, 0 translated |
Response
| Word | Contents |
|---|
| 0 | header 0x01020080: command 0x102, 2 normal words, 0 translated |
| 1 | the result: 0 for success. A failed command's response is the header and the result alone |
| 2 | is_new: u32 |
Handler
uint32_t snx_ctr_apt_wire_IsNew3DS(SnxCtrIpc* c, uint32_t* a_is_new)
apt.c, line 195