4-Player Cocktail Warlords LIVES! Raspberry Pi/Retropie Build
This has been quite a learning process with the help of BYOAC and Retropie.org forums.
Thought you guys might enjoy checking it out, since a Warlords cocktail is rare and expensive. My build proves that you can build it on the cheap resulting in a fun retro experience for the family and friends. enjoy!
-------------
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.9
http://www.ukvac.com/forum/topic360446_post1017172.html#1017172
Prep 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 cables
A-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- AdvMAME1.4 seems to work best, you'll have to change the related .rc file pertaining to the 1.4 version of advmame.
--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.
--in the MAME tab UI set the dipswitch for coinage to Freeplay.
--Plug the A-Pac into the Pi and reboot
Configure 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-1.4.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:
--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
---Disable splashscreens in the Retropie menu otherwise you'll get an error when it loads the rom.
---Disable the runcommand in the Retropie menu to avoid seeing the screen as rom loads.
---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.
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
--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.....
