MAME controller profile vs per-game CFG on Android
Use a controller configuration selected with `-ctrlr` for reusable default assignments or stable device numbering, and let MAME's per-machine CFG store user changes for one machine. Record both layers: a later, specific saved assignment can make a valid controller profile appear ineffective.
Do this in order
- 01
Record the exact port, MAME revision, input provider, connected devices, and one machine whose controls are wrong.
- 02
Back up the configured ctrlrpath and cfg_directory before deleting or renaming any mapping.
- 03
Start with no selected controller profile, reset only the affected machine's user assignments, and prove the physical controls reach MAME.
- 04
Select one documented `-ctrlr` profile by filename without the `.cfg` suffix, cold-start, and confirm MAME loaded an applicable section.
- 05
Create machine-specific changes only after the reusable defaults work; test menus, player order, analog range, coin, start, and gameplay inputs.
- 06
Reconnect devices and relaunch; if numbering changes, use stable IDs only when the provider supplies unique identifiers and the port exposes the official mechanism.
Decision and diagnostic table
| Layer | Best use | Failure clue |
|---|---|---|
| Controller profile (-ctrlr) | Reusable defaults and mapdevice rules | Missing file or no applicable system section |
| Per-machine CFG | One machine's user assignments and state | Only one short name behaves differently |
| General input defaults | Default input types across machines | Many games inherit the wrong binding |
| Android wrapper mapping | Physical event before upstream MAME | MAME never sees the expected token |
A controller profile supplies defaults
MAME searches ctrlrpath and selects the profile named by the ctrlr option. The XML configuration format is currently version 10; MAME will not load a different format version.
Applicable default, short-name, parent, BIOS, and source-file sections are processed in file order. Within a section, remap elements are applied before port elements.
Saved machine input is a separate layer
Files under cfg_directory resemble controller profiles but represent saved system settings and bookkeeping. Keep reusable hardware intent in the profile and one-machine exceptions in that machine's saved configuration.
Stable numbering needs stable device IDs
MAME's mapdevice feature works only in controller configuration files and only when the operating system and input provider supply stable, unique IDs. Some SDL controller paths cannot promise that identity.
Controller mappings do not change content rights. Share only profiles you authored and do not bundle them with unauthorized ROM, BIOS, CHD, artwork, music, or copyrighted cabinet assets.