ppsspp_write_memory
Write u8, u16, u32, or raw byte values to a PSP emulator memory address using an active session ID. Use force mode to modify protected kernel or code ranges.
Instructions
PURPOSE: Write u8/u16/u32 or raw bytes to memory.
USAGE: session_id + address ('0x' hex) + data + format ('u8'|'u16'|'u32'|'bytes'; bytes accepts hex or base64).
BEHAVIOR: DESTRUCTIVE. Protected ranges (kernel, top.prx code) need force=true (PROTECTED_ADDRESS).
RETURNS: {address, format, bytes_written, value, text}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Value to write, as a string. For format='u8'/'u16'/'u32', a hex string (e.g. '0x00000001') or decimal string (e.g. '1'). For format='bytes', a hex string (e.g. 'AABBCCDD') or base64 string. | |
| force | No | Set to True to write to protected code-section addresses (kernel memory < 0x08800000 or top.prx code section 0x08804000-0x08D34000). Writing to these ranges without force=True raises ToolError to prevent accidental crashes. | |
| format | No | Write format. 'u32' (default) writes a 32-bit int. 'u8'/'u16' write byte/halfword granules (byte patches). 'bytes' writes raw bytes (data is hex-decoded). | u32 |
| address | Yes | Target address, as a hex string (e.g. '0x08804000'). | |
| session_id | Yes | Active session ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Unified text representation: 'Wrote 0xVAL → 0xADDR' for u32, 'Wrote N bytes → 0xADDR' for bytes. | |
| value | Yes | For format='u32', the value written as hex string (e.g. '0x00000001'); None for 'bytes'. | |
| format | Yes | 'u32' or 'bytes'. | |
| address | Yes | Target address, hex string (e.g. '0x08804000'). | |
| bytes_written | Yes | Number of bytes written. |