The NEW Build Your Own Arcade Controls

Software Support => GroovyMAME => Topic started by: Dochartaigh on December 10, 2018, 01:00:48 pm

Title: AimTrak light gun keeps disconnecting, constantly
Post by: Dochartaigh on December 10, 2018, 01:00:48 pm
I bought an AimTrak light gun to use with GroovyMAME (MAME 0.200) on my 15khz CRT. I'm running Windows 10, all up to date, on a pretty much brand new mini-ATX computer build. I've been using every bit of spare time for over two months now!!! to get this to work and no matter what, I can't get it to work for longer than 5 minutes, maybe 15 minutes max, then the crosshairs disappear on screen so I can't aim, although I can still press the trigger and it'll fire. Sometimes if I exit from GroovyMAME and unplug and re-plug the gun in it'll work again.

I've been working with arcadeusa127 on eBay who I bought this from, and then he introduced me to Andy at AimTrak (both REALLY excellent, helpful, and super nice guys), and neither can figure it out. I've tried all the regular things like making sure I use USB 2.0 ports (and tried the 6x or so 3.0 ports as well) to compensate for the longer cord length. They even sent me a brand new cable + chip for the gun which I installed - same thing happens on that as well. Think when I first got it I tried a powered USB hub as well. Only thing we haven't replaced is the IR bar (which shows as being lit when I look at it through my camera, and I use for Wii all the time just fine for hours).

I've had no problem on this computer with USB ports, and they have run every keyboard, mouse, personal cooling fans, LED lights, external hard drives, CD/DVD burners, USB fightsticks, etc. etc. etc. from any of the USB ports, so I really don't think the ports are bad (it's an ASRock H270M-ITX/ac Mini ITX Motherboard if that matters - no USB MB drivers needed for this from what I can tell fyi).

Andy says there's approximately 1000+ people using these on Windows 10 so I really don't know what else to look into...and to my knowledge there's NO other light gun I can even attempt to use with GroovyMAME on a Windows 10 PC, right? So it's not like there's any other options so I really, really, REALLY don't want to give up on this project as that means I'll never be able to play light gun games (without a crappy regular mouse) unless I start my own home arcade with original cabinets (which isn't an option, sadly ;)

For some more background I used to think this was a USB driver problem, even though the AimTrak uses Windows 10 standard/default mouse drivers. I was on occasion hearing the chime Windows 10 plays to tell you a new driver was loaded, or a USB device was unplugged - I can't confirm this as I always turn on the 4x wireless Xbox 360 fightsticks before I start MAME, and it could very well have been those timing out and turning off (they have a battery save mode or whatnot)...but I do know that many times, right after hearing that chime, the light gun would stop working (other times it still worked, or I didn't hear that chime so I really have no clue...just mentioning it just in case it helps diagnose).

Does anybody have any suggestions? I don't have another PC to test unless I boot one of my Mac's into Bootcamp mode and do a new installation on those (which would be on a LCD/Flatscreen).

Title: Re: AimTrak light gun keeps disconnecting, constantly
Post by: Calamity on December 10, 2018, 01:08:48 pm
The first logical test is to run baseline MAME in fullscreen mode: use -switchres -resolution ...x...@.. (check which resolution GM sets and use the same).
Title: Re: AimTrak light gun keeps disconnecting, constantly
Post by: Dochartaigh on December 10, 2018, 03:23:59 pm
The first logical test is to run baseline MAME in fullscreen mode: use -switchres -resolution ...x...@.. (check which resolution GM sets and use the same).

Do you mean to run it on the CRT like I've been running it? Or run it on the LCD (which is also hooked up - although MAME is set to run on DISPLAY2 which is the 15khz CRT). It always runs fullscreen, never windowed.

How do I check GM's resolution so I can set it to the same when I run this from command line? Majority of games I play (quasi-guessing here) should be around 320x240 i.e. 240p. But I think the MAME GUI launcher (I'm using the stock/default one - no aftermarket front end is installed) I think runs at the larger resolution of 640x480 (480i?) - both at 60Hz I assume.

So I would open Command Prompt, 'cd /mame' and type (mame64.exe is the file I run for GroovyMAME): 'mame64 -switchres -resolution 640x480@320'? Then see if the light gun works properly, for a long period of time? Does this bypass all the changes (really not many) I've made to the different mame config files, and the premise of this test is to give us a baseline if something in those configs is messing up the Aimtrak or whatnot? Thanks.

Oh, I also just saw in your sig about making a log - would it help to try that and see if it clues in anything about what happens a couple minutes into using the light gun? So (and please correct me if I'm wrong - I'm new to running mame via command line with these different options still): ''mame64 -switchres -resolution 640x480@320 -v romname >romname.txt'?
Title: Re: AimTrak light gun keeps disconnecting, constantly
Post by: Calamity on December 10, 2018, 04:25:50 pm
The resolution chosen by GM is always shown in the information screen, next the "Switchres:" caption, provided you're using the "official" build instead of one of the no-nag enhanced ones.

So in order to run baseline MAME on your CRT you'd type something like:

mame64.exe gamename -switchres -resolution 320x240@60 -screen \\.\DISPLAY2

If you're going to try that, it would be interesting to try launching GM (additionaly to baseline) also from command line, instead from its ui, like this:

mame64.exe gamename

This is in order to check if the switching from ui to game and backwards has any side effect.




Title: Re: AimTrak light gun keeps disconnecting, constantly
Post by: Dochartaigh on December 11, 2018, 04:51:19 pm
I will try those and report back - thanks.
Title: Re: AimTrak light gun keeps disconnecting, constantly
Post by: Dochartaigh on December 15, 2018, 04:02:20 pm
I ran:

mame64 area51 (and Alien 3: The Gun, and Time Crisis)  -switchres -resolution 640x480@60 -screen \\.\DISPLAY1

And the Aimtrak worked for the entire 40+ minutes I ran it for (probably two hours total last night)! I then loaded up just "mame64" like I've been doing for OVER TWO MONTHS NOW (launching into the regular/default mame GUI), and again, it seemed to work perfectly fine...which makes no sense to me. I've been trying this for literally (no exaggeration) dozens of hours now and never had it work properly before (beyond maybe 15 minutes max). Did that initial command line I ran change something, permanently, which is why this now works? I literally turned on the computer for the first time since I posted last week - hasn't been used since.

Some observations and notes:



So to end I'm just trying to figure out why it worked this time around. Computer was off all week. No changes were made - a wire wasn't even unplugged/plugged back in or anything. I've been trying this for literally two months now trying every hint of a fix online (even rebuilding the gun with new parts). I honestly don't think running a game from command line with those couple "-switchres -resolution" parameters would fix anything - but please let me know as I really don't totally understand how everything works quite yet - and thank you for the help!
Title: Re: AimTrak light gun keeps disconnecting, constantly
Post by: cools on December 17, 2018, 09:34:18 am
I'm running Windows 10

There's your problem. It's terrible. I have multiple USB devices connected to my work laptop that don't work when I cold/reboot, after windows has started I have to uninstall and reinstall the device to get them going. Modern devices using Microsoft signed drivers.

  • After the first successful test, I did reboot, where it did need to do a Windows update. Updates are setup to run in the background, and some need a reboot. I'm only mentioning this because it's the ONLY thing which was different than last weekend (again, the computer has been turned off since last week). If the (partial at first since I hadn't rebooted yet) Windows update fixed this...that would be a very strange coincidence.

Not at all strange. Keep repeating: Windows 10 is terrible.