Talk:SC Communication
Jump to navigation
Jump to search
0x30 AV Service return packet when HDMI inserted (personal info removed):
000c000: 3001 0000 0000 8031 8000 0000 0104 0104 0......1........ 000c010: 2000 0282 00ff ffff ffff ff00 0469 fa22 ............i." 000c020: 0101 0101 2c15 0103 8030 1b78 eec4 f5a3 ....,....0.x.... 000c030: 574a 9c23 1150 54bf ef00 714f 8180 8140 WJ.#.PT...qO...@ 000c040: 9500 a940 b300 d1c0 0101 023a 8018 7138 ...@.......:..q8 000c050: 2d40 582c 4500 132b 2100 001e 0000 00fd -@X,E..+!....... 000c060: 0032 4c1e 5311 000a 2020 2020 2020 0000 .2L.S... .. 000c070: 00fc 0056 4532 3238 0a20 2020 2020 2020 ...VE228. 000c080: 0000 00ff 00XX XXXX XXXX XXXX XXXX XXXX .....EDIDSERIALN 000c090: XX0a 0188 0203 1ef1 4b90 0504 0302 0111 M.......K....... 000c0a0: 1213 141f 2309 0707 8301 0000 6503 0c00 ....#.......e... 000c0b0: 1000 1a36 80a0 7038 1e40 3020 3500 132b ...6..p8.@0 5..+ 000c0c0: 2100 001a 6621 56aa 5100 1e30 468f 3300 !...f!V.Q..0F.3. 000c0d0: 132b 2100 001e 011d 0072 51d0 1e20 6e28 .+!......rQ.. n( 000c0e0: 5500 132b 2100 001e 8c0a d08a 20e0 2d10 U..+!....... .-. 000c0f0: 103e 9600 132b 2100 0018 011d 8018 711c .>...+!.......q. 000c100: 1620 582c 2500 132b 2100 009f 0000 0000 . X,%..+!.......
Syscon packets
Configuration Service (0x12)
Get IDlog information
Purpose: Can be used to get CID/eCID information.
struct __attribute__ ((packed)) get_idlog_info_request_t { uint8_t cmd; // 0x03 uint8_t param; // 0x01 }; struct __attribute__ ((packed)) get_idlog_info_response_t { uint8_t cmd; uint8_t padding[3]; uint8_t ecid[16]; uint8_t cid[6]; };
Get reference clock
Purpose: Used to calculate an initial value of timebase register.
struct __attribute__ ((packed)) get_reference_clock_request_t { uint8_t cmd; // 0x03 uint8_t param; // 0x10 }; struct __attribute__ ((packed)) get_reference_clock_response_t { uint8_t cmd; uint8_t padding[3]; uint32_t ref_clock_value; uint32_t unk; };
Get core clock multiplier
Purpose: Used together with reference clock to calculate clock frequency.
struct __attribute__ ((packed)) get_core_clock_multiplier_request_t { uint8_t cmd; // 0x03 uint8_t param; // 0x00 }; struct __attribute__ ((packed)) get_core_clock_multiplier_response_t { uint8_t cmd; uint8_t padding[3]; uint8_t id; // 00:2, 01:4, 03: 8, 04:10, 05:12, 06:16, 07:20 };
- Clock frequency = core clock multiplier table[id] * reference clock.
- For example, if you have id=3 and reference clock=400000000, then your clock frequency will be: 400000000*8=3200000000 (3.2 Ghz)
Get platform ID
Purpose: Used to get platform ID (Cytology, Cookie, etc).
struct __attribute__ ((packed)) get_platform_id_request_t { uint8_t cmd; // 0x20 uint8_t param; // 0x10 }; struct __attribute__ ((packed)) get_platform_id_response_t { uint8_t cmd; uint8_t padding[3]; uint8_t platform_id[8]; // ASCII-string };
Get hardware configuration
Purpose: Used to get hardware configuration (PS2 emulation compatibility, card support, WLAN interface, etc).
struct __attribute__ ((packed)) get_hw_config_request_t { uint8_t cmd; // 0x22 }; struct __attribute__ ((packed)) get_hw_config_response_t { uint8_t cmd; uint8_t padding[3]; uint8_t data[12]; };
Get BE counters
Purpose: Used to get several BE counters.
struct __attribute__ ((packed)) get_be_counters_request_t { uint8_t cmd; // 0x41 }; struct __attribute__ ((packed)) get_be_counters_response_t { uint8_t cmd; uint32_t total_operation_time; uint32_t power_on_counter; uint32_t power_off_counter; };
Power Service (0x13)
Query system power up cause
Purpose: Get information about system power up cause.
struct __attribute__ ((packed)) query_system_power_up_cause_request_t { uint8_t cmd; // 0x10 }; struct __attribute__ ((packed)) query_system_power_up_cause_response_t { uint8_t cmd; uint8_t padding1[3]; uint32_t wake_source; uint8_t requested_os_context; uint8_t current_os_context; uint8_t requested_gr_context; uint8_t current_gr_context; uint8_t last_shutdown_cause; uint8_t padding2[3]; };
Get realtime clock
Purpose: Get current value of realtime clock.
struct __attribute__ ((packed)) get_rtc_request_t { uint8_t cmd; // 0x33 }; struct __attribute__ ((packed)) get_rtc_response_t { uint8_t cmd; uint8_t padding[3]; uint32_t rtc; };