Can't seem to get off-screen reload working on Mame32

I'm trying to play some light gun games on Mame and Mame32. I tried mame gamename -offscreen_reload -mouse, and that didn't work, even though the wiki faq specifically says that this is the way to make this possible. It's supposed to make Player 1 Button 2 an 'off-screen reload' button.

I tried with multiple roms.


Solution 1:

Offscreen reload is only an option if you're using a light gun - it overrides button 2 of the light gun to set the position of the gun off the edge of the screen and also counts as a "fire" operation.

The MAME manual describes it thus:

Controls whether or not MAME treats a second button input from a lightgun as a reload signal. In this case, MAME will report the gun's position as (0,MAX) with the trigger held, which is equivalent to an offscreen reload. This is only needed for games that required you to shoot offscreen to reload, and then only if your gun does not support off screen reloads. The default is OFF (-nooffscreen_reload).

I dug into the source of the input code, and found the section where it checks the offscreen_reload switch. It's only used when lightguns are used for input. The command line switch is mapped to a instance variable called "m_device.lightgun_reload_button" which is only checked if the input device is a lightgun. See src/input/emu.c for more details.

Therefore, this won't work with the mouse - you'll have to move the cursor to the edge of the screen and press FIRE, and this will only work if you're playing a game that supports offscreen reload (not all games had a "reload" function).

It seems like it might be possible to change the source to add a feature like you'd want, but that's something you'd probably want to ask the developers of MAME with assistance with.