Circle Pad Pro: Difference between revisions
(3 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
Communications with this device is done via the [[IR_Services|ir:USER]] service, which uses obfuscation implemented in software. The [[IRU:SetBitRate|bitrate-value]] passed to IRUSER is 0x04, hence the actual bps is 96000. | Communications with this device is done via the [[IR_Services|ir:USER]] service, which uses obfuscation implemented in software. The [[IRU:SetBitRate|bitrate-value]] passed to IRUSER is 0x04, hence the actual bps is 96000. | ||
The application sends requests via [[IRUSER:SendIrnop]] and receives response from Circle Pad Pro via [[IRUSER:ReceiveIrnop]] (or read data from the [[IRUSER_Shared_Memory|shared memory]]). The request and response data structures below are payloads in packets. | The application sends requests via [[IRUSER:SendIrnop]] and receives response from Circle Pad Pro via [[IRUSER:ReceiveIrnop]] (or read data from the [[IRUSER_Shared_Memory|shared memory]]). The request and response data structures below are payloads in packets. Each request begins with a one-byte ID that determines the request type. | ||
=== Read Input === | === Request 1: Read Input === | ||
Request (3 bytes): | Request (3 bytes): | ||
Line 44: | Line 44: | ||
| 0x0 | | 0x0 | ||
| 0x1 | | 0x1 | ||
| Response ID? Fixed value | | Response ID? Fixed value 0x10 | ||
|- | |- | ||
| 0x1 | | 0x1 | ||
Line 67: | Line 67: | ||
|} | |} | ||
=== Read Calibration Data? === | === Request 2: Read Calibration Data? === | ||
Request (6 bytes): | Request (6 bytes): | ||
Line 106: | Line 106: | ||
| 0x1 | | 0x1 | ||
| 0x2 | | 0x2 | ||
| | | Data offset? Same as Request+0x2 | ||
|- | |- | ||
| 0x3 | |||
| 0x2 | | 0x2 | ||
| Data size. Same as Request+0x4 | |||
| Data size | |||
|- | |- | ||
| | | 0x5 | ||
| data size | | data size | ||
| calibration data? | | calibration data? | ||
|} | |||
=== Request 3 === | |||
Request (22 bytes?): | |||
{| class="wikitable" border="1" | |||
|- | |||
! offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x1 | |||
| Request ID (fixed value 3) | |||
|- | |||
| 0x1 | |||
| 0x1 | |||
| Expected response time in ms? | |||
|- | |||
| 0x2 | |||
| ... | |||
| ? | |||
|} | |||
Response (2 bytes?): | |||
{| class="wikitable" border="1" | |||
|- | |||
! offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x1 | |||
| Response ID? Fixed value 0x12 | |||
|- | |||
| 0x1 | |||
| 0x1 | |||
| 0? | |||
|} | |||
=== Request 4: Reset Calibration Data? === | |||
Request (3 bytes?): | |||
{| class="wikitable" border="1" | |||
|- | |||
! offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x1 | |||
| Request ID (fixed value 4) | |||
|- | |||
| 0x1 | |||
| 0x1 | |||
| Expected response time in ms? | |||
|- | |||
| 0x2 | |||
| 0x1 | |||
| ? | |||
|} | |||
Response (2 bytes?): | |||
{| class="wikitable" border="1" | |||
|- | |||
! offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x1 | |||
| Response ID? Fixed value 0x13 | |||
|- | |||
| 0x1 | |||
| 0x1 | |||
| 0? | |||
|} | |||
=== Request 5 === | |||
Request (2 bytes): | |||
{| class="wikitable" border="1" | |||
|- | |||
! offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x1 | |||
| Request ID (fixed value 5) | |||
|- | |||
| 0x1 | |||
| 0x1 | |||
| Expected response time in ms? | |||
|} | |||
Response (2 bytes?): | |||
{| class="wikitable" border="1" | |||
|- | |||
! offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x1 | |||
| Response ID? Fixed value 0x14 | |||
|- | |||
| 0x1 | |||
| 0x1 | |||
| ? | |||
|} | |} |