πŸ‡¬πŸ‡§ πŸ‡«πŸ‡· πŸ‡ͺπŸ‡Έ πŸ‡©πŸ‡ͺ

AMSpiriT Lite β€” Quick Reference

AMSpiriT Lite is a Linux/Windows Amstrad CPC emulator based on the AMSpiriT core by David MANUEL.

Control Keys

KeyAction
F1Open this help in the browser
F2Save a PNG screenshot in the current directory
F4Quick-save snapshot to current slot
Shift+F4Quick-load snapshot from current slot
F6Debugger: step back (rewind, when paused and available)
F7Debugger: pause if running; step (BASIC statement or Z80 instruction) if paused
F8Debugger: step over (Z80 CALL/CALL cc or BASIC GOSUB; else a plain step)
F9Debugger: resume (only while paused)
Shift+F9Toggle turbo mode (full speed, audio muted)
F10Hard reset (cold boot)
Shift+F10Soft reset (warm restart)
F11 (SDL only)Cycle monitor preset (colour CTM644, green GT65, TV, ASIC variants)
Shift+F11Cycle screen types (colour, green monitor, ASIC variants)
Ctrl+F11 (SDL only)Toggle FPS overlay
Ctrl+Shift+F11 (SDL only)Cycle CRTC debug visualisation modes
F12Toggle fullscreen / windowed
Shift+F12Toggle display: visible CPC screen ↔ full CRTC frame
Ctrl+F12Cycle debug screen (current frame ↔ overlay)
PausePause / Resume emulation
β†’ (when paused)Step one frame forward
← / β†’ (when paused, rewind on)Navigate rewind history one frame at a time
Alt+F4Close window (handled by the window manager)
Ctrl+1 to Ctrl+0CPC numpad 1–0 (for laptops without a numeric keypad)
Mouse wheel (up/down)Adjust volume (Β±10% per scroll)
Mouse middle clickToggle mute / unmute
Note: F6-F9 mirror the web page's step-by-step debugger (--web-server). BASIC vs Z80 stepping is auto-detected from whether a BASIC program is currently running β€” there is no tab to select, unlike the web page.

Loading Files

Drag and drop a file onto the emulator window to load it. The Qt frontend also has a File menu to open a file dialog.

Tip: hold Ctrl while dropping a file to perform a hard reset before loading β€” useful for starting a disk image in a clean machine state.
FormatDescription
.dskStandard disk image
.hfe / .ipfHigh-fidelity disk image (CAPS)
.cdtTape (CDT)
.snaSnapshot (saved state)
.cprCPC Plus / GX4000 cartridge β€” automatically switches to CPC 6128+ model and CRTC type 3

Snapshot Slots

AMSpiriT Lite maintains 4 quick-save slots (1–4) per game. Slots are stored alongside the ROM/disk image and persist across sessions.

ActionKey / Button
Quick-save to current slotF4
Quick-load from current slotShift+F4
Cycle to next slot (while paused)Gamepad Start / + button
Cycle to previous slot (while paused)Gamepad Select / βˆ’ button
Save to slot (while running)Gamepad Start / + button
Load from slot (while running)Gamepad Select / βˆ’ button

In the Qt frontend, snapshot slots are also accessible from the Emulation β†’ Snapshots menu.

Rewind

The optional rewind feature records a rolling buffer of CPC state snapshots in RAM as the emulator runs. When paused, you can step backwards and forwards through the recorded history β€” useful for debugging, finding the right moment to screenshot, or just rewinding a bad move in a game.

Enable rewind at startup with --enable-rewind. In the Qt frontend, use the Emulation β†’ Rewind menu to enable it and adjust settings.

Key / ActionDescription
← (when paused)Step one frame backward in the rewind history
β†’ (when paused)Step one frame forward (toward present), or step one normal frame if fully caught up
D-pad ← (gamepad, when paused)Step backward in rewind
D-pad β†’ (gamepad, when paused)Step forward in rewind / resume if at head

The status bar / title shows < N / M while rewound (N frames ahead of oldest, M total stored).

Memory: each snapshot is approximately 1.6 MB. The default buffer holds 100 snapshots (~160 MB); adjust with --rewind-slots N.

Turbo Mode

Turbo mode disables 50 Hz pacing and mutes audio, letting the emulator run at the host CPU's full speed. Useful for skipping long tape loads or intros.

Gamepad / Joystick

The Qt frontend uses the SDL2 GameController API (XInput on Windows, evdev on Linux, GameController on macOS). The SDL frontend uses the legacy joystick API. Both detect controllers at startup and on hot-plug; the first controller found maps to CPC joystick port 1.

ButtonAction (while running)Action (while paused)
AFire 1β€”
BFire 2β€”
XFire 3β€”
Y / GuidePauseResume
Start / +Quick-save to current slotCycle to next slot
Select / βˆ’Quick-load from current slotCycle to previous slot
Left stick / D-padDirections (Up/Down/Left/Right)Navigate rewind (if active)
SDL frontend: uses raw joystick button numbers (Button 0–3 = Fire 1/2/3/Pause, Button 7/9 = Start, Button 6/8 = Select). The CPC Plus analog axis is supported on both frontends.

Web Debug Server

The emulator embeds an HTTP debug server (on by default, bound to 127.0.0.1:6128) that exposes a full web interface in the browser: Z80 registers, Gate Array, PSG, FDC, memory heat map, ASIC, disk, config, scripting, and more.

amspirit-lite-sdl [--no-web-server] [--web-addr 0.0.0.0] [--web-port 6128] [--web-html path/to/ui.html]
OptionDescription
--web-serverEnable the server (on by default)
--no-web-serverDisable the server
--web-addr <address>Bind address (default: 127.0.0.1 β€” local only; use 0.0.0.0 for all interfaces)
--web-port <port>Listening port (default: 6128)
--web-html <file>Path to the HTML UI file (default: amspirit-lite.html next to the binary)
--lua-full-stdlibLet scripts POSTed to the web API use the full Lua stdlib (io, os.execute, package, debug). Off by default β€” such scripts are sandboxed to a jailed fs.* file table. Any page open in your browser can reach the API, so only enable this on a machine you trust.
The amspirit-lite.html file can be edited without recompiling. If the file is missing, the UI embedded in the binary is used as a fallback.

The interface is organised into tabs: Keyboard, BASIC, Debug (Z80/disassembly/breakpoints), ROMs (ROM Map), Audio, Heat Map (memory), ASIC, Poke, Script, Config, Disk, and Settings.

BASIC Editor

The BASIC tab works with Locomotive BASIC programs:

Keyboard Mapping

The Keyboard tab displays the current keyboard layout and all mapped keys (read-only reference for debugging keyboard input issues).

ROM Map

The ROMs tab shows the current ROM catalog: which firmware, extension ROM (R<n>:) and cartridge bank is loaded in each slot, and where it came from. It has a compact view and a per-slot view.

Snapshot slots are not managed from the web interface β€” use F4 / Shift+F4, or the Qt Emulation β†’ Snapshots menu.

Command-Line Options

amspirit-lite-sdl [OPTIONS] [FILE]

Emulation

OptionDescription
-m <model>CPC model: 464, 664, 6128 (default), 6128+, 464+, GX4000
-c <type>CRTC type (0 to 4)
--ram <Ko>Total RAM in Ko: 128 (default), 192, 320, 576
-R <path> / --rom-path <path>Path where ROMs are stored
-C <path> / --config <path>Path to config files
-l <lang> / --lang <lang>ROM language (sets the core's CPC_COUNTRY): FR (default), EN, SP, DA
--lang-ui <lang>Web/UI language: en (default), fr, es, de (auto-detected from $LANG)
-k <layout> / --keyboard <layout>Host keyboard layout: fr (default), uk, us
--keymap <file>Load a custom keyboard mapping file
-F / --fullscreenStart in fullscreen
-w / --windowedWindowed mode (overrides --fullscreen)
--zoom <N>Initial window zoom factor (1=768Γ—542, 2=1536Γ—1084, …); default 2 with auto fallback to 1
--size <WxH>Initial window size, e.g. 1280x960
-Z / --turboStart in turbo mode (full speed)
--monitor <preset>CRT monitor preset: off (default), ctm644, gt65, tv
--resetIgnore saved config, start with built-in defaults
--no-splash / --splashSkip / force the startup splash screen (--splash overrides --no-splash from config)

Auto-loading and auto-typing

OptionDescription
-A / --autorun[=FILE]Auto-run the boot disk: guesses the right RUN"<file>/|CPM, or force a filename with --autorun=FILE
-T <name> / --run <name>Auto-type RUN"<name> to start a named program
-t <text> / --autotype <text>Type a literal string into the CPC after boot (\n = Enter)
--autotype-file <file>Type the contents of a text file into the CPC after boot

Audio and display

OptionDescription
-L <ms> / --audio-latency <ms>Audio buffer latency in milliseconds (default: 80 β€” increase if audio crackles)
--audio-device <name>Audio output device name (default: system default)
--show-overlayShow FPS indicator in the top-left corner (red = too slow, blue = too fast)

Scripting

OptionDescription
--script <file>Execute a CSL or Lua script (full stdlib β€” --script is a local/trusted load, unlike scripts POSTed to the web API)
--ssmEnable SSM mode: act on ED FE/FF/00 Z80 opcodes
--ssm-bothWith --ssm, save both snapshot and screenshot on ED FE or ED FF
--debug-scriptLog every executed CSL/Lua line as the script runs

Rewind

OptionDescription
--enable-rewindEnable in-RAM rewind buffer (records a snapshot every N frames)
--rewind-interval <N>Frames between rewind snapshots (default: 10)
--rewind-slots <N>Maximum number of snapshots to keep in the buffer (default: 100, ~160 MB)

Web debug server

OptionDescription
--web-serverEnable the embedded HTTP debug server (on by default)
--no-web-serverDisable the server
--web-addr <address>Bind address (default: 127.0.0.1)
--web-port <port>Listening port (default: 6128)
--web-html <file>Path to the debug UI HTML file
--lua-full-stdlibLet scripts POSTed to the web API use the full Lua stdlib instead of the sandbox (see the Web Debug Server section)

Binary files

OptionDescription
--bin-address <addr>Load address for a raw/headerless .bin file (e.g. 4000, B04:2000 β€” a bare value is the base 64K); ignored for AMSDOS-header files and overridden by the name@addr.bin filename convention
--bin-entry <addr>Entry point to jump to after loading a raw .bin file (flat 16-bit address); implies immediate execution

Diagnostics and miscellaneous

OptionDescription
-v / --verbose, -q / --quietIncrease or suppress log verbosity
-K / --debug-keysEnable verbose keyboard debug output
-J / --debug-joystickEnable verbose joystick debug output
--debug-rewindLog rewind store/recall with slot index and history size
--debug-webapiLog incoming web API requests, responses, and SSE events
--debug-audioLog per-second audio underrun/dropped-byte stats
--dump-keymap[=FILE]Export the current keymap to FILE (default: keymap-sdl.cfg) and exit
-X <N> / --autoExit <N>Exit automatically after N frames of the 50 Hz loop (paused frames count) β€” for automated testing
--save-log <file>Save all log output to <file>
--report[=path]Generate a diagnostic report
--update-url <url>Override the update manifest endpoint (testing)

Keymap Configuration (keymap.cfg)

Generate a keymap file using the --dump-keymap option, then edit it to your preferences and restart the emulator:

amspirit-lite-sdl --dump-keymap=keymap.cfg

(With no filename, --dump-keymap writes keymap-sdl.cfg in the current directory.)

Place the generated keymap.cfg in your ROMs/ or config/ directory (or point --keymap at it directly). The file uses INI format with two sections: [keyboard layout] and [emulator hotkeys].

Supported hotkey actions: PAUSE, MUTE, HELP, SCREENSHOT, SNAPSHOT_SAVE, SNAPSHOT_LOAD, VOLUME_UP, VOLUME_DOWN, TURBO, HARD_RESET, SOFT_RESET, FULLSCREEN, FULL_FRAME, CYCLE_SCREEN, CYCLE_DEBUG_SCREEN, TOGGLE_OVERLAY, CYCLE_CRTC, CYCLE_MONITOR, FRAME_STEP, DEBUG_STEP, DEBUG_STEP_OVER, DEBUG_RESUME, DEBUG_STEP_BACK, DEBUG_CLEAR_BREAKPOINTS, OPEN_FILE, QUIT

Key format: Single key (F1, A, Escape, Return, Space) or modifiers (Ctrl+X, Shift+F1, Alt+Shift+P). Case-insensitive.

Changes take effect on next restart. To find a key's code, run with -K flag and watch for DOWN messages in the console. Note: SDL and Qt applications use different key codes; use separate keymap files for each if you run both.


AMSpiriT core by David MANUEL β€” Linux port by Siko β€” amspirit.fr