Run a MAME debugger command file through an Android port that exposes upstream arguments
Put reviewed debugger commands in a text file and start the exact MAME build with `-debug -debugscript <filename>`. This is an upstream debugger workflow, not a general `-command` option. On Android it works only when the port exposes the debugger module, forwards command-line arguments, and can read the selected file; otherwise use the port's documented diagnostic interface.
Do this in order
- 01
Record the Android port, exact MAME version, system short name, debugger availability, argument field, and its supported file-selection path.
- 02
Create a UTF-8 text file containing one reviewed MAME debugger command per line; begin with a harmless command such as `printf` or a breakpoint inspection.
- 03
Place or select the file through the wrapper's documented storage flow and avoid granting broad storage access merely to imitate a desktop path.
- 04
Start the target with `-debug -debugscript <filename>` only if the wrapper explicitly forwards those upstream arguments.
- 05
Capture the debugger console or port log and confirm each line ran in order without an unknown-command or file-not-found error.
- 06
Repeat the same launch without the script, then keep the build, script hash, log, and observed difference as the completion record.
Decision and diagnostic table
| Result | What it means | Next check |
|---|---|---|
| Unknown `-debugscript` option | Wrapper does not forward upstream arguments | Use the port's documented UI |
| Debugger opens; file not found | Script path is outside the wrapper's readable scope | Re-select through supported storage |
| Script loads; command is unknown | Command is invalid for that MAME build | Check same-version debugger help |
| Commands run in order | Debug script mechanism is active | Verify the intended final state |
A debug script is not an INI file
MAME's `-debugscript` option reads debugger console commands at startup while the debugger is active. The debugger's `source <filename>` command can read another command file during the session.
INI files configure emulator options, and machine CFG files normally preserve input assignments, DIP switches, bookkeeping data, and related settings. Feeding those syntaxes to the debugger is a category error.
Android wrappers define the practical boundary
The upstream manual describes MAME itself. An Android package may provide no debugger module, no terminal, a restricted launch form, or only storage-provider URIs. A desktop example is not proof that an Android wrapper implements the same path.
Stop when the wrapper does not document the interface. Do not install an unrelated helper, root the device, or grant broad storage access solely to force a debug workflow.
Use logs as the completion proof
A visible debugger window is not enough. Preserve the ordered console output and compare a launch with and without the script so persistent CFG, NVRAM, or save-state data does not masquerade as a script effect.
Keep scripts read-only and narrowly scoped. Destructive debugger commands can change emulated memory or terminate a session even though they do not modify the original ROM archive.
Debugger automation does not change content rights and must not be used to bypass access controls. Do not distribute ROM, BIOS, CHD, artwork, audio, keys, private paths, or credentials with a script or its logs.