Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Usb2Gun with Mame  (Read 3676 times)

0 Members and 1 Guest are viewing this topic.

maffewl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 115
  • Last login:June 05, 2020, 03:11:44 pm
Usb2Gun with Mame
« on: September 27, 2015, 08:26:50 pm »
Hey all, I have a question about interfacing Usb2Gun with Mame.  I've been in conversation with user Jollywest (who has been a great help) and have a PM into him as well, but thought I would just post a general topic as well, just in case others may be experiencing the same troubles.

I have a Usb2Gun board and am trying to set up the guns in Mame.  I have connected everything and can get the trigger to register and have the screen flash white, but the shots remain in the same location.  I.e. if I pull the trigger, it just registers a center shot over and over, so there is no movement with where the gun is actually pointing.  I have changed the settings per Jollywest's recommendation in the topic http://forum.arcadecontrols.com/index.php/topic,138723.0.html.  The gun appears to register as "joystick 1" similar to Jollywest's experience.

Any thoughts would be appreciated.

Jollywest

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 288
  • Last login:Today at 05:26:17 pm
Re: Usb2Gun with Mame
« Reply #1 on: September 28, 2015, 05:34:30 am »
I've replied to your PM

jimmy1810

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:June 01, 2020, 09:18:39 am
  • I want to build my own arcade controls!
Re: Usb2Gun with Mame
« Reply #2 on: May 10, 2020, 05:05:41 pm »
I know this is an ancient thread but see that some of the users are still active

@JollyWest @maffewl

I managed to pick up a used USB2GUN and some happ guns but have the same issue maffewl was facing. Windows calibration again registers trigger presses and screen flashes but nothing on X Y calibration.
If anyone else has experienced this please could someone help point me in the right direction?

Jollywest

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 288
  • Last login:Today at 05:26:17 pm
Re: Usb2Gun with Mame
« Reply #3 on: May 12, 2020, 03:14:42 am »
Hi, I've sent you all the PM's that I originally sent to Maffewl.

P.H.U.

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 219
  • Last login:April 29, 2023, 01:25:21 am
  • I own my own arcade machines. Word.
Re: Usb2Gun with Mame
« Reply #4 on: July 21, 2020, 02:30:50 am »
Hi, I've sent you all the PM's that I originally sent to Maffewl.

Please send me the details of that same PM as well Jollywest.

One other question, there are two USB2Gun boards. The one with the JAMMA edge connector and the one without the edge connector. Aside from the edge connector, I'd imagine both are the same functionally? The JAMMA edge connector version can still handle 31khz?
When you find great deals on Craigslist for CRT based cabs, exuberance :laugh2: can be a bad thing!


Current Status of Cabs:  2-of-11 (and counting) working as desired  :applaud: :applaud:/:banghead: :banghead::banghead::banghead::banghead::banghead::banghead::banghead::banghead:

Jollywest

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 288
  • Last login:Today at 05:26:17 pm
Re: Usb2Gun with Mame
« Reply #5 on: July 21, 2020, 05:23:39 am »
Not sure if anyone has used the usb2gun w/jamma edge connector with windows but member purpletophat is currently setting one up, so should be able to confirm either way at some point. It has the same connections as the normal usb2gun (other than the extra jamma edge connector), so it should work the same, including 31khz capability.

PM details here;
Matt, finally got a chance to work on the Usb2Gun today... I followed your referenced post and am able to get the trigger to activate a shot, but it is just center screen.  No movement, and no off screen reload (though it is turned on in the Mame.ini as you suggested).  How do I make the shot register where I am pointing the gun?  It seems that in the "input" for the game, that it is still associated with the mouse and not the joystick.  Could this be it, and if so, any ideas on how to adjust? 

Also, as a second note, only player one of the guns is working through Usb2Gun.  I tried switching the guns to make sure it wasn't a gun problem, and both guns work.  So essentially only one of the guns (1 player) will flash the screen and register a shot when the trigger is pulled.  Is there a setting in Usb2Gun to turn on the other gun?

Again, thanks for the help!

Have you calibrated the guns in Windows?... 'Game controller settings' somewhere in the control panel, depending on Windows version.

This is key to all the trouble your having because it will also tell how many guns are connected, show you the gun movement in a test box and which buttons are being pressed as well.

Matt.

Hey Matt.  I just tried the calibrate option of the game controllers in the control panel.  It shows 2 guns connected and counts them as joysticks.  Since that's the case, I couldn't get them to calibrate (or more appropriately, I don't know how).  It asked me to leave the joystick in the center and press the button.  Then it said to hold the button and move the joystick around the screen.  Treating the gun like a joystick, I tried several options of trying to shoot the center of the screen, then holding the trigger and moving it around the screen, and etc.  No luck.  Any ideas?

That's how Windows sees the guns, as anolog joysticks.
In the calibration tab, When it says to press a button, aim at the centre of the screen and pull the trigger.
Then when it says to move the stick, aim the gun at the top left corner of screen, move the gun aim along the top edge of the screen to the top right corner of screen, then down the side to the bottom right, along the bottom to the bottom left corner and back up to the top left.
Basically going all the way around the edge of your screen, do this about 10 times.
Then aim at the centre again and pull trigger, twice I think.
Do this for both guns in their own calibration tab.
Then check the movement of the gun on screen correlates to the movement of the cross in the test box.
It's essential that the guns are calibrated in Windows for them to work properly.
Just to check but are you using a CRT screen?

Matt.

Excellent... I would have never thought to run around the edge of the screen as you suggest.  I'll try when I get home tonight.  And just to check, when I'm running the gun along the edges of the screen, am I holding the trigger down... or pulling the trigger in the upper left, then releasing and moving to the right corner and pulling the trigger and releasing, or...?  I guess really the question is how am I to operate the trigger when moving along the edges of the screen?

And, yes, I have one of the "newer" crt televisions that have a flat screen (not lcd) on the front right before the switch to flat screen wall mountable.

Thanks again for all the help!

Only press the trigger once, when you aim at the centre and release.
Don't press the trigger at all when aiming the gun around the edge.
When calibrating, you want to be stood somewhere around where you are going to play the game from as well.
When you've ran the gun around the edge 10 times, aim at the centre again, press the trigger and release.
Press the trigger again when aiming at centre and release, to finish calibration.

Matt.

It's been a while since I setup this up, so was difficult to remember but the video has jogged a memory or two.
I think I know the issue though now.

The guns movement only registers on bright parts of the screen, this is fine once the gun is calibrated because the gun sends a white flash to register shots where the gun is aiming.
However for calibration there is no gun flash to register movement.

Before calibration I set my desktop wallpaper to white, from the video your running the gun around the black desktop wallpaper edge.
Also for extra accuracy I created a white desktop wallpaper image in paint and drew two diagonal lines on it, one from top left corner to bottom right corner and one from top right corner to bottom left corner. Where they cross gives you your centre to shoot at on starting and finishing calibration. You'll have to minimize the open folders/windows on the desktop and move the calibration screen to one side.

Matt.


This thread also has some calibration info in it; http://forum.arcadecontrols.com/index.php?topic=161225.0
Original project is in my signature.

P.H.U.

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 219
  • Last login:April 29, 2023, 01:25:21 am
  • I own my own arcade machines. Word.
Re: Usb2Gun with Mame
« Reply #6 on: July 21, 2020, 10:09:31 pm »
Not sure if anyone has used the usb2gun w/jamma edge connector with windows but member purpletophat is currently setting one up, so should be able to confirm either way at some point. It has the same connections as the normal usb2gun (other than the extra jamma edge connector), so it should work the same, including 31khz capability.

PM details here;

Thanks. I have both versions of the USB2Gun boards and will end up keep just one. Leaning on keeping the one with the edge connector. We will see how that goes. Might have an opportunity to compare both at some point. I have everthing from America's Army except for the cab and the monitor.
When you find great deals on Craigslist for CRT based cabs, exuberance :laugh2: can be a bad thing!


Current Status of Cabs:  2-of-11 (and counting) working as desired  :applaud: :applaud:/:banghead: :banghead::banghead::banghead::banghead::banghead::banghead::banghead::banghead: