I recently purchased an Aimtrac lightgun and I am having massive issues getting this to work in MAME running on Ubuntu (20.04).
I am using the latest build of MAME (0.225) and Ubuntu is running on a PC, not a Raspberry Pi or anything like that.
Using The Ubuntu desktop The gun works as a mouse. Other than it's not very accurate, because the calibration utility doesn't work, it works fine.
In MAME itself, if I press TAB to go to the controller options, that sees it as Mouse1, which exactly how it picks up my trackball, which works perfectly in gun games and also my Spinner.
However, the only thing that isn't right with this is, when configuring mouse devices, depending on what way you move the device, you get mouse X or Mouse Y. With the Aimtrac, Whatever way I move the gun I get Mouse X & Y at the same time.
I'm guessing, as a result of this, when I try to use the Aimtrac in a game, as soon as you bring the gun into view of the sensor, it just drops the crosshair into the bottom right hand corner of the screen and will not move.
If you take the gun out of sight of the sensor, you can move the crosshairs with the spinner or the trackball no problem.
The other thing I've found is, I'm using EmulationStation as part of RetroPie, so even though I'm not using it, I have LR-Mame installed. If I open up a shooting game with LR-MAME2016 instead of standard MAME, the gun works! However, my spinner doesn't.
I've tried following the steps under 'using a lightgun in Linux' in the official MAME documentation, but that didn't resolve the issue. In fact it introduced some new problems, for example disabling the buttons on my Ultimarc Ultimate IO controller.
A friend of mine also has two of these guns running on a similar set up, but using Debian rather than Ubuntu and they are getting exactly the same problems as me.
I have spoken to Andy at Ultimarc about this and he wasn't able to offer up any solutions other than giving me a link to an updated version of the Linux config utility, which still does not work.
Any help, solutions or suggestions welcome as this is driving me mad.
Apologies if this is something that has already been covered, but the forum search function does not seem to work,