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: Ultimarc A-PAC/MAME issues with setting up potentiometers and switches...  (Read 2727 times)

0 Members and 1 Guest are viewing this topic.

SuperHangOn

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:July 06, 2020, 06:31:37 am
  • I want to build my own arcade controls!
Hi everyone.

I'm working on a custom controller for motorcycle games like Hang-On, GP Rider, etc. It's an actual Super Hang-On arcade handlebar controller. It has two regular button switches and three potentiometers, for steering, throttle, and brakes. I bought an A-PAC hoping that I could interface the pots and switches and make them work on MAME.

I'm using MAME on Windows XP, and when I go into control panels/game controllers to calibrate, it seems to indicate that Windows is at least recognizing the A-PAC and showing that the axis' work when testing the pots. I can't seem to get MAME to map the pots though.

If the Windows game controller settings recognizes the pots, I assume they are hooked up to the A-PAC correctly??

Another issue is the A-PAC is meant to emulate two controllers, a one and two player... each with only two pots. I need three pots for one controller so, I don't know if this is a contributing factor to my issues.

Also, a thing that concerns me is the A-PAC only seems to convert the analog pot signal to the basic center, left, right, up, down, positions... rather than a full range of X and Y axis'... The motorcycle in Hang-On should be able to tilt according to the position of the pot. In other words, Turn the bars left ever so slightly and the bike tilts left a little bit, turn the bars a little more and the bike tilts even more, allowing for a fine-tuned racing experience. I fear this will not be the case with the A-PAC, and I'll only get center, extreme left, and extreme right range of the bike in the game.

Does this make any sense??

So, basically... If anyone on here has any experience using potentiometer controls in MAME, and if you could help me out, I'd appreciate it. The version of MAME that I'm using escapes me at the moment, but I'll get that info and post it later in the event that it would help you to know which version I'm using.




PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9401
  • Last login:Yesterday at 09:55:06 pm
  • Designated spam hunter
I'm using MAME on Windows XP, and when I go into control panels/game controllers to calibrate, it seems to indicate that Windows is at least recognizing the A-PAC and showing that the axis' work when testing the pots. I can't seem to get MAME to map the pots though.

If the Windows game controller settings recognizes the pots, I assume they are hooked up to the A-PAC correctly??
First step is to confirm that Windows game controller settings sees the three analog axes.  Check.

Also, a thing that concerns me is the A-PAC only seems to convert the analog pot signal to the basic center, left, right, up, down, positions... rather than a full range of X and Y axis'.
Second step is to confirm that Windows game controller settings sees the three analog axes responding smoothly through the range of motion.
- Since the crosshairs only appear in the center or on eight points of the outer edge of the box (U/D/L/R + diagonals), the A-Pac didn't autodetect the pots -- same thing recently happened to brentglov.
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.

Give your A-Pac's USB cable the go-to "IT Crowd" troubleshooting technique -- unplug and re-plug it to turn it off and on again.



Third step is to verify that the pots are moving in the desired direction.
- If the steering pot is on the X-axis, turning left should move the crosshairs left.
- If the axis is responding backward, you can either swap 5v and ground on tabs 1 and 3 of the pot (leave the center "wiper" tab) or you can reverse the axis in the MAME "Analog Controls" menu.

Another issue is the A-PAC is meant to emulate two controllers, a one and two player... each with only two pots. I need three pots for one controller so, I don't know if this is a contributing factor to my issues.
It won't be a problem with MAME, but may be with some emulators and PC games.   :dunno

Read this sticky thread in the Driving & Racing sub-forum.
- Lots of related info about 270 degree wheels (steering pot), pedals (throttle and brake pots), and emulator configuration.
- Looking at the top-center of the Super Hang-On manual schematic on page 42, the "accel" and "brake" pots on your controller are separate (i.e. not combined) so keep that in mind as you read the sticky thread.

If you want to switch between separate (dual axis) and combined (single axis), you can wire a relay or switch like this.



Here's a diagram if you're having trouble picturing how the pots for single axis work together.




Scott

SuperHangOn

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:July 06, 2020, 06:31:37 am
  • I want to build my own arcade controls!
Hello, and thank you for your detailed reply... I appreciate the time you spent to type all that out.

So... Based on what you've told me so far, I know now that the A-PAC itself needs to be unplugged and plugged back in every time a wiring change is made... at least that's what I interpreted so far. I even went as far as restarting my computer as well. I believe this solved my Windows calibration issue and the pots are now acting like true pots rather than digital buttons.

I have the steering pot wired to side 2 of my A-PAC, and it mapped on MAME. It seems to be working perfectly. I also have the turbo button wired to side 2 and was able to map that on MAME as well, but only after restarting my computer and unplugging and plugging the A-PAC, etc.

I'm still having a problem mapping any controls that are wired to side 1 of the A-PAC. Is there a way to make the A-PAC act as a single controller, rather than two separate ones? Also worth noting, Windows is recognizing all the pots and the calibration crosshairs move as they should in true analog style. If I can get side 1 to be recognized in MAME, I think this thing will finally work the way I need it to.

UPDATE: I think I might have figured out what was wrong. In MAME's controller mapping properties tab, there are 4 checkboxes each one with some sort of A-PAC designation. I had all the boxes checked. After unchecking the boxes I was able to go into MAME and map side 1 of the A-PAC. Super Hang-On played perfectly. I decided to turn off the computer, come back later and see if everything still works, AND if I'll be able to map other games like Hang-ON, GP Rider, etc. I'll post the verdict later today.



« Last Edit: June 28, 2020, 11:26:15 am by SuperHangOn »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9401
  • Last login:Yesterday at 09:55:06 pm
  • Designated spam hunter
Based on what you've told me so far, I know now that the A-PAC itself needs to be unplugged and plugged back in every time a wiring change is made... at least that's what I interpreted so far.
Not quite.  When power is first applied to the A-Pac, it checks each of the four analog inputs (yellow pot wires) to see if there is a pot attached to it.
- If it sees a pot, it sets that input terminal to analog (yellow pot wire) and the terminal to the left of it to 5v . (red pot wire)
- If it doesn't see a pot, it sets those two terminals to the digital mode defaults printed on the board.
- The A-Pac won't check for pots again until power is removed and reapplied.

https://www.ultimarc.com/control-interfaces/a-pac/a-pac/
Quote
INSTALLATION The picture below shows wiring of the maximum number of pots, ie 4pots. It also shows an example 4 switches. Note that not all four pot positions need to be used for pots. You can connect buttons instead to any input. The direction of the pot control depends on the wiring of the two outer connections on the pot. If the pot works "backwards",then swap these over. Note Mame can also be configured to reverse analog control directions.




Scott

SuperHangOn

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:July 06, 2020, 06:31:37 am
  • I want to build my own arcade controls!
I think I have the pots hooked up correctly then, because it would seem all is working now. I think the main issues were having everything set up properly in MAME and on the Windows game controller control panel. I'm actually glad it was a "settings" issue, instead of a hardware problem or me just having the pots wired wrong. I was even able to plug the controller into a computer with Windows 7, and use the same tools to set up the pots... thankfully it worked out great... basically just a learning curve for a guy who is limited skill wise. ;)

Thanks again PL1.

P.S

On my custom Super Hang-On controller, It has the faux gauge cluster, which is supposed to be backlit. Is it possible to use a few of the A-PAC switch terminals to power a few super bright LEDs to back light the gauges?? Is 5v enough to power a bright LED?

« Last Edit: June 28, 2020, 02:50:03 pm by SuperHangOn »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9401
  • Last login:Yesterday at 09:55:06 pm
  • Designated spam hunter
On my custom Super Hang-On controller, It has the faux gauge cluster, which is supposed to be backlit. Is it possible to use a few of the A-PAC switch terminals to power a few super bright LEDs to back light the gauges?? Is 5v enough to power a bright LED?
The input terminals are only going to provide maybe 1 or 2 mA -- definitely not a good way to power an LED.

A typical LED will draw about 20 mA.
- Super bright LEDs can draw more so check the specs.

An incandescent bulb (originally used in this controller IIRC) will draw far more current (500mA?) than an LED.
- Make sure that you replace the wedge-base incandescent bulb with a suitable LED.
- You can use 5v or 12v wedge-base LEDs -- 12v LEDs run well on 5v.

You can power LEDs using 5v and ground from a hacked USB cable.

Your earlier posts imply that this might be a portable controller so you may want to consider using a Neutrik  "NAUSB-W-B" USB feedthru and an un-powered USB hub so you only have one USB cable going from the controller to the computer.
- The core of the feedthru is reversable -- just pull the two screws on the back.
- Plug the A-Pac and hacked USB cable into the unpowered hub.
- Each port on the unpowered hub is rated for 100mA per USB spec.

 


Scott