The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: darkninja on October 31, 2023, 03:04:15 pm

Title: MAME Asteroids Cocktail controls
Post by: darkninja on October 31, 2023, 03:04:15 pm
I am trying to use a PC with MAME for an Asteroids Cocktail table.  Is see that Cocktail is available under machine configuration, and it flips the screen for player 2.  But there is no way to configure the controls for player 2.  Just player 1 controls work and are all that are available to be configured.  I am using an ipac2 and in MAME I can configure the player 1 controls to be the player 1 or player 2 buttons, but then both sets of buttons are active for both players during each player's turn.  Looking at the original Asteroids Cocktail schematics, the player 2 controls used the same connection on the PCB as player 1, except there is a separate ground for player 2 buttons to prevent overlapping presses.  Am I missing something? 
Title: Re: MAME Asteroids Cocktail controls
Post by: PL1 on November 01, 2023, 12:47:32 am
I am trying to use a PC with MAME for an Asteroids Cocktail table.  Is see that Cocktail is available under machine configuration, and it flips the screen for player 2.  But there is no way to configure the controls for player 2.  Just player 1 controls work and are all that are available to be configured.  I am using an ipac2 and in MAME I can configure the player 1 controls to be the player 1 or player 2 buttons, but then both sets of buttons are active for both players during each player's turn.  Looking at the original Asteroids Cocktail schematics, the player 2 controls used the same connection on the PCB as player 1, except there is a separate ground for player 2 buttons to prevent overlapping presses.  Am I missing something? 
Not sure where in the schematic you thought you found separate (isolated) grounds for the P1/P2 controls.   :dunno
- It doesn't look like there are isolated grounds for P1 and P2 controls on the main PCB connector.

I'd double-map the P1 and P2 controls to these P1 inputs in Asteroids. (MAME/IPac defaults shown)
- Button 1 (Left) Left + D
- Button 2 (Right) Right + G
- Button 3 (Fire) L. Ctrl. + A
- Button 4 (Thrust) L. Alt. + S
- Button 5 (Hyperspace) Space Bar + Q

To double-map the controls:
- Highlight the input.
- Press ENTER.
- Press the first button. (input mapped to the first button)
- Press ENTER.
- Press the second button. (input mapped to the first button or second button i.e. "kbd Left or kbd D")


Scott
Title: Re: MAME Asteroids Cocktail controls
Post by: darkninja on November 01, 2023, 12:33:08 pm
Hmmm...
I found the wiring diagram from here: https://arcarc.xmission.com/PDF_Arcade_Atari_Kee/Asteroids_Cocktail/Asteroids%20Cocktail_DP-150-1st-01A.pdf (https://arcarc.xmission.com/PDF_Arcade_Atari_Kee/Asteroids_Cocktail/Asteroids%20Cocktail_DP-150-1st-01A.pdf)
Attached screenshot of the relevant section. 

I had mapped the controls just like you pointed out, but the downside is that players can interfere (on purpose or accidentally) with each other's game.

Stephen
Title: Re: MAME Asteroids Cocktail controls
Post by: PL1 on November 01, 2023, 05:27:22 pm
I found the wiring diagram from here: https://arcarc.xmission.com/PDF_Arcade_Atari_Kee/Asteroids_Cocktail/Asteroids%20Cocktail_DP-150-1st-01A.pdf (https://arcarc.xmission.com/PDF_Arcade_Atari_Kee/Asteroids_Cocktail/Asteroids%20Cocktail_DP-150-1st-01A.pdf)
Upon further examination, it looks like you're at least partly correct, and probably completely correct.

1. The video inverter theory of operation on sheet 2B (https://arcarc.xmission.com/PDF_Arcade_Atari_Kee/Asteroids/Asteroids_DP-143-7th-02B.pdf) indicates that J20 pins 7 and 19 change between +5 VDC and ground, depending on which player's video is being displayed.
Quote
In a cocktail game, the wiring harness shorts connector J20's output pin 7 input pin 19. When the video of player 1 is being displayed, pins 7 and 19 are +5 VDC. This results in a non-inverted video output. When the video for player 2 is being displayed, pins 7 and 19 are grounded.

2. J20 pins 7 and 19 are also connected to P24B pin 6 (player 2's controls), which appears to be wired the same as P24A (player 1's controls), except for pin 6.

3. Pin 6 on P24A provides the ground for player 1's buttons, so it appears that pin 6 on P24B provides the ground for player 2's buttons. (unconfirmed, but strongly implied by the schematic on sheet 1A)

4. Player Input Circuitry theory of operation on sheet 2B indicates that switch inputs are active when pulled to ground.

Applying this info to two cocktail cab game-play scenarios:

Scenario A - P2 presses a button during P1's turn.
- J20 Pins 7 and 19 are at 5v ==> P24B pin 6 is at 5v ==> pressing the button applies 5v to the input ==> input is not pulled to ground ==> button press is not registered.

Scenario B - P2 presses a button during P2's turn.
- J20 Pins 7 and 19 are grounded ==> P24B pin 6 is grounded ==> pressing the button applies ground to the input ==> input is pulled to ground ==> button press is registered.

The only other thing not yet confirmed is if J20 pin J is always in the opposite state as J20 pin 7 when the PCB is in cocktail mode. (i.e. when one is grounded, the other is at 5v)
- If anyone has an Asteroids cocktail cabinet and can confirm/deny that J20 pin J works like this, it could help make MAME more accurate.  Confirming that there's no continuity between J20 pin J  and the ground plane of any Asteroids PCB would also work since it would confirm that J20 pin J is not hard-wired to ground. (same PCB is used for upright and cocktail cabs)
- If it does operate like that, MAME should define separate P2 inputs for cocktail cabinet configuration.

I had mapped the controls just like you pointed out, but the downside is that players can interfere (on purpose or accidentally) with each other's game.
True, but until we can confirm the theory I layed out above and find a MAME dev to update the Asteroids driver accordingly, double-mapping is the only way to make Asteroids work with P2 controls.   :(


Scott
Title: Re: MAME Asteroids Cocktail controls
Post by: darkninja on November 02, 2023, 10:58:05 am
I also noted that 7, 19, and J are not used on the standup harness connector.  The control buttons ground through Z along with many other things.  On the cocktail, Z only grounds coin, test, and slam.  Unfortunately, my cabinet was completely stripped of all boards and wiring when I got it, so I can't test the board.

Stephen
Title: Re: MAME Asteroids Cocktail controls
Post by: PL1 on November 02, 2023, 05:22:03 pm
Nice catch.   :cheers:

IIRC I had previously read that the only difference in the upright and cocktail wiring harnesses was the pin 7 to 19 jumper, but that is obviously not the case.   :embarassed:

Turns out the Asteroids pinout on KLOV is for the cocktail version, so there's still some unclear documentation about this 44-year old game, even on sources that are usually reliable.   :banghead:
https://www.arcade-museum.com/pinouts-game/6939.html (https://www.arcade-museum.com/pinouts-game/6939.html)


Scott
Title: Re: MAME Asteroids Cocktail controls
Post by: PL1 on January 25, 2024, 10:49:44 pm
Since this topic just came up in another thread, here is the documentation I've developed so far for any MAME Dev who might be able to add the separate P2 inputs in the MAME Inputs menu, add the P23B connector for P2 controls (P23 in Upright is P23A in cocktail), add the 10 blocking diodes, change where each player gets the grounds for their player controls, and add either a "Cabaret" or "Mirror Cabinet" option configuration for Asteroids Deluxe. (Video flipping in the current "Upright" configuration for AD is actually the configuration for "Cabaret".)

AFAIK, everything they need to update the configuration connections in MAME should be highlighted/noted in these five images.


Scott
EDIT: It would also be a good idea to update the Input menu button labels.
- Button 1 (Left)
- Button 2 (Right)
- Button 3 (Fire)
- Button 4 (Thrust)
- Button 5 (Hyperspace/Shield)
Title: Re: MAME Asteroids Cocktail controls
Post by: rdagger on January 26, 2024, 04:06:00 pm
Mame 2003 plus now supports cocktail mode along with separate controls for player 1 and 2.  Big thanks to mahoneyt944!

Here's the GitHub issue:  https://github.com/libretro/mame2003-plus-libretro/issues/1669


Title: Re: MAME Asteroids Cocktail controls
Post by: PL1 on January 26, 2024, 05:48:25 pm
Mame 2003 plus now supports cocktail mode along with separate controls for player 1 and 2.  Big thanks to mahoneyt944!
Great news.   :applaud:

Maybe we can get the MAME Devs to add this to mainline, too.


Scott