2Player Arcade games - Controls question

gamesfan
Posts: 71
Joined: Mon Jun 07, 2021 7:15 pm
Has thanked: 3 times
Been thanked: 12 times

2Player Arcade games - Controls question

Unread post by gamesfan »

Hey guys,
Most 2 player arcade games (that have thier own joystick\buttons) work fine. Not all though.
Some games like Air Duel, Street Smart (and probably others) want you to bind P2s Start\Coin when defining the buttons for the game.
In my setup, P1\P2 are each connected to thier own encoder. So I cannot bind P2 start or coin to the same buttons I have them binded to.

How does someone get 2 player games working in this scenario?
Is there a way to Merge some of the keys between encoders?
I feel like I must be missing something.
Any guidance is appreciated.

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: 2Player Arcade games - Controls question

Unread post by thorr »

If your two controllers each have their own encoder, as you suggested, and each encoder is the "same" as each other, then you should only need to map the buttons for the first controller. The MiSTer sees the first USB controller you touch as the player 1, and the second USB controller as player 2, and both have the same button mapping. If the controllers are different from each other, then you may need to specify things in the INI file and it gets more complicated. This is assuming you set them up as joysticks and not as keyboard keys. If they are keyboard keys, then I think the Mame player 1 and player 2 keys work by default (until you mess them up by mapping them). You can test this with a keyboard.

gamesfan
Posts: 71
Joined: Mon Jun 07, 2021 7:15 pm
Has thanked: 3 times
Been thanked: 12 times

Re: 2Player Arcade games - Controls question

Unread post by gamesfan »

Yes, it is exactly as you say, two identical encoders, all wired the same so they are identical.
So yes, when I start the core and bring up the menu, the encoder I used to start the core is automatically P1.
I think in the INI I can hard code the encoders, but that doesnt bother me, in fact I prefer to have whatever controller I grab be P1.
I am getting side tracked.
So when I go to bind the controlers and press my action buttons, coin 1 , p1 start. etc it then asks for P2 coin and P2 start. Obviously its expecting input from the controller I am using, not the alternate encoder.

Maybe I can bind the keys, and CANCEL the P2 coin and start, then save and exit the core. Start the core with the second controller, bind the keys and Cancel all but P2 Coin and start. Save and exit. But I suspect as it will bind that encoder to P1 as P1 always starts the core, and for all I know they identify as the same hardware id (deamonbyte of sorts) it wont work.

I have been trying a few things but havent been successful.

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: 2Player Arcade games - Controls question

Unread post by thorr »

gamesfan wrote: Tue May 14, 2024 4:59 am

I have been trying a few things but havent been successful.

I thought of a way to do this. In your MiSTer.ini file, make a section for the core with [corename] and define multiple player_1_controller lines. I actually was the one that requested this feature lol. See the player_4_controller line for what you want probably, and it probably would only take one line as long as it doesn't think both controllers are one device (like push left on the first controller is the same as pushing left on the second).

Once you define both controllers as player 1, then you should be able to map all the stuff when it continues to ask for player 2.

[corename]
; Permanently assign specific controller to specific player.
; Normally you don't need to use this option, but if you use arcade cabinet with integrated controllers then
; you may want to use it for specific player regardless which controller is used first.
; To assign it, you need to provide unique part of this controller ID.
; In USB debug log you may see list of input devices right after core has been loaded.
; For example:
;
; opened 0( 0): /dev/input/event8 (1915:0040) 0 "7c:10:c9:15:22:33/df:47:3a:12:44:55" "Flydigi APEX2"
; ...
; opened 7( 7): /dev/input/event3 (1997:2535) 0 "usb-ffb40000.usb-1.6/input0" " mini keyboard"
; opened 9( 9): /dev/input/event0 (046d:4024) 0 "usb-ffb40000.usb-1.2/input2:1/4024-19-a2-39-0a" "Logitech K400"
;
; following part is unique identifier in system ^^^^^^^^^^^^^^^^^^^^^^^^^^^
; So you need to provide part of this string identifying exactly this device. Don't include inputX part as it may change after reboot.
; Wireless devices usually have format MAC/MAC, wired devices use usb-... format.
; UPDATE: you may define up to 8 devices to the same player. Use player_1_controller in several lines to assign multiple devices to player 1.
;
; Example of such unique part of strings:
;
;player_1_controller=usb-1.2/ ;include / at the end so it won't match with something like usb-1.2.3
;player_2_controller=7c:10:c9:15:22:33/df:47:3a:12:44:55
;player_3_controller=1915_0040_55c4dd0c ; VID_PID_HASH - VID, PID and unique HASH
;player_4_controller=1915_0040 ; VID_PID - warning, it will assign all input devices with these VID:PID to same player!

darkangel33
Posts: 5
Joined: Wed Sep 23, 2020 3:28 pm
Been thanked: 1 time

Re: 2Player Arcade games - Controls question

Unread post by darkangel33 »

I'm using Brook Zero-Pi encoders on my modded Arcade 1up and have the problem figured out.

  • What I did was bind the Player 1 joystick and buttons (including Coin 1 and Start 1) skipping Coin 2 and Start 2.
  • Then binding Player 2's joystick and buttons (Coin 2 and Start 2) skipping Player 1's Coin and Start.

A great core to try this out on is the Mega System 1 core. Since the games like Rodland have separate coin and start buttons. So in my .ini i have

[MegaSys1_A]
controller_unique_mapping=0x0f0d00aa <-----(where that is your VIDPID or encoder ID that you find when defining your stick and buttons on the MAIN MiSTer menu)

If you need additional help I can send you that portion of my .ini with notes to walk you through.

Post Reply