MAME’s User Interface¶
Introduction¶
MAME provides a simple user interface for selecting the system and software to run and changing settings while running an emulated system. MAME’s user interface is designed to be usable with a keyboard, game controller, or pointing device, but will require a keyboard for initial configuration.
The default settings for the most important controls to know when running an emulated system, and the settings they correspond to in case you want to change them, are as follows:
- Scroll Lock, or Forward Delete on macOS (Toggle UI Controls)
For emulated systems with keyboard inputs, enable or disable UI controls. (MAME starts with UI controls disabled for systems with keyboard inputs unless the ui_active option is on.)
- Tab (Show/Hide Menu)
Show or hide the menu during emulation.
- Escape (UI Back and UI Cancel)
Return to the system selection menu, or exit if MAME was started with a system specified (from the command line or using an external front-end).
Configuring inputs¶
MAME needs a flexible input system to support the control schemes of the vast array of systems it emulates. In MAME, inputs that only have two distinct states, on and off or active and inactive, are called digital inputs, and all other inputs are called analog inputs, even if this is not strictly true (for example multi-position switches are called analog inputs in MAME).
To assign MAME’s user interface controls or the default inputs for all systems, select Input Settings from the main menu during emulation and then select Input Assignments (general) from the Input Settings menu, or select General Settings from the system selection menu and then select Input Assignments from the General Settings menu. From there, select a category.
To assign inputs for the currently running system, select Input Settings from the main menu during emulation and then select Input Assignments (this system) from the Input Settings menu. Inputs are grouped by device and sorted by type. You can move between devices with the next group and previous group keys/buttons (opening/closing brackets [ and ] on the keyboard by default).
The input assignment menus show the name of the emulated input or user interface control on the left, and the controls (or combination of controls) assigned to it on the right.
To adjust the sensitivity, auto-centre speed and inversion settings, or to see how emulated analog controls react to your inputs, select Input Settings from the main menu during emulation, and then select Analog Input Adjustments from the Input Settings Menu (this item only appears on the Input Settings menu for systems with analog controls).
Digital input settings¶
Each emulated digital input has a single assignment setting. For flexibility, MAME can combine controls (keys, buttons and joystick axes) using logical and, not and or operations. This is best illustrated with some examples:
- Kbd 1
In this simple case, pressing the 1 key on the keyboard activates the emulated input or user interface control.
- Kbd Down or Joy 1 Down
Pressing the down arrow on the keyboard or moving the first joystick down activates the emulated input or user interface control.
- Kbd P not Kbd Shift not Kbd Right Shift
Pressing the P key on the keyboard while not pressing either Shift key activates the emulated input or user interface control. MAME does not show the implicit and operations.
- Kbd P Kbd Shift or Kbd P Kbd Right Shift
Pressing the P key while also pressing either of the Shift keys activates the emulated input or user interface control. Once again, the implicit and operations are not shown.
(In technical terms, MAME uses Boolean sum of products logic to combine inputs.)
When a digital input setting is highlighted, the prompt below the menu shows whether selecting it will replace the current assignment or append an or operation to it. Press UI Left/Right before selecting the setting to switch between replacing the assignment or appending an or operation to it. Press UI Clear (Delete or Forward Delete by default) to clear the highlighted setting, or restore the default assignment if it is currently cleared.
When you select a digital input setting, MAME will wait for you to enter an input or a combination of inputs for a logical and operation:
Press a key or button or move an analog control once to add it to the and operation.
Press a key or button or move an analog control twice to add a not item to the and operation. Pressing the same key or button or moving the same analog control additional times toggles the not on and off.
Press UI Cancel (Escape by default) to leave the setting unchanged.
The new setting is shown below the menu. Wait one second after activating an input to accept the new setting.
Here’s how to produce some example settings:
- Kbd 1
Press the 1 key on the keyboard once, then wait one second to accept the setting.
- Kbd F12 Kbd Shift Keyboard Alt
Press the F12 key on the keyboard once, press the left Shift key once, press the left Alt key once, then wait one second to accept the setting.
- Kbd P not Kbd Shift not Kbd Right Shift
Press the P key on the keyboard once, press the left Shift key twice, press the right Shift key twice, then wait one second to accept the setting.
Analog input settings¶
Each emulated analog input has three assignment settings:
Use the axis setting to assign an analog axis to control the emulated analog input. The axis setting uses the name of the input with the suffix “Analog”. For example the axis setting for the steering wheel in Ridge Racer is called Steering Wheel Analog.
Use the increment setting assign a control (or combination of controls) to increase the value of the emulated analog input. The increment setting uses the name of the input with the suffix “Analog Inc”. For example the increment setting for the steering wheel in Ridge Racer is called Steering Wheel Analog Inc. This is a digital input setting – if an analog axis is assigned to it, MAME will not increase the emulated input value at a proportional speed.
Use the decrement setting assign a control (or combination of controls) to decrease the value of the emulated analog input. The decrement setting uses the name of the input with the suffix “Analog Dec”. For example the decrement setting for the steering wheel in Ridge Racer is called Steering Wheel Analog Dec. This is a digital input setting – if an analog axis is assigned to it, MAME will not decrease the emulated input value at a proportional speed.
The increment and decrement settings are most useful for controlling an emulated analog input using digital controls (for example keyboard keys, joystick buttons, or a directional pad). They are configured in the same way as emulated digital inputs (see above). It’s important that you don’t assign the same control to the axis setting as well as the increment and/or decrement settings for the same emulated input at the same time. For example if you assign Ridge Racer’s Steering Wheel Analog setting to the X axis of the left analog stick on your controller, you should not assign either the Steering Wheel Analog Inc or Steering Wheel Analog Dec setting to the X axis of the same analog stick.
You can assign one or more analog axes to the axis setting for an emulated analog input. When multiple axes are assigned to an axis setting, they will be added together, but absolute position controls will override relative position controls. For example suppose for Arkanoid you assign the Dial Analog axis setting to Mouse X or Joy 1 LSX or Joy 1 RSX on a mouse and Xbox-style controller. You will be able to control the paddle with the mouse or either analog stick, but the mouse will only take effect if both analog sticks are in the neutral position (centred) on the X axis. If either analog stick is not centred on the X axis, the mouse will have no effect, because a mouse is a relative position control while joysticks are absolute position controls.
For absolute position controls like joysticks and pedals, MAME allows you to assign either the full range of an axis or the range on one side of the neutral position (a half axis) to an axis setting. Assigning a half axis is usually used for pedals or other absolute inputs where the neutral position is at one end of the input range. For example suppose for Ridge Racer you assign the Brake Pedal Analog setting to the portion of a vertical joystick axis below the neutral position. If the joystick is at or above the neutral position vertically, the brake pedal will be released; if the joystick is below the neutral position vertically, the brake pedal will be applied proportionally. Half axes are displayed as the name of the axis followed by a plus or minus sign (+ or -). Plus refers to the portion of the axis below or to the right of the neutral position; minus refers to the portion of the axis above or to the left of the neutral position. For pedal or analog trigger controls, the active range is treated as being above the neutral position (the half axis indicated by a minus sign).
When keys or buttons are assigned to an axis setting, they conditionally enable analog controls assigned to the setting. This can be used in conjunction with an absolute position control to create a “sticky” control.
Here are some examples of some possible axis setting assignments, assuming an Xbox-style controller and a mouse are used:
- Joy 1 RSY
Use vertical movement of the right analog stick to control the emulated input.
- Mouse X or Joy 1 LT or Joy 1 RT Reverse
Use horizontal mouse movement, or the left and right triggers to control the emulated input. The right trigger is reversed so it acts in the opposite direction to the left trigger.
- Joy 1 LB Joy 1 LSX
Use horizontal movement of the left analog stick to control the emulated input, but only while holding the left shoulder button. If the left shoulder button is released while the left analog stick is not centred horizontally, the emulated input will hold its value until the left shoulder button is pressed again (a “sticky” control).
- not Joy 1 RB Joy 1 RSX or Joy 1 RB Joy 1 RSX Reverse
Use horizontal movement of the right analog stick to control the emulated input, but invert the control if the right shoulder button is held.
When you select an axis setting, MAME will wait for you to enter an input:
Move an analog control to assign it to the axis setting.
Press a key or button (or a combination of keys or buttons) before moving an analog control to conditionally enable the analog control.
When appending to a setting, if the last assigned control is an absolute position control, move the same control again to cycle between the full range of the axis, the portion of the axis on either side of the neutral position, and the full range of the axis reversed.
When appending to a setting, if the last assigned control is a relative position control, move the same control again to toggle reversing the direction of the control on or off.
When appending to a setting, move an analog control other than the last assigned control or press a key or button to add an or operation.
Pressing UI Cancel (Escape by default) leaves the setting unchanged.
The new setting is shown below the menu. Wait one second after moving an analog control to accept the new setting.
To adjust sensitivity, auto-centring speed and inversion settings for emulated analog inputs, or to see how they respond to controls with your settings, select Input Settings from the main menu during emulation, and then select Analog Input Adjustments from the Input Settings Menu. Settings for emulated analog inputs are grouped by device and sorted by type. You can move between devices with the next group and previous group keys/buttons (opening/closing brackets [ and ] on the keyboard by default). The state of the emulated analog inputs is shown below the menu, and reacts in real time. Press the On Screen Display key or button (the backtick/tilde key by default on a US ANSI QWERTY keyboard) to hide the menu to make it easier to test without changing settings. Press the same key or button to show the menu again.
Each emulated input has four settings on the Analog Controls menu:
The increment/decrement speed setting controls how fast the input value increases or decreases in response to the controls assigned to the increment/decrement settings.
The auto-centering speed setting controls how fast the input value returns to the neutral state when the controls assigned to the increment/decrement settings are released. Setting it to zero (0) will result in the value not automatically returning to the neutral position.
The reverse setting allows the direction of the emulated input’s response to controls to be inverted. This applies to controls assigned to the axis setting and the increment/decrement settings.
The sensitivity setting adjusts the input value’s response to the control assigned to the axis setting.
Use the UI left/right keys or buttons to adjust the highlighted setting. Selecting a setting or pressing the UI clear key/button (Forward Delete by default) restores its default value.
The units for the increment/decrement speed, auto-centering speed and sensitivity settings are tied to the driver/device implementation. The increment/decrement speed and auto-centering speed settings are also tied to the frame rate of the first emulated screen in the system. The response to controls assigned to the increment/decrement settings will change if the system changes the frame rate of this screen.