Use MAME save states and autosave safely on Android
First verify that the selected machine supports save states in your exact MAME build. Save to a writable state directory, reload the state immediately in the same session, then relaunch the same build before enabling autosave. Treat a support warning or version change as a stop condition, not as a storage problem to bypass.
Do this in order
- 01
Record the Android port, MAME version, machine short name, configured state directory, and whether the driver displays a save-state support warning.
- 02
Confirm the state directory is app-writable and back up any existing `.sta` files before changing slots, paths, or versions.
- 03
Create one manual state using the port's mapped UI control, label the slot, and verify that a new file or timestamp appears.
- 04
Load that state immediately in the same session and confirm controls, audio, timers, and persistent media still behave correctly.
- 05
Exit and relaunch the same MAME build, then load the manual state again; enable autosave only after both tests pass.
- 06
Before any emulator or romset update, preserve the last working build, state, NVRAM, and configuration separately; never make a state your only progress copy.
Decision and diagnostic table
| Result | Meaning | Safe action |
|---|---|---|
| Driver warns state may be invalid | Support is absent or not known-good | Use in-game/NVRAM saving or a documented alternative |
| State is not created | Control mapping or write path failed | Check UI mapping and state directory permissions |
| Same-session load works; later load fails | Path, build, media, or state compatibility changed | Restore the exact recorded environment |
| Autosave restarts from boot | Exit state was not written or could not load | Disable autosave and test a manual state first |
Driver support is the first gate
MAME's official controls warn that save states are not supported by many drivers and may be invalid when support is not known to work perfectly. A frontend showing a Save State button does not override that machine-level boundary.
Test the driver before investigating Android storage. If the warning appears, preserve progress through the emulated machine's supported NVRAM, memory card, or in-game method where available.
Manual state before autosave
MAME's autosave option writes a state on exit and attempts to load it on the next start, but only for drivers that explicitly enable state support. A manual save/load cycle makes the file, slot, and write path observable.
The default state directory is `sta`, and MAME can organize states by machine through its state-name template. Android ports may map that directory into app-private or user-selected storage, so record the path the port actually exposes.
A state is a versioned execution snapshot
A save state captures emulated execution, not just a score or a few game variables. Changes to the driver, devices, BIOS selection, mounted media, or build can make an old snapshot unsafe or unreadable.
Keep normal in-game saves, NVRAM, and a versioned backup as the durable recovery path. If a state fails after an update, restore the recorded build instead of downloading replacement ROM or BIOS files.
Save-state files do not authorize the underlying game or firmware and may contain data derived from running copyrighted content. Keep them private unless you know you may distribute both the state and every required dependency.