ppsspp_get_info
Retrieve the currently loaded game's title, disc ID, and version, along with PPSSPP's emulation state (running, paused, or stepping). Returns 'no game loaded' fields if at home menu.
Instructions
PURPOSE: Get the loaded game's title, disc ID, and version, plus PPSSPP's run state. USAGE: Call after ppsspp_ping to learn what game is loaded and whether emulation is currently running or stepping. BEHAVIOR: No side effects — pure read. Returns 'no game loaded' fields if PPSSPP is at the home menu / not currently emulating. RETURNS: Multi-line text with Title, Disc ID, Version, and run state (running / paused / stepping).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:50-57 (schema)Schema/definition of the ppsspp_get_info tool in the TOOLS array: name, description, and empty input schema (no parameters).
{ name: "ppsspp_get_info", description: "PURPOSE: Get the loaded game's title, disc ID, and version, plus PPSSPP's run state. " + "USAGE: Call after ppsspp_ping to learn what game is loaded and whether emulation is currently running or stepping. " + "BEHAVIOR: No side effects — pure read. Returns 'no game loaded' fields if PPSSPP is at the home menu / not currently emulating. " + "RETURNS: Multi-line text with Title, Disc ID, Version, and run state (running / paused / stepping).", inputSchema: { type: "object", properties: {} }, - src/tools.ts:419-432 (handler)Handler execution logic for ppsspp_get_info: calls PPSSPP's 'game.status' event via WebSocket, extracts game title/disc ID/version and emulator state (running/paused/stepping), returns formatted multi-line text.
case "ppsspp_get_info": { const status = await pp.call<{ game?: { id?: string; title?: string; version?: string } | null; paused?: boolean; stepping?: boolean }>("game.status"); const lines: string[] = []; if (status.game) { lines.push(`Title: ${status.game.title ?? "(unavailable)"}`); lines.push(`Disc ID: ${status.game.id ?? "(unavailable)"}`); lines.push(`Version: ${status.game.version ?? "(unavailable)"}`); } else { lines.push("No game loaded."); } const state = status.stepping ? "stepping (paused)" : status.paused ? "paused" : "running"; lines.push(`State: ${state}`); return ok(lines.join("\n")); } - src/tools.ts:405-406 (registration)Registration of all tools (including ppsspp_get_info) via server.setRequestHandler with ListToolsRequestSchema, exposing the TOOLS array.
export function registerTools(server: Server, pp: PpssppClient): void { server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));