PCSX Debug console protocol description, version 1.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Commands number are formatted using %03X (yes) Registers number are formatted using %02X. Breakpoints numbers are formatted using %X All other values are formatted using %08X, unless specified. Client inputs: ~~~~~~~~~~~~~ Basic commands (1xx): -------------------- 100 Sends a dumb message. Will be replied with a 200 reply, followed by the message. 101 Gets PCSX version. 102 Gets protocol version. 103 Gets status 110 Gets PC. 111 [reg] Gets GP register, or all, if no argument. 112 Gets LO/HI registers. 113 [reg] Gets COP0 register, or all, if no argument. 114 [reg] Gets COP2 control register, or all, if no argument. 115 [reg] Gets COP2 data register, or all, if no argument. 119 [pc] Disassemble current PC, or given PC. 121 = Sets a GP register. Will return a 221 message. 122 = Sets LO or HI register. Will return a 222 message. 123 = Sets a COP0 register. Will return a 223 message. 124 = Sets a COP2 control register. Will return a 224 message. 125 = Sets a COP2 data register. Will return a 225 message. 130 @ Dumps a range of memory, of size bytes starting at addr. 140 @ Sets a range of memory, of size bytes starting at addr. Will have to send immediately exactly size bytes afterward. Execution flow control commands (3xx): ------------------------------------- 300 [number] Get a list of the actual breakpoints. Will get '400' answers. 301 [number] Deletes a breakpoint, or all, if no arguments. 310
Sets an exec breakpoint. 320
Sets a read breakpoint, 1 byte / 8 bits. 321
Sets a read breakpoint, 2 bytes / 16 bits, has to be on an even address. 322
Sets a read breakpoint, 4 bytes / 32 bits, address has to be 4-bytes aligned. 330
Sets a write breakpoint, 1 byte / 8 bits. 331
Sets a write breakpoint, 2 bytes / 16 bits, has to be on an even address. 332
Sets a write breakpoint, 4 bytes / 32 bits, address has to be 4-bytes aligned. 390 Pauses execution. Equivalents to a breakpoint. 391 Restarts execution. 395 [number] Traces execution, 1 instruction by default. Formatted using %i 396 Save state. 397 Load state. Will wait size bytes afterward. 398 Soft (quick) resets. 399 Resets. Server outputs: ~~~~~~~~~~~~~~ Spontaneous messages (0xx): -------------------------- 000 Greeting banner. 030 @ Execution hit breakpoint, PCSX is paused. Displays PC's value. Basic commands acknowledge (2xx): -------------------------------- 200 Sends a dumb message. 201 Returns PCSX version. 202 Returns protocol version. 203 status = 0: running; = 1: paused; = 2: trace 210 PC= Displays current PC value. 211 = Displays one GP register value. 212 LO= HI= Displays LO/HI registers. 213 = Displays one COP0 register value. 214 = Displays one COP2 control register value. 215 = Displays one COP2 data register value. 219 Displays one line of disassembled code. 221 = Displays one GP register value, ack for modification. 222 LO= HI= Displays LO/HI registers, ack for modification. 223 = Displays one COP0 register value, ack for modification. 224 = Displays one COP2 control register value, ack for modification. 225 = Displays one COP2 data register value, ack for modification. 230 Dumping memory. Will then raw outputs size bytes. 240 @ Memory set acknowledge. Execution flow control commands acknowledge (4xx): ------------------------------------------------- 400 @
- Displays a breakpoint, where 'type' can be of E, R1, R2, R4, W1, W2 or W4. 401 Breakpoint deleting acknowledge. 410, 420, 421, 422, 430, 431, 432 Breakpoint adding acknowledge. Returns the number of the added breakpoint. 490 Pausing. 491 Resuming. 495 Tracing. 496 Save state. Will dump size bytes of savestate afterward. 497 Load state acknowledge. 498 Soft resetting. 499 Resetting. Error messages (5xx): -------------------- 500 Command not understood. 511 Invalid GPR register. 512 Invalid LO/HI register. 513, 514 Invalid range or address. 530 Non existant breakpoint. 531, 532, 533 Invalid breakpoint address.