-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Linux X11 Input: Fix lightgun support #4698
Conversation
SDL/X11 number mouse/lighgun buttons 1,2,3, while windows and other parts of MAME like offscreen_reload expect 0,2,1. Transpose buttons 2 and 3, and then -1 the button number to align the numbering schemes. This fixes lightgun support on Linux - tested with an Ultimarc AimTrak and the following config: lightgun 1 lightgun_device lightgun lightgunprovider x11 lightgun_index1 "Ultimarc Ultimarc" offscreen_reload 1 Note: MAME must be compiled with XInput support: make -j10 NO_USE_XINPUT=0 Fixes bug mamedev#4695
Some extra tips in case anyone finds this PR on how to get these AimTrack lightguns working on Linux: MAME Build:
mame.ini:
/etc/udev/rules.d/65-aimtrak.rules
/etc/X11/xorg.conf.d/60-aimtrak.conf
|
I let Andy (from Ultimarc..) know about the difficulty with multiple Aimtrak guns, looks like it's something they will fix in the next firmware. Likely, any firmware AFTER after 1.19 (or is 2.19 current? Not at my cab to check...) will have a fix that means you can just specify the device names for each, and not have to worry about the ever changing X11 ID numbers. NOTE: I say "likely" because they haven't committed to making the change... Just my guess given the response! |
Another PR for Linux lightguns - #4862 |
Note: The use of "Ultimarc Ultimarc" is specifically a bug according to the manufacturer. They initially released a patch to fix that but a particular arcade manufacturer had hard-coded it into their software (according to Andy). Ultimarc sent me a corrected firmware for the guns (9.21) that causes the guns to be uniquely identified as "Ultimarc ATAK Device #1" ... "Device #2", etc. This pretty much eliminates any weird workarounds or use of the XInput device ID # which is notoriously unstable. I know this has already been merged but they won't let me post in Reddit in the MAME group and wanted to leave this for posterity. |
SDL/X11 number mouse/lighgun buttons 1,2,3, while windows and other parts of
MAME like offscreen_reload expect 0,2,1. Transpose buttons 2 and 3, and then
-1 the button number to align the numbering schemes.
This fixes lightgun support on Linux - tested with an Ultimarc AimTrak and
the following config:
Note: MAME must be compiled with XInput support:
Fixes bug #4695
With these changes, Lightguns on linux are perfectly accurate (well, as accurate as the gun itself allows... I miss real lightguns ;))