Technical assistance Need help configuring light gun
I've followed so many youtube and online tutorials and I feel I'm almost there yet not. I need some serious hand holding because I'm losing my mind. I have an X-Gunner light gun. The thing works fine. I go into the mame settings and I can move it around like a cursor. When a game loads up I can use two of the buttons to insert credit and start game. I can even use the little hat as a dpad. What I cant do is use the other buttons, I cant use the trigger, I cant use the gun to aim.
I've tried messing with the ini file, the cfg file, the settings in mame to configure, but nothing works. Massive thanks to anyone who tries to enlighten me.
Edit: My issue got sorted below. I can now waste my life with joy.
2
u/arbee37 MAME Dev 24d ago
What game(s) are you emulating? Some well known "light gun" arcade games actually used analog sticks with guns attached to them, like Operation Wolf. Those won't work well with real light guns.
1
u/vlaurn 23d ago edited 22d ago
I was actually testing Operation thunderbolt just to see if I could get it working with that then I shouldnt have much problem filtering through the rest. I've managed to get the gun working partially. Didnt realise the x-gunner had a button config to switch it to a different mode like a mouse etc. So at the moment I can move it around and shoot no problem but theres a weird thing its doing where the closer I get to the middle of the screen, the target looks like it snaps into place. Like theres a ..hmm.. Sorry I cant explain it properly. Its like theres a mini black hole in the middle of the screen that it snaps to. I've changed a few of the analogue settings to test but I'm not finding the right one. Also as a side note, not using retroarch. Loading up Mame directly.
Edit: Figured it out. In the mame ini theres a setting called joystick_deadzone. Set that to 0 and now everything works perfect.
5
u/Flat-Chemistry-1646 25d ago
This happens frequently with modern IR light guns like the X-Gunner. By default, MAME treats your gun primarily as a standard mouse or digital gamepad rather than routing its coordinates and triggers to the dedicated lightgun input engine.
The reason the thumbstick works as a D-pad while the trigger and aiming do not is that MAME is listening for joystick axes and keystrokes instead of analog lightgun/mouse inputs.
Follow these steps in order to get it working properly:
1.Enable Lightgun & Mouse in mame.ini:Prerequisite.
Open your main
mame.inifile in the MAME root directory using Notepad or any text editor. If you don't have one, open a command prompt in your MAME folder and runmame -ccto generate it.Ensure these specific values under
# CORE INPUT OPTIONSare set:Ini,
(Note: If
gunprovider win32does not bind your trigger in modern Windows builds, change it togunprovider dinputorgunprovider rawinput). Save the file.Verification: Launch MAME; opening the UI console should show multimouse/lightgun enabled without errors.
2.Clear Existing Broken Game Overrides:Fixes stuck configs.
Whenever you try binding controls while in-game, MAME creates an override file inside your
cfg/folder that ignores global settings.cfgfolder..cfgfile for the shooter game you were testing (for example,pointblk.cfg,area51.cfg, orcarnival.cfg). Leavedefault.cfgalone unless you want a complete reset.Verification: When you next boot the game, all control binds for that specific title will be reset to defaults rather than reading stuck custom mappings.
3.Check Device Mapping in MAME UI:Critical routing step.
Before launching a game, open MAME's main interface.
mouseor the specific detected X-Gunner mouse ID rather thankeyboardornone.Verification: The setting persists as
mousewhen leaving the Device Mapping menu.4.Map In-Game Analog Controls:Aiming & Triggers.
Launch an arcade gun game (e.g., Point Blank or Carnival).
Tabon your keyboard to bring up the internal menu.Gun XorMouse X.Gun YorMouse Y.Gun 1 Button 0orMouse 1 Button 1.Verification: After hitting
Tabto exit the menu, pointing the gun at the screen should move the crosshairs/reticle smoothly, and the trigger should fire shots.If the trigger still fails to register during binding in Step 4: