Ultimarc A-Pac with 5k Potentiometers
-
The Technology:
Using an A-Pac which has limited technical assistance from the main sale page- https://www.ultimarc.com/a-pac.htmlThe Scenario:
I have hooked up four 5K Clarostat potentiometers and some buttons to the A-Pac.The Specifics:
My pots have the center tab as the wiper. I have used an ohmmeter to confirm the center post is indeed the wiper.
I have wired as-
Pot 1 left tab to 1Left on A-Pac
Pot 1 center tab to 1Right
Pot2 left tab to 1Down, center tab to 1Up
Pot3 left tab to 2Left, center tab to 2Right
Pot4 left tab to 2Down, center tab to 2Up
The right tab on all 4 pots are wired to GNDI tested from MAME on PC to get it working before trying RetroPie/AdvanceMAME.
MAME only has one of the analog controls defaulted like below, which does allow the 2nd pot to properly control player 2:
Paddle 2 Analog = J2 X Axis
Paddle 2 Dec = J2 X Axis -
Paddle 2 Asc = J2 X Axis +The Help:
Can someone give me some tips on how to get Advance MAME to work with an A-Pac, by getting the button mappings to be the proper joystick axis +/- ?
What would I enter in the Advance MAME .rc config file?
I learned in the turbo twist 2 thread about entering the [Mouse0] thru 4, but what would the format be for the joystick axis'? -
I should have stated, this is intended for 4 player Warlords.
-
@1500points i have never used advmame but based on what you posted this sounds like the logical answer.
Paddle 1 Analog = J1 X Axis
Paddle 1 Dec = J1 X Axis -
Paddle 1 Asc = J1 X Axis +Paddle 3 Analog = J1 Y Axis
Paddle 3 Dec = J1 Y Axis -
Paddle 3 Asc = J1 Y Axis +Paddle 4 Analog = J2 Y Axis
Paddle 4 Dec = J2 Y Axis -
Paddle 4 Asc = J2 Y Axis + -
@1500points you can use paddle in stella (not lr-stella) for atari 2600 paddle games.
-
@1500points your configuration is going to be pretty unique. I have not come across anyone here using an APAC, but it should be possible to get AdvanceMAME to do whatever you need it to do.
First of all, check out the docs, as you maybe already have, regarding the setup of Spinners and Trackballs. In that document, I described how you can use the utility that comes with AdvanceMAME called
advm
which is used for testing mouse inputs. AdvanceMAME also comes with a utility calledadvj
which is similar, but designed to test joystick inputs. My thought is that you should be able to useadvj
to test your inputs which will help you to connect your controls to their logical names that you will need to reference in your input mapping.Once you know the utility is detecting your inputs, you can move on to configuring the inputs in the .rc file. I don’t have any direct experience with doing this using joystick controls, but you say you already understand how to do it with mouse inputs. This will be similar only you will use the inputs determined during your
advj
testing.
Check here for all of the documentation available for configuring advancemame. It may take some time to get the inputs formatted correctly, and you might need to do some research elsewhere online, as this is not technically a RetroPie configuration you are after but pure AdvanceMAME configuration. -
Awesome steps to begin exploring. Thank you guys!
I did get all 4 pots working as 4 spinners in wolfmame .106 from PC using the following.
That is the proof of concept I was hoping for.
Now to get it working for the Retropie project.....woot!
I'll report back. thanks again.Paddle Analog = J1 X Axis
Paddle Dec = J1 X Axis + (spin counter-clockwise)
Paddle Asc = J1 X Axis - (spin clockwise)Paddle 2 Analog = J1 Y Axis
Paddle 2 Dec = J1 Y Axis +
Paddle 2 Asc = J1 Y Axis -Paddle 3 Analog = J2 X Axis
Paddle 3 Dec = J2 X Axis +
Paddle 3 Asc = J2 X Axis -Paddle 4 Analog = J2 Y Axis
Paddle 4 Dec = J2 Y Axis +
Paddle 4 Asc = J2 Y Axis - -
@caver01 said
First of all, check out the docs, as you maybe already have, regarding the setup of Spinners and Trackballs. In that document, I described how you can use the utility that comes with AdvanceMAME called
advm
which is used for testing mouse inputs. AdvanceMAME also comes with a utility calledadvj
which is similar, but designed to test joystick inputs. My thought is that you should be able to useadvj
to test your inputs which will help you to connect your controls to their logical names that you will need to reference in your input mapping.I looked over the doc here- http://www.advancemame.it/doc-advj
but it is assuming I have more back knowledge than I do, I think...Can you tell me how to run that utility from RetroPie?
I assume there is a command string to be entered from the f4 area? -
@1500points The path to that utility is alongside the other AdvanceMAME binaries, so it will depend upon which version of advmame you are running, but here is an example:
/opt/retropie/emulators/advmame/1.4/bin/advj
This command should run the utility using the advancemame 1.4 version. You can obviously change directories usingcd
and list the contents usingls
--standard linux commands to navigate through the directory tree. For example, you may want to run the latest 3.x version of advmame, so you would modify the command above using the path to that version'sbin
folder.The point of this test would be to know how advmame will "see" your inputs so that you can pursue a proper configuration. It's a way to get beyond the catch-22 where you want to try your controls, but you can't because they won't work until you configure them. At least this way you can move pots and press buttons and see the inputs appear on-screen.
If you read the Trackballs and Spinners document, this is very similar in theory.
-
@1500points I am absolutely confident that if Linux can see your controller and receive the inputs, you can configure advmame like you did on the PC. The fact that you already know that the Paddle input is the right one for your ROM is an important discovery that will save you a lot of time. Now, it is just a matter how assigning the input logic like you have done above using the results of testing.
-
@caver01 said in Ultimarc A-Pac with 5k Potentiometers:
@1500points I am absolutely confident that if Linux can see your controller and receive the inputs, you can configure advmame like you did on the PC. The fact that you already know that the Paddle input is the right one for your ROM is an important discovery that will save you a lot of time. Now, it is just a matter how assigning the input logic like you have done above using the results of testing.
I tried TAB from Advance MAME but the mapping does not recognize the paddle input. It sees the buttons but not the paddle. When I was googling I thought I saw that retropie spinners don't map right via tab which is why you have to update the .rc file?
-
@1500points Yeah, you cannot map analog inputs via the GUI. However, once mapped using the .rc file, you can adjust sensitivity in the GUI and it should save that per ROM in the .rc file.
-
@caver01 said in Ultimarc A-Pac with 5k Potentiometers:
@1500points The path to that utility is alongside the other AdvanceMAME binaries, so it will depend upon which version of advmame you are running, but here is an example:
F4 to command
/opt/retropie/emulators/advmame/bin/advjthat takes me into the utility.
The pots do register in the utility. :)
example....pot 1
joy 1, [-------], 0/0 [-number here changes with pot /], 0/1 [ xxxx ]pot 2
joy 1, [------], 0/0 [-xxxx /], 0/1 [number here changes with pot ]pot3
joy 2, [-----], 0/0 [-number here changes with pot /], 0/1 [xxxx /]pot4
joy 2, [-----], 0/0 [-xxxx /], 0/1 [ number changes with pot /]How would that equate to what you would write in the advmame.rc?
I understood what you explained for mouse in the spinner thread, but what is the proper nomenclature for a joystick axis? -
@1500points said in Ultimarc A-Pac with 5k Potentiometers:
what is the proper nomenclature for a joystick axis?
I dunno! Isn't this exciting? You will have to figure that out and tell us!
Look at the link I posted above to the AdvanceMAME documentation for advmame. In there you will find all of the input command examples. I expect you are going to have to map inputs for the Joystick, but I use a keyboard controller and mouse inputs, so I don't have any experience to share besides that. It would appear that you have 4 pots showing up as two Joysticks (two axes each), so that is a start. You also have your PC examples. You are definitely going to be setting up inputs for paddle, and adding to those lines references to your joystick indexes and axes that you determined with the advj test.
Sorry, I wish I had more answers, but this is about as far as I can get you. The way forward is trial and error, and possibly online searching for analog joystick input mapping in advancemame.
-
@caver01 said in Ultimarc A-Pac with 5k Potentiometers:
@1500points said in Ultimarc A-Pac with 5k Potentiometers:
what is the proper nomenclature for a joystick axis?
I dunno! Isn't this exciting? You will have to figure that out and tell us!
Look at the link I posted above to the AdvanceMAME documentation for advmame. In there you will find all of the input command examples. I expect you are going to have to map inputs for the Joystick, but I use a keyboard controller and mouse inputs, so I don't have any experience to share besides that. It would appear that you have 4 pots showing up as two Joysticks (two axes each), so that is a start. You also have your PC examples. You are definitely going to be setting up inputs for paddle, and adding to those lines references to your joystick indexes and axes that you determined with the advj test.
Sorry, I wish I had more answers, but this is about as far as I can get you. The way forward is trial and error, and possibly online searching for analog joystick input mapping in advancemame.
I will be able to get back to this in a week.
I did some googling and found some info about gunconf which led me to try the word "joystick" in the .rc info. so i modeled it like the mouse entry.I did try the paddle and dial entries for the 4 players as joystick[1,x] etc. but all that got me was warlords no longer opening to the game.
You would think configuring joystick axis' wouldn't be an unknown....google is sparse.
Thanks for all the insight thus far.
-
@1500points It's not an unknown. The correct commands/syntax is on the advmame documentation site.
-
@caver01 said in Ultimarc A-Pac with 5k Potentiometers:
@1500points It's not an unknown. The correct commands/syntax is on the advmame documentation site.
Oh! Somehow I didn't notice that section.
It is still a bit cryptic to my skill level so I studied it and tried this, by comparing what the joystick test showed.so the string I used was based on joystick [joy,control,axis]
p1 paddle set to joystick[1,0,0]
p2 paddle set to joystick[1,0,1]
p3 paddle set to joystick[2,0,0]
p4 paddle set to joystick[2,0,1]Now the player control does move by the paddle, BUT it isn't gradual.
When you move to the right, the player keeps moving right until it hits end of movement.
When you move to the left, the player keeps moving left until it hits end of movement.MAME/PC doesn't behave like that, the player movement is paced to match the amount of movement of the pot.
-
UPDATE- I restarted the Pi and tried the paddles again.
Discovered I'm having a flakey issue with just one of the pots. it is jumpy and acting weird.the other 3 player pots are working correctly as expected. kinda cool!
I'll report back in a week or so when I can get back to the project.
Thank you! -
@1500points Sounds like mixed news but maybe progress. I look forward to your final results, as I expect others who use analog sticks on gamepads might benefit from knowing how you have them configured in AdvanceMAME when all is said and done.
-
Having trouble walking away from the test bench!....
I switched it up a bit. Installed Kaboom with Stella.
In the TAB menu with a mouse.
Stella does see the A-pac as 2 input devices.
I was able to map the paddle 0 to one of the pots.
but the movement isn't smooth and controlled.
Twist one way and bucket keeps going to edge of screen, same with other direction.
I'll have to experiment but it ALMOST works!Learned a TON today. woot!
-
@caver01 said in Ultimarc A-Pac with 5k Potentiometers:
@1500points Sounds like mixed news but maybe progress. I look forward to your final results, as I expect others who use analog sticks on gamepads might benefit from knowing how you have them configured in AdvanceMAME when all is said and done.
figured it out. it popped in my brain when we were out to eat.
There was still axis info in the TAB gui for the player 2 analog. set all the dec and asc entries to keyboard keys d and g.
Now the paddles work properly, all 4!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.