Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin for autofire #5050

merged 11 commits into from May 14, 2019


None yet
3 participants
Copy link

commented May 13, 2019

This is a plugin I wrote to provide autofire/turbo functionality in MAME. MAME already has a built-in autofire feature accessed through the cheats menu, but this implementation contains extra features/flexibility, including:

  • Saving and loading autofire settings (saves a config file per rom so autofire settings will be remembered the next time you load the rom)
  • Separate buttons for autofire and non-autofire
  • Individual autofire rates per button (e.g. one button for 30 Hz autofire and another for 15 Hz). The number of frames to hold the button and the number of frames to release the button are individually customizable.

Note: One potential point of confusion is that the autofire keybindings are managed in the menu provided by the plugin, separate from the regular input menu. It's possible to assign an autofire button to the same key as its non-autofire equivalent, in which case holding the key will cause the non-autofire button to win out and you won't get autofire.


This comment has been minimized.

Copy link

commented May 13, 2019

fwiw I suggested the community do this, as it seems a logical thing to be doing with the plugin system, so I'm glad to see a PR for this that can be built on / tuned further. I'm sure the bumps (such as the keymapping thing mentioned) can be ironed out in the future with improvements to the system.

the old autofire is part of the legacy cheat system, which has also been superseded by a lua plugin so this is a step in the right direction for this kind of additional feature; it also paves the way for people to do macro input stuff ('command list' recorders etc. typically used on fighting games), which again people have asked for in the past because other builds do it, but really belongs in a plugin.

doing things like this as plugins makes a lot of sense, because it allows for a greater number of options without bloating up the core IO code; for example there are some games where autofire works best by alternating 2 fire buttons (allowing firing every frame instead of every other frame) and while it would be ugly to try and code such logic into the core it's a perfectly valid thing to code into a plugin.

@ajrhacker ajrhacker merged commit 0040650 into mamedev:master May 14, 2019

1 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
continuous-integration/travis-ci/pr The Travis CI build failed
continuous-integration/tea the build was successful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.