ppsspp_write_register
Set a PSP CPU register (GPR/FPU/VFPU, pc/hi/lo) to a hex value during PPSSPP debugging; automatically pauses and resumes the emulator.
Instructions
PURPOSE: Set a CPU register (GPR/FPU/VFPU names, plus pc/hi/lo).
USAGE: session_id + name (MIPS ABI names preferred; numeric aliases like 'r5' normalize to the GPR of that index, i.e. r5 -> a1) + value (hex).
BEHAVIOR: DESTRUCTIVE. Pauses and resumes the CPU automatically (REQUIRED_STEPPING handled internally) — no manual pause needed.
RETURNS: {name, value, response, text}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | CPU register name (MIPS standard names). GPRs: 'v0'/'v1'/'a0'-'a3'/'t0'-'t9'/'s0'-'s7'/'gp'/'sp'/'fp'/'ra'/'hi'/'lo'/'pc'. FPU: 'f0'-'f31'. VFPU: 'v0'-'v127'. Numeric aliases like 'r5' are accepted and normalized (r5 -> a1, i.e. GPR index 5) — prefer the MIPS standard name. Case-sensitive (lowercase by convention). | |
| value | Yes | Value to write, as a hex string (e.g. '0x00000001'). Treated as an unsigned 32-bit int; values outside [0, 0xFFFFFFFF] are REJECTED (out-of-32-bit-range error), not wrapped. | |
| session_id | Yes | Active session ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Register name (e.g., 'v0', 'a0', 'pc', 'hi', 'lo'). | |
| text | Yes | Unified text representation: 'Wrote 0x{VAL:X} → {REG}'. | |
| value | Yes | Value written, hex string (e.g. '0x00000001'). | |
| response | Yes | Raw PPSSPP WebSocket response (may be empty). |