Skip to main content
Glama

ppsspp_write8

Write a single byte value (0-255) to any physical address in PSP memory. Use for cheats, debug pokes, or game-state mutations.

Instructions

PURPOSE: Write an unsigned byte (0-255) to PSP memory at the given physical address. USAGE: Use for single-byte cheats, debug pokes, game-state mutations. For 16/32-bit use ppsspp_write16/write32; for spans use ppsspp_write_range. BEHAVIOR: DESTRUCTIVE: overwrites whatever was at address with no undo. Direct memory write — no hardware mediation. Returns an error if the address is outside valid memory or value > 255. RETURNS: Single line 'Wrote VAL → ADDR_HEX'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesPSP physical address. PSP memory layout: user RAM starts at 0x08800000 (or 0x08000000 — varies by firmware allocation), kernel RAM at 0x08000000-0x087FFFFF, VRAM at 0x04000000-0x041FFFFF, scratchpad at 0x00010000-0x00013FFF, hardware regs at 0xBC000000+. Most game state lives in user RAM. Note PPSSPP may also accept 0x88xxxxxx kernel-mode mirrors of the same physical memory.
valueYesByte value (0-255).

Implementation Reference

  • src/tools.ts:146-162 (registration)
    Tool definition/schema for ppsspp_write8 — declares the tool name, description, input schema (address + value 0-255).
    {
      name: "ppsspp_write8",
      description:
        "PURPOSE: Write an unsigned byte (0-255) to PSP memory at the given physical address. " +
        "USAGE: Use for single-byte cheats, debug pokes, game-state mutations. For 16/32-bit use ppsspp_write16/write32; for spans use ppsspp_write_range. " +
        "BEHAVIOR: DESTRUCTIVE: overwrites whatever was at `address` with no undo. Direct memory write — no hardware mediation. Returns an error if the address is outside valid memory or value > 255. " +
        "RETURNS: Single line 'Wrote VAL → ADDR_HEX'.",
      inputSchema: {
        type: "object",
        required: ["address", "value"],
        properties: {
          address: { type: "integer", minimum: 0, description: ADDRESS_PARAM_DESC },
          value:   { type: "integer", minimum: 0, maximum: 255, description: "Byte value (0-255)." },
        },
        additionalProperties: false,
      },
    },
  • Handler case for ppsspp_write8 — calls PPSSPP's memory.write_u8 with the address and value, then returns a confirmation string.
    case "ppsspp_write8": {
      await pp.call("memory.write_u8", { address: a(), value: p.value });
      return ok(`Wrote ${fmtHex(p.value)} → ${addrHex(a())}`);
    }
  • fmtHex helper used by the handler to format the written value as 'DEC (0xHEX)'.
    function fmtHex(n: unknown): string {
      if (typeof n !== "number") return String(n);
      return `${n} (0x${n.toString(16).toUpperCase()})`;
    }
  • addrHex helper used by the handler to format the address as 0x-padded hex.
    function addrHex(n: number): string {
      return `0x${n.toString(16).toUpperCase().padStart(8, "0")}`;
    }
  • ok helper that wraps a text string into MCP content response format.
    function ok(text: string) {
      return { content: [{ type: "text" as const, text }] };
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses destructive behavior, direct memory write, and error conditions. No annotations provided, so description bears full burden; it covers key behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with labeled sections (PURPOSE, USAGE, BEHAVIOR, RETURNS). No unnecessary words. Front-loaded key information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Provides return format and error conditions. No output schema, so description compensates adequately. Could mention potential impact on emulator state, but sufficient for typical use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. Description adds context for the address parameter (memory layout, acceptable ranges) beyond schema. Value parameter is straightforward.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states that it writes an unsigned byte to PSP memory at a physical address. Distinguishes from sibling tools by mentioning write16, write32, and write_range.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states use cases (single-byte cheats, debug pokes, game-state mutations) and provides alternatives for other widths or ranges.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dmang-dev/mcp-ppsspp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server