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: Pulling my hair out - analog guns with Mame...help please!  (Read 1848 times)

0 Members and 1 Guest are viewing this topic.

jhuie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 33
  • Last login:April 10, 2013, 12:12:12 am
  • I want to build my own arcade controls!
Ok, I've been fighting with this for weeks now and I'm stumped.  I configured a Lucky & Wild cabinet with a U-HID device which acts as a gameport controller.  Each gun is set up with the pots wired to the U-HID.  Gun one x and y axis are mapped to the first two analog axis on the U-HID.  Gun 2 x and y axis are the next 2.  Both of them control the crosshairs and move properly.  Gun 2 is aligned properly "out of the box" after running through the windows adjustment program.  But Gun 1....and this is making me want to throw the whole thing out the window....Gun 1 won't align properly.  It's always off in some way.   The x direction is close...but the y axis is way off.   It will be way to high when I first configure it.  If I run the U-HID program that lets you change the scale and offset then I can sometimes get it closer.  But it will always be off.  Either I can't get the crosshairs to go all the way to the top or bottom.  Or it will be off from where the gun is actually pointing.  Generally, the crosshairs will move faster than the gun itself.  In Windows configuration it seems to work perfect and tracks along the edges of the square.  But not with the gun in Mame. 

I even thought the pot must be bad.  So I disassembled the front, removed the pot and threw a new one in there.  But it does the same thing.  Is there someone out there, anyone who has done this or had a similar problem?  Do you know someone who has done this?  I'm desperate!!!!

Thank you.

jhuie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 33
  • Last login:April 10, 2013, 12:12:12 am
  • I want to build my own arcade controls!
Re: Pulling my hair out - analog guns with Mame...help please!
« Reply #1 on: May 13, 2009, 12:05:49 pm »
Still no solution to this.  I guess I'm doomed to having gun1 shoot about an inch high and to the right of where I'm actually pointing the gun.

1UP

  • Token Junkie
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2081
  • Last login:November 11, 2014, 01:37:18 am
  • Yes, that is a joystick in my pocket.
    • 1UPArcade
Re: Pulling my hair out - analog guns with Mame...help please!
« Reply #2 on: May 13, 2009, 03:30:13 pm »
I just thought of something from back when I had a set of Terminator 2 guns.  I think I had a similar problem at some point, and I think it was resolved by adjusting the range of the pot.  If your guns are similar to the T2 guns, then there should be a geared lever on the bottom of the gun base.  This moves with the gun as it is turned and meshes with the gear on the x-axis pot.  There is a similar setup on the side of the gun base for the y-axis pot.

Check the numbers when you are calibrating.  If it doesn't read close to 0 in its minimum position, and close to 255 in its max, try this:  Aim the gun's plastic sights at the middle of the screen and hold it there (have someone else hold it if necessary.)  Loosen the nut on one of the the geared levers (the one that is the problem), and adjust it until that axis calibration reads about 128.  Tighten the nut.  Move the gun thru its range of motion and the numbers should change all the way through.  If you find a dead spot along one edge, you may need to readjust.  Just try to get it so there is a pretty consistent range of input with no major dead zones.

Hope this helps!

Free resource for building your own rotating control panels!

My other job...


Xiaou2

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4134
  • Last login:June 11, 2025, 11:55:17 pm
  • NOM NOM NOM
Re: Pulling my hair out - analog guns with Mame...help please!
« Reply #3 on: May 13, 2009, 07:19:59 pm »
You might also have a defective or worn pot... or the pot is the wrong type.

 There are linear and audio taper at radio shack.  I believe you want linear.
Where it goes like :  1,2,3,4,5,6,7,8,9...    instead of the other type which
is more like:  1,2,5,8,12,30,100...

jhuie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 33
  • Last login:April 10, 2013, 12:12:12 am
  • I want to build my own arcade controls!
Re: Pulling my hair out - analog guns with Mame...help please!
« Reply #4 on: May 15, 2009, 10:44:46 pm »
Thank you for the tips...still no go though.  The guns don't have adjustments like T2 does.  They are just set the way they are going to be set it appears.  And I already tried swapping out the pot.   The one that was in there previously appeared to be unmolested and I suspect it was the original.  The new one I put in seems to work exactly the same as the original.

1UP

  • Token Junkie
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2081
  • Last login:November 11, 2014, 01:37:18 am
  • Yes, that is a joystick in my pocket.
    • 1UPArcade
Re: Pulling my hair out - analog guns with Mame...help please!
« Reply #5 on: May 15, 2009, 11:22:55 pm »
Thank you for the tips...still no go though.  The guns don't have adjustments like T2 does.  They are just set the way they are going to be set it appears.  And I already tried swapping out the pot.   The one that was in there previously appeared to be unmolested and I suspect it was the original.  The new one I put in seems to work exactly the same as the original.

I think I made an error as well.  I believe the adjustment needed would be to the pots themselves, screwing off the nut around the pot and turning it to a different angle.  Don't know if that does you any good...it's been a few years since I had a set of analog guns in hand.

Free resource for building your own rotating control panels!

My other job...


jhuie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 33
  • Last login:April 10, 2013, 12:12:12 am
  • I want to build my own arcade controls!
Re: Pulling my hair out - analog guns with Mame...help please!
« Reply #6 on: May 16, 2009, 12:26:27 am »
I've tried that as well.  I've tried setting the pot near the middle, near either extreme and at random other locations with similar results.  It's odd that Gun #2 never required any adjustment at all and just worked after I calibrated it.  I'm starting to wonder if something is wrong with the U-HID or if I actually wired something wrong.  Except that it works....other than being way off positionally.

rusolinio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 70
  • Last login:December 14, 2010, 08:21:22 pm
Re: Pulling my hair out - analog guns with Mame...help please!
« Reply #7 on: May 16, 2009, 06:28:27 am »
Maybe another u-hid connected separately to the the other gun would work?


TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1912
  • Last login:October 22, 2024, 11:51:12 am
    • My Arcade (updated 1/30/13)
Re: Pulling my hair out - analog guns with Mame...help please!
« Reply #8 on: May 16, 2009, 11:44:13 am »
Have you tried swapping which gun is hooked up to which inputs on the uhid? If the problem stays with that particular gun, then it points to a problem with the gun. If it switches to the other gun, then the uhid would be suspect. At that point you ought to contact Andy at Ultimarc - he's really good with supporting his products.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

jhuie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 33
  • Last login:April 10, 2013, 12:12:12 am
  • I want to build my own arcade controls!
Re: Pulling my hair out - analog guns with Mame...help please!
« Reply #9 on: May 16, 2009, 12:20:07 pm »
Have you tried swapping which gun is hooked up to which inputs on the uhid? If the problem stays with that particular gun, then it points to a problem with the gun. If it switches to the other gun, then the uhid would be suspect. At that point you ought to contact Andy at Ultimarc - he's really good with supporting his products.

Good ideas.  I'll try swapping them and if I can't get it then I'll contact him and see what he says.  Thanks again.

jhuie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 33
  • Last login:April 10, 2013, 12:12:12 am
  • I want to build my own arcade controls!
Re: Pulling my hair out - analog guns with Mame...help please!
« Reply #10 on: May 17, 2009, 05:50:23 pm »
Ok, I got it working ....axis 1 and 2 simply aren't returning linear values under Windows.  They speed up near the edges which throws everything off.  I tried redefining Axis 1 and 2 to work under Axis 7 and 8 instead.  Then I calibrated and went back into Mame....and it works perfect now.  I have no idea why.  I ended up mapping my brake to the first axis instead since I'm not as concerned about it being linear.  And it's not.  But it works!  Both guns track very nicely.  I just played Terminator 2 and it was pretty cool.  Thank you all for the great tips.

John

jhuie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 33
  • Last login:April 10, 2013, 12:12:12 am
  • I want to build my own arcade controls!
Re: Pulling my hair out - analog guns with Mame...help please!
« Reply #11 on: May 18, 2009, 09:54:23 pm »
Ok, I'm just throwing this info on here in case anyone researches this later.  It might help out....on the U-HID device, apparently J1, J2 and J3 do not support analog devices.  Andy over at Ultimarc said this isn't clearly documented but that he will be updating the documentation to reflect that.  It's not a bug.  It's by design. 

By switching everything to J5 and J6 I solved the problem.  Once you know this, the U-HID is a great thing to work with.