Join GitHub today
Add plugin for autofire #5050
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:
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.
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.