How can I control 2 players with one keyboard (RetroArch)?
-
Did that last year with retropie 2.7 or something.
I just translated the buttons to the numbers, so like you have done
But it worked for me, using ipac2, even for player 2
I know, not a help at all, but in the past I did nothing else like you have written
-
Ah @meleu I am actually using libretro fba, still having the same issues when i try to change: /opt/retropie/configs/fba/fba2x.cfg. I assume there are no other controller configs anywhere?
Thinking that using the key strokes to run the joysticks might not be the best idea, given juggling hte controls around is one thing but not having 2 player working at all is another?
Anybody know much about this bit, and a "how to" guide?
[Joystick]
"# Get codes from "jstest /dev/input/js0""
"# from package "joystick""Thanks all.
Will look around but -
@TheStrayMongrel the
/opt/retropie/configs/fba/fba2x.cfg
file is the config file for pifba only.For libretro fba cores (core is how libretro calls its emulators) the file is
/opt/retropie/configs/fba/retroarch.cfg
, but there is a simpler way to remap the buttons. Recently I updated the "Core Input Remapping" section of the RetroArch Configuration page of the wiki with this info, take a look here:
https://github.com/retropie/retropie-setup/wiki/RetroArch-Configuration#core-input-remappingHope it helps.
-
Using lr-fba i have two seperate gamelists showing up on emulationstation. One for all 6 button fighters except the very first street fighter. The other for all other games including the first street fighter. So i configure the non six button games configuration to the first street fighter and the configurations work great. You can test gunsmoke and all 3 directional shooting buttons will in the correct order. All the 6 button games share the same button layout. You can also create seperate config files if you find a game that needs the controls tweaked. Those go in the roms folder. So for example the street fighter rom is called sf.zip. So in the roms folder you would have the config file named sf.zip.cfg. I only use lr-fba for all the capcom arcade games so your controls may vary but shouldnt really be a problem.
-
Fantastic @meleu had no idea there was a fba config gui. Got it up and just changed the input format to "arcade" from "gamepad" and the buttons came good automatically. That said i still have nothing on player two. Given i'm using keyboard keystrokes to run both controls and everthing config wise seems to assume youre using 2 gamepads im not sure where that leaves me...
Hi @edmaul69 that sounds like an interesting set up. Ive got most games, like gunsmoke and early street fighter 2 games running well on mame4all. Was really only wanting to get fba running for the more recent Streetfighter 2 Alpha, Streetfighter 3 and a few others. Would be very interested in having a look at an example of the .cfg file you speak of, give me idea of whats what.
Im thinking i might do some further reading and a fresh install on a different card, then look into arcade controls (most of the retropie setup stuff seems to assume people are going to use game pads... just not the same for arcade games IMO).
Thanks for all the help BTW, champions.
-
@TheStrayMongrel said in FBA controls config issue:
Fantastic @meleu had no idea there was a fba config gui.
This works for any libretro core, not just fba! ;-)
Good you liked it!
-
So i only just got a chance to do a full-on update last night in the hope that I'd be able to get joystick 2 (and buttons) working on lr-fba-next... no luck unfortunately. I'm thinking that im only hope is to do a fresh install, use the adafruit keyboard/GPIO utility im familiar with and see if i can get it working again. Pretty bummed to have to do this as everything else seems to be working really well... anything else i could try @meleu and @rbaker prior to going down this route? Or anyone else of course.
Thanks :)
-
@TheStrayMongrel let's remember the problem: you have 2 controllers (or a device with enough buttons for 2 players) but for the system it is just one keyboard. Am I right?
Is it an IPAC2?
-
@TheStrayMongrel I would have thought that since it's a libretro emulator, it will just work if your other libretro emulators are. What does your config file look like?
-
@meleu Yeah thats right, 2 joysticks and 6 buttons for each player. No ipac, running directly to the GPIO with the Adafruit keyboard utility converting button presses (https://learn.adafruit.com/retro-gaming-with-raspberry-pi/buttons). They button presses are definitely registering as I've got it set up and working well in mame4all. I also have Neo Geo working okay with the 2 players.
Remember trying to config retroarch and coming up against "gamepad A, gamepad B" etc... but not being able to map specific keyboard strokes ah la mame4alls tab menu, which was a stumbling block (probably need to look further into this really).
@rbaker thinking about it i dont really have any of the other libretro emulators working as such (cant recall if Neo Geo is or not?), just mame4all.
So thinking of workarounds last night and Im guessing that the way to go is to ditch my control system for mame4all, and get retroarch working, then reconfigure mame4all as allocating buttons in that is really easy. But i guess a question is that within Retroarch the config of how to get "gamepad 2 button a, or gampad 1 button c" (sorry thats probably not the exact syntax, cant recall exactly) to match up with my my mapped keyboard presses.
Thanks for your help guys.
btw, went through the keyboard config when i first started up Retropie and all worked fine.
-
@rbaker Dont have my config file handy but its very similar to the one you posted in this thread.
https://retropie.org.uk/forum/topic/1914/has-anyone-got-a-keyboard-working-for-player-2-in-pifba/2
[Keyboard]
#Get codes from /usr/include/SDL/SDL_keysym.h
A_1=306
B_1=32
X_1=308
Y_1=120
L_1=122
R_1=304
START_1=49
SELECT_1=53
LEFT_1=276
RIGHT_1=275
UP_1=273
DOWN_1=274
QUIT=27
#player 2 keyboard controls, disabled by default
A_2=97
B_2=115
X_2=113
Y_2=107
L_2=105
R_2=119
START_2=114
SELECT_2=102
LEFT_2=100
RIGHT_2=103
UP_2=114
DOWN_2=102 -
@TheStrayMongrel are you using pifba or the libretro fba?
I thought you were using the libretro one.For pifba you need the to reinstall from source, as mentioned on the thread you linked.
-
Sorry yeah i am using Libretro, the games i want to get going dont work on piFBA. Sorry getting myself a little tied in knots here, that config i just posted is for piFBA isnt it.
edit: lr-fba-next to be exact. -
@TheStrayMongrel the fba2x.cfg is for pifba only.
@rbaker said that RetroArch already works with one keyboard for 2 players. I never tried it but I think it's perfectly doable (I'm away from my raspi now to make some tests).
Is your problem with fba only? Can you play SNES games with 2 players, for example?
-
Yeah @meleu thats right, @rbaker did say that, thats why i cant work out why its not working... and if i've done something screwy with the config.
I did try Donkey Kong Country last night briefly and 2 player wasnt working on that... so guessing no. Not tested any further than that though as Mame is where i concentrate most of my time.
-
@TheStrayMongrel I asked that to suggest you to change the title of this thread.
Maybe "how can I control 2 players with one keyboard (RetroArch)?" fits better.I'm at work now and can't help you at this very moment, sorry. But with a more descriptive title, maybe someone else can give a look here. It shouldn't be that much complicated.
-
@meleu Yeah no worries, I'm at work too so thats fine. Thanks for the help. Will look to change the title now.
-
This post is deleted! -
@TheStrayMongrel go to the first post of the thread and edit it.
-
@TheStrayMongrel It's your retroarch config that will determine the correct settings for your libretro emulations. Here is the section from mine that has 2 player working in all emulators. It is set up for a neo-geo control panel.
input_player1_a = "alt" input_player1_b = "ctrl" input_player1_y = "space" input_player1_x = "x" input_player1_start = "num1" input_player1_select = "num5" input_player1_l = null input_player1_r = null input_player1_left = "left" input_player1_right = "right" input_player1_up = "up" input_player1_down = "down" input_player2_a = "s" input_player2_b = "a" input_player2_y = "q" input_player2_x = "k" input_player2_start = "num2" input_player2_select = "num6" input_player2_l = null input_player2_r = null input_player2_left = "d" input_player2_right = "g" input_player2_up = "r" input_player2_down = "f"
any changes to fba2x.cfg will do nothing as @meleu said. You must edit retroarch.cfg
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.