The autofire plugin allows you to simulate repeatedly pressing an emulated button by holding down a key or button combination. This can help people with certain disabilities or injuries play shooting games, and may help reduce the risk of repetitive strain injuries (or keyboard damage).
To configure the autofire plugin, activate the main menu (press Tab during emulation by default), select Plugin Options, and then select Autofire. Configured autofire buttons for the current system are listed, along with their repetition rates and activation hotkeys (initially there will be no autofire buttons configured). Select an autofire button to change settings, or choose Add autofire button to set up a new autofire button. See Autofire buttons settings for details on setting up an autofire button. You can delete an autofire button by highlighting it in the menu and pressing the UI Clear key (Del/Delete/Forward Delete on the keyboard by default).
Autofire settings are saved in the autofire folder in the plugin data
folder (see the homepath option). A file is
created for each system with autofire buttons configured, named according to the
system’s short name (or ROM set name), with the extension
example, autofire settings for Super-X will be saved in the file superx.cfg
in the autofire folder in your plugin data folder. The autofire settings
are stored in JSON format.
Notes and potential pitfalls¶
Autofire buttons act as if they’re wired in parallel with MAME’s regular controls. This means that if you set the activation hotkey for an autofire button to a button or key that’s also assigned to one of the emulated inputs directly, you may get unexpected results. Using Gradius as an example:
Suppose you set button 1 on your controller to fire, and set an autofire hotkey to button 1 as well. Holding the button down to shoot will not trigger the autofire effect: the button will never be released as you’re holding the non-autofire button 1 down. This will also happen if you set a different button as autofire (say, button 3 in this case), and hold button 1 down while also pressing button 3.
If you set button 3 on your controller to autofire and assign button 3 to powerup as well, you will trigger the powerup action every time you grab a powerup because the powerup button is also being held down along with the autofire button.
It is recommended that you choose control combinations for autofire hotkeys that are not assigned to any other emulated inputs in the system.
Autofire is not necessarily desirable in all situations. For example using autofire in Super-X with the blue “lightning” weapon equipped at high power levels will only produce a single beam, greatly reducing the weapon’s effectiveness. The fire button must be held down to produce all beams. Some shooting games (e.g. Raiden Fighters) require the primary fire button to be held down for a charged special attack. This means it’s often necessary to have a non-autofire input for the primary fire button assigned to play effectively.