FAQ:Controls
Return to the main Frequently Asked Questions page.
What control devices does MAME support?
MAME supports three basic classes of controllers:
- Keyboard type
- standard keyboards
- key encoders
- some joy-to-key software
- Mouse type
- mice
- trackballs
- spinners
- Act-Labs USB Light Guns
- Joystick type
- joysticks
- joypads / gamepads
- console pads via most USB adapters
- steering wheels
- any DirectInput-visible gaming controller that has digital buttons or analog axes
Please note that most of MAME's controls are set up for development purposes, which means that most games will work fine with just some form of keyboard control. If you wish to use fancier control schemes, you will probably need to configure them within MAME to your liking.
How do I configure the keys?
Press Tab in-game and choose "Input: This Game". Select the input you want to configure, press Enter followed by the key you want it mapped to.
More fancy key combinations can be made. To map this key OR that key, set one of the keys as before, wait until MAME accepts it, then repeat for second key. To map so two keys have to be pressed at the same time, press both (or more) keys (or press them with a second of each other) after pressing enter. To map a NOT (key1 only if key2 is not also pressed), enter, press first key, then quickly press the second key(s) twice.
"Input: General" can be selected to change all games inputs, and MAME's UI buttons.
This remapping will also work for joystick or mouse inputs if joystick or mouse support is enabled (see below).
Why doesn't the Tab key work anymore?
Most likely you have re-configured the "UI Configure" key, normally Tab, to something else. To restore the default settings, the quickest way is to delete the default.cfg file from the cfg/ subdirectory below the main MAME directory. However this will remove any other general input changes, too.
If you have settings you don't want to lose, you can also edit default.cfg with any text editor, since the input configuration files are in XML format. Open the default.cfg file and find the line that says <port type="UI_CONFIGURE">
. Delete that line and all the lines down to and including the next </port>
line; this should be five lines. Save the file.
How can I change what axes the mouse and joystick control?
Press Tab in-game and select "Input: This Game". From there, you can assign inputs much the same way as changing keys. Additionally, in the menu, there is the option Analog Controls, where you can reverse the Axis. Also see What's the differences between "...analog", "...inc", and "...dec" lines seen when changing inputs? if changing analog inputs.
Mouse control is too sensitive / not sensitive enough.
Try increasing the acceleration and sensitivity settings in the Analog Input settings menu after pressing Tab. You might also want to try adjusting the mouse settings inside the Windows Control Panel (Start -> Settings -> Control Panel -> Mouse).
Why doesn't my joystick work?
There can be several reasons for this:
- The most common reason is that Mame disables joysticks by default. In your MAME.ini file, look for the "joystick" line reading "joystick 0"; simply change it to joystick 1. If this does not work, try the following:
- If your joystick or game controller came with a device driver, you may need to install it first. To do this, refer to the documentation that came with the joystick or joypad itself.
- Open the Windows Control Panel (Start -> Settings -> Control Panel) and double click the "joysticks" or "game controllers" icon. See if your controller is recognized there. If it is, proceed further. If not, you may need to add it there, or you may have a problem with the joystick or controller itself, or its device driver.
- In MAME, try pressing "Tab" and choose "Input: This Game" and make sure that the game's inputs are mapped with the appropriate joystick inputs. If not, see #How do I configure the keys? for remapping the buttons and digital axes, and #How can I change what axes the mouse and joystick control? for mapping analog joystick axes to analog game axes.
- Effective on the release of MAME 0.161, Directinput 7 was deprecated and the default for Windows builds is DirectInput 8. This has caused some controllers supported by programs such as PPJOY to no longer function in MAME. Currently the only way to fix this is to obtain the official source package and compile tools and make your own build, adjusting the line in the makefile which shows: DIRECTINPUT = 8 and changing this back to 7.
Why doesn't my mouse or trackball work?
Basically the same as joysticks:
- The most common solution is, in mame.ini, replace "mouse 0" with mouse 1.
- For the mouse to work in MAME, it has to work in windows. So if it doesn't work in Windows (ie. doesn't more the mouse pointer), fix this first as this isn't a MAME problem. However, some virtual mice that work in windows won't work in MAME; MAME is currently using RawInput for mouse and keyboard inputs in Windows XP & Vista, and if the virtual mouse driver isn't RawInput compatible, it won't work in MAME.
- In MAME, try pressing "Tab" and choose "Input: This Game" and make sure that the game's inputs are mapped with the appropriate mouse inputs. If not, see #How do I configure the keys? for remapping the buttons, and How can I change what axes the mouse and joystick control? for mapping the mouse axes to analog game axes.
The arrow keys work, but I can't fire, jump, etc.
Here are the default controller buttons for many games:
- 5 - Insert Coin
- 1 - Start
- Arrows - Move
- Ctrl - Action Button 1
- Alt - Action Button 2
- Space - Action Button 3
- Mouse - Analog Control (needed for some games)
- P - Pause
- ESC - Quit MAME
- F2 - Service Mode
- Tab - MAME Options Menu
Note: There are many games with much more complex controls. If you need to see or change a games controls, press Tab and choose "Input: This Game".
TRON's arm doesn't move; I can't aim in Heavy Barrel, etc.
Often, these games use analog control, which by default is mapped to the mouse.
When playing Star Wars (or other games) with a mouse, the crosshair moves in the wrong direction.
These games were played with a Yoke originally, so that this is correct. In MAME, you can press Tab while playing, and choose "Analog Controls" and reverse the axis to correct this.
I don't remember how to control this game.
You can press Tab and choose "Input: This Game" and review its inputs. Additionally, you can go to http://www.gamefaqs.com and see if there is an FAQ available for the game.
What if I only want authentic arcade controls?
There are several high-quality control panels available. The first one, and now the most basic, is the Hanaho Games HotRod. It's been joined by the X-Arcade, which is also relatively basic but can be used with many popular home consoles in addition to computers, and the insanely customizable SlikStik.
It's also possible to build your own: you can get plans, guidance, and support at Build Your Own Arcade Controls.
What's the differences between "...analog", "...inc", and "...dec" lines seen when changing inputs?
When MAME emulates an analog input in a game, three lines show up in the change input UI menu, unlike the one line for each digital switch like a button. The "...analog" line is for analog controllers, such as analog joysticks, mice and lightguns. The "...inc" and "...dec" lines are so digital controls, such as keyboard or joystick buttons, can be used to control analog input games.
For best control, map a controller's analog axis at the "...analog" line, and not the "...inc" or "...dec" lines; the axis direction should be set in the Analog Controls UI menu.