pine_write32
Write a 32-bit value to emulated memory at a 4-byte aligned address for PlayStation emulation.
Instructions
Write a 32-bit value (LE) to emulated RAM. Address must be 4-byte aligned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Memory address (4-byte aligned) | |
| value | Yes |
Implementation Reference
- src/tools.ts:98-108 (schema)Tool definition/input schema for pine_write32: requires address (integer) and value (integer, minimum 0), writes a 32-bit little-endian value to 4-byte aligned RAM.
{ name: "pine_write32", description: "Write a 32-bit value (LE) to emulated RAM. Address must be 4-byte aligned.", inputSchema: { type: "object", required: ["address", "value"], properties: { address: { type: "integer", description: "Memory address (4-byte aligned)" }, value: { type: "integer", minimum: 0 }, }, }, - src/tools.ts:219-222 (handler)The request handler for pine_write32: calls pine.write32(addr(), p.value as number) and returns a confirmation string with the hex value and address.
case "pine_write32": { await pine.write32(addr(), p.value as number); return ok(`Wrote ${fmtHex(p.value as number)} → ${addrHex(addr())}`); } - src/pine.ts:248-253 (helper)The PineClient.write32 method: assembles an 8-byte buffer (4-byte address LE + 4-byte value LE) and sends it via the PINE protocol with opcode Write32 (0x06).
async write32(addr: number, val: number): Promise<void> { const args = Buffer.alloc(8); args.writeUInt32LE(addr, 0); args.writeUInt32LE(val, 4); await this.call(Op.Write32, args); } - src/pine.ts:31-32 (helper)Opcode constant Write32 = 0x06, used by the PINE protocol to identify a 32-bit write operation.
Write16: 0x05, Write32: 0x06,