I recently purchased an Aimtrac lightgun and I am having massive issues getting this to work in MAME running on Ubuntu.
I am using the latest build of MAME (0.224) and Ubuntu is running on a PC, not a Raspberry Pi or anything like that.
Using The Ubuntu Windows 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.
Any help, solutions or suggestions welcome as this is driving me mad!