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:
/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! -
@1500points that’s awesome! When you get a chance, would you post the relevant entries from the .rc file?
-
@caver01 Sure enough, I will do a proper write-up from beginning to end next week. and post it. Nothing worse than finding something from a google search and it is a bunch of haphazard comments. :)
-
I'm back to this and just about ready to organize the content from start to finish.
I about have my homebrew Warlords cocktail built and running.
I need to figure out how to get Warlords working in lr-mame2003, since I discovered Advance MAME comes up with a goofy error when I set it to autostart to that rom in retropie. -
@1500points Don't get your hopes up with lr-mame2003 right now. It has only ever allowed 1 mouse device to work--multiple mouse devices were all controlling a single XY set. You could split x and y to players 1 and 2 for certain games, but no way could you have 4 analog inputs. A recent update now broke some of this functionality, so only the first mouse device detected seems to work.
-
This is great information, Ive been researching my build of a 4 player Warlords for a few months now. You seem to have learned a lot of stuff here! Watching to see your ground breaking progress, not many of these being built with 4 spinners! :-)
-
I typed up a draft, I don't think I can edit posts so I may regret posting it if I find something isn't accurate or I made typos. ;)
Teh Googles of the Interwebz, reference links that helped create this listing:
https://retropie.org.uk/forum/topic/12972/ultimarc-a-pac-with-5k-potentiometers/16?loggedin=true
https://www.ultimarc.com/a-pac.html
http://forum.arcadecontrols.com/index.php/topic,155328.msg1629561.html#msg1629561
http://www.advancemame.it/doc-advmame#8.9Prep assumptions:
--Have warlords.zip romset for MAME
--Have an Ultimarc A-Pac analog interface
--Have a Raspberry Pi 3
--Have four Clarostat 5k potentiometers
----I found some medical use potentiometers with knob for $7.50 shipped apiece on ebay, the longer the shaft the better to allow for mounting into a panel
----The original Atari Pots had a clutch to help with aggressive public use, there is a seller on KLOV but the pots are around $25 apiece.
--Have a USB controller and keyboard
--Have a cheap 4 port USB hub
--Have the desired arcade buttons
--For basic Pi interactions I'd recommend having the following free programs installed on the PC- Win32DiskImager, WinSCP, Putty, Notepad++
--Have a monitor which can be about anything since Pi is so versatile.
----Examples, Computer monitor with d-sub VGA connector will require an Hdmi to vga adapter. Will require computer speakers for sound out of the 3.5mm jack.
----HDMI direct to an HDMI TV which also handles the sound
----Computer monitor with dvi with HDMI to DVI conversion cable
----Arcade monitor if you use a product like Arpicade or the other Pi Jamma interfaces on the market. (I was unsuccessful getting a J-Pac to work with an arcade CGA monitor, btw)
----Using the Pi's 3.5mm jack to output video via the Red/Yellow/White RCA cablesA-Pac details:
--A generic wiring example for the pots is found here- https://www.ultimarc.com/a-pac.html
--Explanation of pot function via BYOAC reply#1- http://forum.arcadecontrols.com/index.php/topic,155328.msg1629561.html#msg1629561
--The A-Pac is seen as 2 joysticks with and X and Y axis each. For warlords P1 paddle is the Joystick 1 X axis, P2 paddle is Joystick 1 Y axis, P3 paddle is Joystick 2 X axis, P4 paddle is Joystick 2 Y axis
--For orientation imagine holding the pot with the back facing you, the shaft away from you and the 3 prongs pointing downward.
---The far left tab goes to Ground on A-Pac
---The middle tab goes to Right Paddle on A-Pac
---The far right tab goes to the Left Paddle on A-Pac
---Do this wiring setup for all 4 paddles. Remember that the A-Pac is being setup like paddle 1 is 1Left/Right, paddle 2 is 1Up/Down, paddle 3 is 2Left/Right, paddle 4 is 2Up/Down
--Wire up however many buttons you'll need, I used 4 buttons for the player button to catch the fireball, and 1 button for credit.Easy test setup:
--Install wolfmame .106 on a PC
--Plug the A-pac into a USB port and confirm it is working via the crosshatch's found at: Open Control Panel, Game Devices. You will see two A-PAC Gamepad devices shown. Select each one and check for correct operation. The top one in the list is the player 1 side, the lower one is player 2.
--Start Warlords in MAME
--Hit tab and map the paddle entries by hitting enter on the relevant entry then spin the paddle to register the value
--They will look like this
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 -Raspberry Pi setup:
--Install Retropie on a microSD card for Raspberry Pi 3 using Win32diskimager on PC
---You'll need to enable SSH, turn on WiFi, then get the IP address for the Pi which are all things done from the Retropie menu and easily google-able (ETAPrime is a great YT resource on the basics, too)
--Plug a 4 port USB hub into one of the Pi ports so you have plenty of USB connection points
--Plug a USB controller into the Pi
--Plug a USB keyboard into the Pi
--Install Advance MAME
---Note- Spinner function will work with any of the Advance MAME versions, but you'll have to change the related .rc file pertaining to the specific advmame version used.
--Transfer warlords.zip to the arcade folder on the pi using WinSCP on PC
--Start warlords, and be sure it is set to open with advance mame (tap a button when warlords is starting at the onscreen prompt)
--Use Tab to edit the controls for this game. For all 4 paddle entries remap the Analog/Desc/Asc entries to irrelevant keyboard characters like d and g, that way there won't be any conflicts with the upcoming .rc paddle configuration settings.
--Plug the A-Pac into the Pi and rebootConfigure the Paddle for MAME on the Pi:
--Pi does NOT allow you to map the paddle from the MAME Tab menu, like it does in wolfmame on a PC, so you have to manually edit a .rc configuration file.--From the Pi you will want to test the paddle interface using a tool
--F4 to command
--sudo nano /opt/retropie/emulators/advmame/bin/advj
--spin the pots and ensure they register changes similar to the examples below
---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 /]
--Section 8.9.5 gives hints about how to decipher the info from the advj utility- http://www.advancemame.it/doc-advmame#8.9
---joystick[JOY,CONTROL,AXE]
---JOY Number of physical joystick: 0, 1, 2, 3, ...
---CONTROL Number or name of physical control of the joystick: 0, 1, 2, 3, ...
---AXE Number or name of physical axe of the control: 0, 1, 2, 3 ...--the following will have to be updated in the advance mame .rc configuration file
--hit f4, type sudo nano /opt/retropie/configs/mame-advmame/advmame.rc
---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]
--use Alt X then Y to save the advmame.rc changes--Reboot the Pi and ensure Warlords allows the player shield to move back and forth.
---If your shield moves opposite to how you turn the paddle, you'll need to switch the wiring for each paddle. Switch the ground wire with the Left wire on the A-Pac (This is effectively flipping the far left and far right tabs at the potentiometer, meaning it is reversing the action)
---Upon starting Warlords with the A-Pac installed, you can use the Tab menu to map the 4 player buttons and the credit button.
---The 4 players are activated at game start by hitting the capture button for each player in the designated time-frame. Any player position desired from 1 to 4 players, is activated by hitting the button much like Gauntlet.
---The game goes to the last King/Castle surviving whereupon the game ends.Optional Ideas:
--Images related to Warlords can be copied onto the Pi so that Splashscreens can be set to randomize the images upon bootup.
--Booting to single Rom (original thread on topic is found on BYOAC in the Raspberry Pi section)
---Setup Booting into a Single Rom
---Optional methods- Login to the Pi using Putty from your computer or F4 from the Retropie menu
---Type> sudo nano /opt/retropie/configs/all/autostart.sh
---Add as the top line>
---/opt/retropie/supplementary/runcommand/runcommand.sh 0 SYS mame-advmame ~/RetroPie/roms/arcade/warlords.zip
---Note- If you want to lock out any pi menus and force the player to stay in just one game, simply don't map the "UI Cancel" (found in MAME Config via TAB) to any available buttons on the control panel.Ongoing Caveats and problems:
--I am unable to get the above to work properly for booting to one game via AdvanceMAME. The game will load then a few seconds later a black screen with some error coding appears. I'd love to know how to fix this problem that is specific to advmame, if anyone knows.
--In the MAME Tab menu, the dip switch section will allow you to set the game to FreePlay but the freeplay setting doesn't hold upon the next time going into the game. Which requires a credit button be wired into the setup.The build:
--I will update this thread with pics since BYOAC makes it easy to upload images- http://forum.arcadecontrols.com/index.php/topic,155058.0.html
--Also thinking that it would be fun to add Breakout and Pong if Advance MAME works with those titles...more research
--I got both the daughter and wife to try a game of warlords tonight and they both thought it was going to be a fun addition for winter. Painting the cocktail cab gray instead of black seems to have allowed it entry from the garage into the house for winter.....unlike the yellow shop cat which sheds..... :( -
Exidy Circus works properly under this setup.
Super Breakout works properly.
Unable to get PONG or Breakout working with AdvanceMAME on Pi.
Avalanche "works" but the paddle doesn't go clear to each side so you can't catch all the falling rocks. :(
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.