Aimtrak worked in AdvMame, now it doesn't.
I am having issues making an Aimtrack lightgun work, but it's not the usual problem.
I have just setup this, my first real cabinet. Pre-lightgun, everything works fine. All my arcade stuff was on Mame2003 at this point.
I unplugged the trackball, plugged in the gun, and started it up. After a bit of fiddling, everything worked as okay as you might reasonably expect.
I rebuilt my romset to 0.106, put some games in, pointed them at AdvMame 1.4, and everything started working GREAT. I played Duckhunt and Operation wolf for about an hour, then tried some other gun games, and they worked just fine in AdvMame.
So, being happy with the results, I shut it down, ran the wires to a more permanent location, plugged everything back in (in the same places, naturally), and now it's acting all kinds of wonky.
In Mame2003, it works just like it did before. Pretty okay, but not spectacular.
In AdvMame, the cursor doesn't move at all. It's getting input (because I can map the buttons and whatnot, which show up as j6:left and j6:right), but the crosshairs don't move.
I cat /dev/input/mouse0 and I can see it active.
I go back to Mame2003 and it works like it did before.
So I know it's got to be something with AdvMame.
Based on some older posts, I started trying to make tweaks to the .rc, but everything I did either did nothing or made it fail to launch.
At this point, I feel like it's just messing with me.
Any ideas how to get it back to working like a champ from this point?
BJRetro last edited by BJRetro
@Shandower do you think after you plugged everything back in again it might have gotten assigned to a different port? When I play my lightgun games so far it is only on the console version of my retropie so I just unplug all other controls except for the gun (here a wiimote / dolphin bar setup) so I know it won’t mess with the ports when I load up the system. When I have tried with other controllers plugged in, it messes up. Haven’t been brave enough to try on my bartop for fear of messing up the arcade sticks. Though when I get my Sinden Lightgun in, I will probably try at that point with the arcade. Other than that sorry I don’t have ideas.
@BJRetro Yeah, I thought about that, but no, that's not it. I specifically unplugged my trackball (which is the only other mouse device) to do the test, and that's still true - it's still unplugged just to take it out of the equation until this works again.
At this point, the lightgun is still /dev/input/mouse0, which (I assume) is why it still works in Mame2003.
After blowing out the AdvMame-1.4.rc and reinstalling the package for the fifth time, I got something - I don't know what - right. In AdvMame, the crosshairs started sort-of tracking, but it was FAR too sensitive.
I recalibrated the gun, guessing about where things went, and managed to get a semblance of tracking. At this point, I still had the issues of it being over sensitive, but after playing with the analog sensitivity and a couple more re-calibratings, I got it to work sloppily, rather like it does in Mame2003.
But it worked better than this, before!
So, after perusing the forums some more, I found mention of gunconf. I tracked that down, installed it, and the config utility works fine. Being able to calibrate on screen is much nicer, and inside gunconf, the gun works perfectly.
Back to AdvMame: I followed the gunconf instructions in setting the joystick type to event, mouse to none, and mapping the lightgun input to the joystick by USB-id. Unfortunately, AdvMame doesn't like that, and won't launch. The following shows up in the run command log:
Executing: /opt/retropie/emulators/advmame-1.4/bin/advmame "duckhunt" Invalid argument 'joystick[d209_1601_2,0,0]' for option 'input_map[p1_lightgunx]'. Invalid integer 'd209_1601_2'. Valid format is [-]joystick[JOYSTICK,STICK,AXE]/[-]mouse[MOUSE,AXE]/[-]joystick_ball[JOYSTICK,AXE].
I know the device ID is correct, from lsmod:
Bus 001 Device 011: ID d209:1601 Ultimarc
I feel like I'm close...
What a rollercoaster!
So I made some guesses on the joystick ID (above), and got advmame to start long enough to let me map controls. I pulled the trigger, and found it was showing up as j5. I wiggled the gun around, and it showed up as j4. Armed with that knowledge, I went back into advmame-1.4.rc and updated those lines.
Back into duck hunt and... SUCCESS! Sort of. I had movement, and it didn't drift, but it also was clearly moving in 4 directions. Like a joystick.
So I went back to gunconf, set the gun for mouse mode, and went back into AdvMame. Nothing worked (which I expected), but I was able to do that mapping trick and learn that both buttons and movement was showing up as j6. I made the appropriate changes to the rc file, and.. nothing.
Buuuuut, I did learn something about how the rc files works, so I decided to throw caution to the wind and make some changes.
I went back into the rc and set it up this way again:
device_mouse raw device_raw_mousedev /dev/input/mouse0 device_raw_mousedev /dev/input/mouse1 device_raw_mousedev /dev/input/mouse2 device_raw_mousedev /dev/input/mouse3 device_raw_mousetype ps2 device_raw_mousetype ps2 device_raw_mousetype ps2 device_raw_mousetype ps2
I set the lightgun mapping back to "auto", and fired up duckhunt again, and it was a QUALIFIED SUCCESS!
The lightgun is now working (as in, it moves in the right direction at the right time), but there is clearly a calibration and/or sensitivity issue. The gun functions inside a very small area, which I suspect is about the resolution of duckhunt, rather than the resolution of the monitor.
I attempted to calibrate inside of duckhunt, but that's a frustrating experience since the crosshairs bounce all over the place, and I can only guess where I'm supposed to be aiming. Hardly ideal for what I'm trying to make happen here.
I am going to re-calibrate in 4:3 using gunconf, and then play with the sensitivity settings to see if I can get it to match up.