Has anyone got a keyboard working for Player 2 in PiFBA?
-
@rbaker said in Has anyone got a keyboard working for Player 2 in PiFBA?:
@TheStrayMongrel lr-fba-next already works on one keyboard because it's a "lr" core and therefore uses your universal retroarch config so there shouldn't be any issues.
Hmm okay, will have to look further into it. Might have ballsed it up by using the Adafruit keyboard utility from the start.
-
-
@TheStrayMongrel Pretty similar to mine, so it should work:
# Keyboard input, Joypad and Joyaxis will all obey the "nul" bind, which disables the bind completely, # rather than relying on a default. 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"
-
@rbaker
I tested with this file:
https://raw.githubusercontent.com/RetroPie/pifba/76ef8cc7c093db4c1150e4e1eeee24f860f53935/fba2x.cfg.templateDo you have 2 controllers? If so, try to start pifba with the keyboard AND two or more controllers plugged. Ignore the controllers and test two players on keyboard.
-
@meleu Thanks!
ok, so I tried this:
Start PiFBA with keyboard in AND IPac connected. P1 disabled on Keyboard - only IPac works!
then
Remove IPac and use only Keyboard for everything. Only P1 works and pressing zero brings up FPS! Pressing 5 to start P2 does nothing. I configured the keyboard using Autodetect and have not configured anything else. I used the template but no player 2. I updated from Source. Next I'm going to try a fresh install.
-
This post is deleted! -
@meleu Thanks! I got it going! At last! I updated from Source a second time and it worked great. No idea why the first time didn't work though. Thank you for your assistance, it's another problem ticked off for me. Does pressing Zero insert a coin AND display FPS for you too?
-
@rbaker I'm glad to know it!
-
@meleu Ok, so it works with a keyboard perfectly. Sadly, it does not work with an Ipac2 with current firmware. This is the strange behaviour.......
With Ipac2 unplugged but with Keyboard plugged in, launch PiFBA. PiFBA has full 2 player functionality via the keyboard. Now I plug in the Ipac2 and have total control using both the Ipac2 and the keyboard. Now I unplug the Keyboard and Ipac2 maintains it's full 2 player functionality. All good.
Problem is, I now escape PiFBA and relaunch it. No two Player functionality, only one player. I plug the keyboard back in. Still no two player functionality. The only way to restore it is to launch it with the Ipac unplugged which is very odd and annoying. I am going to assume that this is to do with the fact that the Ipac is now presented as a joypad by default and not a keyboard in it's current firmware. I am not that desperate to use PiFBA as the libretro version works just fine but just as I've solved two player another problem appears......I think it's time to discard PiFBA!
-
@rbaker I know where the problem is. Feel free to change to the libretro solution, but I'll ask you to test it again after I correct it. I think it's important to the raspi 1 and zero owners. ;-)
-
@meleu sounds promising again!
-
@rbaker can you try it again?
Reinstall from source and test it again...
The correction was made a few minutes ago. -
-
@rbaker said in Has anyone got a keyboard working for Player 2 in PiFBA?:
So what was the issue?
Pretty similar to what I said here: https://retropie.org.uk/forum/post/14292
There is a variable in the code to count the number of controllers available.
Initially the problem was:
if no joysticks connected, pifba pretended to have one controller and used the keyboard for it.
First I fixed pifba to the "no joysticks connected" scenario only.Then you reported that you had problems when connecting one, and only one, joystick. (Oh! How could I forget this scenario?! :D ). My last fix was to make pifba allways consider it has a minimum of 2 controllers. In other words, if zero or one joystick connected, consider to have 2 controllers (and get the keyboard configs at fba2x.cfg).
(Not sure if wrote it well. Sorry my poor english. :-) )
-
This is gold!
I have a Rpi 1 B+ and only PiFba is usable for me for Neo-Geo. I use two arcade style sets of controls which are connected via USB interfaces to the ports of the Pi, plus a USB keyboard.
I updated from source just like @meleu said, I used jstest to check the corresponding values of my controllers and edited fba2x.cfg to match my setup and voila! everything seems to work!!!...but....
...the UP/DOWN controlls of Player 1 don't work. Player 2 controls works excellent! Their settings in the fba2x.cfg file are quite identical. Any ideas?
-
@thekits Please post your config. Mine is:
A_1=306 # left ctrl B_1=32 # space X_1=308 # left alt Y_1=304 # left shift L_1=122 # z R_1=120 # x START_1=49 # 1 SELECT_1=53 # 5 LEFT_1=276 # left arrow RIGHT_1=275 # right arrow UP_1=273 # up arrow DOWN_1=274 # down arrow QUIT=27 # esc #player 2 keyboard controls, disabled by default A_2=97 #a (button1) B_2=113 #q (button3) X_2=115 #s (button2) Y_2=119 #w L_2=105 #i R_2=107 #k START_2=50 #2 SELECT_2=54 #6 LEFT_2=100 #d RIGHT_2=103 #g UP_2=114 #r DOWN_2=102 #f
and the controls are fine.
-
@rbaker I will as soon as I get home!
-
@thekits are you using keyboard or joystick for player1?
BTW, once you get it working, maybe you like to know this pifba trick:
https://retropie.org.uk/forum/topic/3563/pifba-trick-custom-button-configs-for-different-games -
-
@meleu This is fantastic, I was looking for this exact thing. I'm actually unsure if my player 2 works of not using my Ipac2 on my bartop, but this link to reconfigure for a 4 button or 6 button setup is brilliant. Thank you for sharing that.
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.