MAME Android controller and four-way input setup / 2026-08-09

Fix unwanted diagonals in four-way MAME games on Android

Use MAME's automatic or sticky joystick map to translate an analog thumb stick into the four-way digital input expected by one machine.

10 minute controller diagnosisOfficial MAME 0.289 input semantics; an Android wrapper must expose the upstream option and a joystick provider

Fix unwanted diagonals in four-way MAME games on Android

Keep `joystick_map` at `auto` first: MAME selects a standard 8-way, 4-way, or 4-way-diagonal map from the current machine's input ports. If a physical analog stick still triggers unwanted diagonals in a four-way game, test a documented sticky four-way map in that machine's own INI, not globally. Recenter between tests and prove all four cardinal directions plus corner transitions with the same controller.

Do this in order

  1. 01

    Record the Android package, embedded MAME revision, controller model, joystick provider, machine shortname, current map, and per-machine configuration path.

  2. 02

    Confirm the game exposes four-way digital directions and that the physical stick is being read as an analog X/Y joystick rather than a D-pad.

  3. 03

    Restore `joystick_map auto`, restart the machine, and test up, down, left, right, recentering, and slow rolls through every corner.

  4. 04

    If diagonals still interrupt motion, select a documented four-way sticky map for that machine only and restart before repeating the same route.

  5. 05

    Compare the D-pad and analog stick, then check that menu navigation and unrelated eight-way games remain unchanged.

  6. 06

    Keep the smallest working per-machine change and restore `auto` if the wrapper rewrites the option, the provider lacks stable input, or cardinal directions become unreliable.

Decision and diagnostic table

ObservationLikely boundaryNext action
D-pad works; analog stick stalls at cornersAnalog-to-digital mapTest auto, then sticky four-way
Both inputs miss one directionBinding or providerInspect input assignment first
Eight-way games lose diagonalsMap applied globallyMove change to machine INI
Map option has no effectAndroid wrapper/build boundaryRead effective config and logs

The map translates host geometry

MAME divides analog X/Y motion into a grid and maps regions to digital directions. The emulated game still receives the input type defined by its machine; the map changes how a host thumb stick reaches those digital ports.

Sticky corners preserve the last direction

A sticky four-way corner can keep the last cardinal direction while the stick rolls between axes, then change only after it enters the next cardinal region. This avoids an unintended diagonal without pretending the physical stick has a four-way gate.

Scope the repair to one machine

MAME recommends a per-system INI for special joystick maps. A global four-way map can damage eight-way play, while a binding problem or unstable provider will not be fixed by reshaping the grid.

First-party sources

Related guides