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: LA Machineguns - mame'd!!!!  (Read 2984 times)

0 Members and 1 Guest are viewing this topic.

brentglov

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:August 02, 2024, 01:58:29 am
  • I want to build my own arcade controls!
LA Machineguns - mame'd!!!!
« on: June 12, 2020, 08:46:24 am »
Hi All

First post here.
I have a LA Machineguns cab with the positional guns (pot controlled).  Fully functional but I wanted to expand it with more games.
So...I am sypmathetically making it into a multi game gun cab.

I purchased an apac board and traced the guns back to the connector boards at the rear of the machine
VCC
GND
X Channel
Y channel.

The apac has:
GND
Left
Right
Up Down

I went directly from the pots in the gun to test and I can get it working as joystick in the control panel but...it only jumps from corner to corner - there is no (and i am not sure if there should be) smooth movement along the x and y axis when I move the gun around just corner to corner jump.

I tried it out in mame and its the same thing.

Am I missing something simple here - i understood the apac automatically detected potentiometers and behaved accordingly.
To test, I wired in another standard pot and it behaved the same.
Obviously as I have everything else wired up at the rear of the machine I would rather wire the apac from the connectors there but am at a loss how to wire a single X and Y channel into 4 channels.

Can anyone shed any light on this please

Thanks
Brent





PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 04:29:13 pm
  • Designated spam hunter
Re: LA Machineguns - mame'd!!!!
« Reply #1 on: June 12, 2020, 10:11:14 am »
I went directly from the pots in the gun to test and I can get it working as joystick in the control panel but...it only jumps from corner to corner - there is no (and i am not sure if there should be) smooth movement along the x and y axis when I move the gun around just corner to corner jump.
Sounds like swapped wires.

Am I missing something simple here - i understood the apac automatically detected potentiometers and behaved accordingly.
To test, I wired in another standard pot and it behaved the same.
Obviously as I have everything else wired up at the rear of the machine I would rather wire the apac from the connectors there but am at a loss how to wire a single X and Y channel into 4 channels.
You don't need 4 inputs to connect a positional gun, there are two analog inputs ("up" and "right" - yellow wiper wires), 5v ("down" and "left" - red wires), and ground. (black wires)
- The pot acts as a voltage divider.  The position of the knob determines the output voltage on the center (wiper) tab.
- You can connect your daisy-chained VCC wire to either "down" or "left" to power both pots.
- One thing that can cause confusion is that Andy uses the same PCB for I-Pacs (note the "I-Pac" silk-screened near the USB) and A-Pacs.



Connect the center (wiper) tab of your potentiometer to an analog input (labeled "up" or "right"), connect one outer tab to 5v (labeled "down" or "left"), and connect the other outer tab to ground. (labeled "gnd")
- If the axis moves in the opposite direction, swap the outer tab connections.

More info about analog encoders and pots at http://wiki.arcadecontrols.com/index.php/Analog_Encoders#How_a_potentiometer_provides_the_voltage_for_an_analog_encoder_to_measure.




Scott
« Last Edit: June 12, 2020, 10:23:57 am by PL1 »

brentglov

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:August 02, 2024, 01:58:29 am
  • I want to build my own arcade controls!
Re: LA Machineguns - mame'd!!!!
« Reply #2 on: June 12, 2020, 11:07:45 am »
Thanks very much for that info and the link explaining it better.

For clarification - when in windows gamepad setup - should normal behaviour be smooth movement around the box or jumping to all (correct) corners and center when centered?

I thought with the APAC translating the pots to analogue it should be smooth and accelerating to the edges.

Brent

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 04:29:13 pm
  • Designated spam hunter
Re: LA Machineguns - mame'd!!!!
« Reply #3 on: June 12, 2020, 01:47:09 pm »
For clarification - when in windows gamepad setup - should normal behaviour be smooth movement around the box or jumping to all (correct) corners and center when centered?

I thought with the APAC translating the pots to analogue it should be smooth and accelerating to the edges.
The normal behavior is movement that matches the wiper voltage.
- Linear pot taper ==> linear response. (positional guns and analog joysticks use linear pots)
- If you position the pot 1/2 way between left (0v) and center (2.5v), wiper voltage should be 1.25v and the crosshairs should be half-way between the left side and the center of the box.

The A-Pac converts the analog wiper voltage into the corresponding digital position value using 12-Bit analog to digital conversion.
- There are 4096 (212) possible position values
- There's a 0.001220703125v difference between each position
- 0v ==> position 0
- 2.5v (centered) ==> position 2047
- 5v ==> position 4095

EDIT: Looks like instead of the usual voltage measurement method, the A-Pac uses a "ratio comparison method" during the A/D conversion process.

Normally, you should see smooth movement as you change the position of the pot.

If you're seeing jitter/jumpiness, that could be the result of a poor wire connection or dirt or corrosion causing a poor/intermittent connection between the wiper contact and the resistive element.
- In this example, the resistance caused by corrosion drops an additional 2v so the wiper is at 2.5v instead of 4.5v.




Scott
« Last Edit: June 13, 2020, 12:05:27 pm by PL1 »

brentglov

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:August 02, 2024, 01:58:29 am
  • I want to build my own arcade controls!
Re: LA Machineguns - mame'd!!!!
« Reply #4 on: June 13, 2020, 09:33:15 am »
I have tried this now on 2 laptops and main PC same results on all

So I am trying with JoyTester as USB Gamepads in Windows 10 was always showing the big jump to each extremity.


Manufacturer ID: D209
Product ID: 1571
Product Name: Microsoft PC-joystick driver
RegKey: DINPUT.DLL
OEMVxD:
X range: 0 to 65535
Y range: 0 to 65535
Z range: 0 to 65535
Number of buttons: 28
Period range: 10 to 1000
R range: 0 to 65535
U range: 0 to 65535
V range: 0 to 65535
Capabilities: 0
Maximum axes: 6
Number of axes: 2
Maximum buttons: 32


I still get even when wired direct to a single pot on the gun that I know works as it works when running original cab game.....

full left - 0
Centre - 32767
Full Right - 65535
Absolutely nothing in between just the jumps to 3 locations only.

I ripped another pot out of an old bit of kit and same behaviour.
Tried on both guns on both axis - all same.

Is it out of the realms of possibility that my A-PAC isn't behaving correctly? or flashed correctly?

I ordered it as:

A-PAC Analog/Digital Dual Gamepad Interface

and yes as you said before Scott it is an IPAC silk screened ultimarc with an A-PAC sticker on it.  It detects in Windows installed game controllers just as A-PAC.

Totally at a loss here.

Thanks
Brent

Ginsonic

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 99
  • Last login:June 12, 2025, 02:12:31 am
  • Arcade enthusiast !
Re: LA Machineguns - mame'd!!!!
« Reply #5 on: June 13, 2020, 10:13:45 am »
That is a real strange behaviour! Did you ever try a "normal" pot (e.g. 100k linear)?
There must be an unknown variable in your configuration...
Do you have a measurement device for measuring the output values of the pot?
« Last Edit: June 13, 2020, 10:17:00 am by Ginsonic »

brentglov

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:August 02, 2024, 01:58:29 am
  • I want to build my own arcade controls!
Re: LA Machineguns - mame'd!!!!
« Reply #6 on: June 13, 2020, 10:47:47 am »
Yes.

My goto "test" pot is a 5k Type EJ Extra Life pot from an old cocktail table.  I have 2 and both were nigh on the same readings.
Reads 5.88 kohm on outer pins

reading from the wiper I get a smooth increase from 0.01 to 5.89 kohm.

No problems there.

So am at a loss as this gives the same erratic movements.

Brent

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 04:29:13 pm
  • Designated spam hunter
Re: LA Machineguns - mame'd!!!!
« Reply #7 on: June 13, 2020, 11:53:54 am »
https://www.ultimarc.com/control-interfaces/a-pac/a-pac/
Quote
Inputs auto-detect whether pots or buttons.are connected.
Sounds like the auto-detect isn't working on your board.   :dunno

One last test to confirm:
- Disconnect all controls from the A-Pac.
- Connect just the three wires from one of your test pots to the P2 side of the A-Pac.
- Connect the USB cable and plug it in.
- Move the pot through the full range of motion and stop at an off-center position.

If that axis behaves like button presses, e-mail Andy.


Scott

brentglov

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:August 02, 2024, 01:58:29 am
  • I want to build my own arcade controls!
Re: LA Machineguns - mame'd!!!!
« Reply #8 on: June 14, 2020, 10:28:42 am »
Embarassing update and closure :)
so i am offically a  :tool:

Turns out the problem all along was the simplest.
I wasn't rebooting the a-pac with the pots wired so it was straight into digital mode.

All working good now on both guns plus added buttons from the rear of the machine so full steam moving forward on multi game front end.

Massive thanks to all who helped in this thread!!!!!

Brent

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 04:29:13 pm
  • Designated spam hunter
Re: LA Machineguns - mame'd!!!!
« Reply #9 on: June 14, 2020, 12:16:28 pm »
Glad you got it working.   :cheers:


Scott