MAME Android storage and persistence troubleshooting / 2026-08-08

Fix MAME NVRAM that resets after exit on Android

Prove the machine uses NVRAM, the configured directory is writable, and the wrapper exits cleanly before deleting saves or changing ROMs.

9 minute persistence diagnosisMAME 0.289 semantics; Android wrapper storage and exit behavior are package-specific

Fix MAME NVRAM that resets after exit on Android

Close the emulated machine through MAME's own exit flow, then check whether the exact configured `nvram_directory` received or updated the machine's file. NVRAM is written on exit for machines that use EEPROM or other non-volatile devices. If no write occurs, isolate machine support, effective path, Android access, and forced process termination before touching ROMs or save states.

Do this in order

  1. 01

    Record the port and MAME revision, machine short name, symptom, effective NVRAM path, and whether the machine actually exposes a persistent setting.

  2. 02

    Back up CFG, NVRAM, diff, and state directories without deleting or merging them.

  3. 03

    Change one harmless in-machine setting, return to gameplay, then exit the machine through MAME and close the app normally.

  4. 04

    Inspect the configured NVRAM directory for a file or timestamp change; do not assume the visible ROM folder owns persistence.

  5. 05

    If nothing changes, capture effective configuration and logs, confirm the directory is writable through the wrapper, and repeat without Android force-stop or task killing.

  6. 06

    Cold-launch the same version and machine, verify the setting, and classify failure as support, path/access, clean-exit, or version migration before restoring one layer.

Decision and diagnostic table

EvidenceDiagnosisAction
NVRAM file updates and reloadsPersistence path worksKeep path and clean-exit flow
Updates only after normal exitForced termination prevents final writeUse MAME exit; review Android policy
CFG changes, NVRAM does notDifferent data owners or no machine NVRAMConfirm machine behavior and NVRAM path
Old file exists in another folderPath changed after updateRestore deliberately; do not merge blindly

NVRAM belongs to the emulated machine

MAME uses NVRAM files for EEPROM, non-volatile RAM, and other programmable devices when a machine has them. Controller mappings and DIP settings usually belong to CFG, while save states serialize a running machine.

Exit is part of the write test

Upstream MAME reads NVRAM at machine start and writes it on exit. Android force-stop, a vendor task killer, or a wrapper crash can prevent the final write even when the directory is correct.

The effective directory is evidence

The default relative folder is not a universal Android path. Use the port's effective configuration or notification and prove the selected destination is writable; a remembered path string is not a retained storage grant.

First-party sources

Related guides