pine_load_state
Replace live emulator state with a saved snapshot from a numbered slot to undo changes or jump to a bookmarked game state.
Instructions
PURPOSE: Trigger the emulator to load a previously-saved state from the given numbered savestate slot, replacing all live state. USAGE: Counterpart to pine_save_state. Use to undo a sequence of writes/inputs (the snapshot/experiment/restore workflow), to jump to a bookmarked game state, or to start each tool-call sequence from a known baseline. There is no PINE 'reset' opcode — to start fresh from boot you must use the emulator's GUI or pre-prepare a slot containing a freshly booted state. BEHAVIOR: DESTRUCTIVE TO LIVE STATE: replaces ALL current emulator state (RAM, registers, GPU, audio, etc.) with the contents of the slot's file. Anything not previously snapshotted is lost permanently. The state file MUST come from the same game disc and same PCSX2 version that produced it; loading an incompatible state typically crashes the core (no recovery without restarting PCSX2). The PINE call returns immediately after PCSX2 schedules the load, NOT after the load is fully visible — there can be a brief window where state is partially loaded. Returns an error if the slot file doesn't exist, the file is corrupt or for the wrong game, or PINE returns FAIL.
RETURNS: Single line 'Load state triggered for slot N'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slot | Yes | Save state slot number (0-255). The PINE protocol accepts the full 0-255 range. PCSX2 slot files live in PCSX2's per-game savestate folder (typically %USERPROFILE%/Documents/PCSX2/sstates on Windows, ~/.config/PCSX2/sstates on Linux) with filenames like '<serial> (<crc>).<slot>.p2s'. Slot numbers are independent of any path. |