retroarch_state_slot_plus
Increment the current save state slot, enabling sequential saving or loading of game states.
Instructions
Increment the currently-selected save state slot. Combine with retroarch_save_state_current / retroarch_load_state_current to target a specific slot for SAVE.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/retroarch.ts:211-212 (handler)The actual handler that sends the 'STATE_SLOT_PLUS' command to RetroArch via UDP fire-and-forget. This is the low-level execution of the tool.
async stateSlotPlus(): Promise<void> { await this.send("STATE_SLOT_PLUS"); } async stateSlotMinus(): Promise<void> { await this.send("STATE_SLOT_MINUS"); } - src/tools.ts:156-160 (registration)Tool registration with name, description, and empty input schema (no parameters needed). Listed in the TOOLS array used for ListToolsRequestSchema.
{ name: "retroarch_state_slot_plus", description: "Increment the currently-selected save state slot. Combine with retroarch_save_state_current / retroarch_load_state_current to target a specific slot for SAVE.", inputSchema: { type: "object", properties: {} }, }, - src/tools.ts:156-160 (schema)Input schema definition — no parameters required (empty object), no properties expected.
{ name: "retroarch_state_slot_plus", description: "Increment the currently-selected save state slot. Combine with retroarch_save_state_current / retroarch_load_state_current to target a specific slot for SAVE.", inputSchema: { type: "object", properties: {} }, }, - src/tools.ts:239-240 (registration)The handler dispatch in the CallToolRequestSchema switch/case, routing tool name to the RetroArchClient method and returning a success message.
case "retroarch_state_slot_plus": await ra.stateSlotPlus(); return ok("Incremented current slot"); case "retroarch_state_slot_minus": await ra.stateSlotMinus(); return ok("Decremented current slot"); - src/retroarch.ts:197-204 (helper)Comment documenting the save-state API including STATE_SLOT_PLUS, explaining the design constraint that specific-slot saving requires moving the slot pointer first.
// ── Save state ───────────────────────────────────────────────────────── // RetroArch's NCI exposes: // * SAVE_STATE — save to currently-selected slot (no reply) // * LOAD_STATE — load from currently-selected slot (no reply) // * LOAD_STATE_SLOT N — load from explicit slot (echoes command) // * STATE_SLOT_PLUS / STATE_SLOT_MINUS — change current slot // There's NO "save_state_slot N" or "get_current_slot" — saving to a // specific slot requires walking the slot pointer to it first.