RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Has anyone got a keyboard working for Player 2 in PiFBA?

    Scheduled Pinned Locked Moved Help and Support
    48 Posts 9 Posters 19.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • meleuM
      meleu
      last edited by meleu

      @rbaker I would like to know if now you have your keyboard working for player2 in PiFBA. I did it for you, dude! :-)

      • Useful topics
      • joystick-selection tool
      • rpie-art tool
      • achievements I made
      rbakerR 2 Replies Last reply Reply Quote 0
      • rbakerR
        rbaker @meleu
        last edited by

        @meleu Hi, still waiting to try it because my machine is currently in school as a final week treat for the kids I teach. When the machine comes home it'll be the first thing I do! I'll let you know for sure when I do the update. Thanks.

        1 Reply Last reply Reply Quote 1
        • TheStrayMongrelT
          TheStrayMongrel
          last edited by

          Anyone made any progress on this issue? Thanks

          Raspberry Pi 2 B+

          meleuM 1 Reply Last reply Reply Quote 0
          • meleuM
            meleu @TheStrayMongrel
            last edited by meleu

            @TheStrayMongrel said in Has anyone got a keyboard working for Player 2 in PiFBA?:

            Anyone made any progress on this issue? Thanks

            I did. I can control 2 players with only one keyboard.

            Look here what happened:
            https://retropie.org.uk/forum/topic/1914/has-anyone-got-a-keyboard-working-for-player-2-in-pifba/9

            If you update your pifba from source you'll get it! ;-)

            • Useful topics
            • joystick-selection tool
            • rpie-art tool
            • achievements I made
            TheStrayMongrelT 1 Reply Last reply Reply Quote 0
            • TheStrayMongrelT
              TheStrayMongrel @meleu
              last edited by

              @meleu Ah fantastic. Sorry to ask when I'm sure is elementary to most but how do I "update pifba from source", run a shell command I assume? Thanks heaps for all the help.

              Raspberry Pi 2 B+

              meleuM 1 Reply Last reply Reply Quote 0
              • meleuM
                meleu @TheStrayMongrel
                last edited by

                @TheStrayMongrel https://github.com/retropie/retropie-setup/wiki/Updating-RetroPie

                • Useful topics
                • joystick-selection tool
                • rpie-art tool
                • achievements I made
                TheStrayMongrelT 2 Replies Last reply Reply Quote 0
                • TheStrayMongrelT
                  TheStrayMongrel @meleu
                  last edited by

                  Excellent, thanks @meleu will give that a go.

                  Raspberry Pi 2 B+

                  1 Reply Last reply Reply Quote 0
                  • TheStrayMongrelT
                    TheStrayMongrel @meleu
                    last edited by

                    I assume this is not going to get lr-fba-next working with two players on one keyboard though @meleu ? Thats what I'm really after as SF3 and SFA wont work in piFBA.

                    Raspberry Pi 2 B+

                    rbakerR 1 Reply Last reply Reply Quote 0
                    • rbakerR
                      rbaker @TheStrayMongrel
                      last edited by

                      @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.

                      TheStrayMongrelT 2 Replies Last reply Reply Quote 0
                      • rbakerR
                        rbaker @meleu
                        last edited by

                        @meleu I just updated from Source but no luck for me. Any chance you could post your fba2x.cfg? Here is mine:

                        [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
                        

                        Player 1 works perfectly. Am I missing something when deciding on codes from SDL_keysym.h?

                        1 Reply Last reply Reply Quote 0
                        • TheStrayMongrelT
                          TheStrayMongrel @rbaker
                          last edited by

                          @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.

                          Raspberry Pi 2 B+

                          1 Reply Last reply Reply Quote 0
                          • TheStrayMongrelT
                            TheStrayMongrel @rbaker
                            last edited by

                            Hey @rbaker, could you see any reason this wouldnt work?

                            Raspberry Pi 2 B+

                            rbakerR 1 Reply Last reply Reply Quote 0
                            • rbakerR
                              rbaker @TheStrayMongrel
                              last edited by

                              @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"
                              
                              1 Reply Last reply Reply Quote 0
                              • meleuM
                                meleu @rbaker
                                last edited by

                                @rbaker
                                I tested with this file:
                                https://raw.githubusercontent.com/RetroPie/pifba/76ef8cc7c093db4c1150e4e1eeee24f860f53935/fba2x.cfg.template

                                Do 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.

                                • Useful topics
                                • joystick-selection tool
                                • rpie-art tool
                                • achievements I made
                                rbakerR 3 Replies Last reply Reply Quote 1
                                • rbakerR
                                  rbaker @meleu
                                  last edited by rbaker

                                  @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.

                                  1 Reply Last reply Reply Quote 0
                                  • rbakerR
                                    rbaker @meleu
                                    last edited by

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 0
                                    • rbakerR
                                      rbaker @meleu
                                      last edited by rbaker

                                      @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?

                                      meleuM 1 Reply Last reply Reply Quote 1
                                      • meleuM
                                        meleu @rbaker
                                        last edited by

                                        @rbaker I'm glad to know it!

                                        • Useful topics
                                        • joystick-selection tool
                                        • rpie-art tool
                                        • achievements I made
                                        rbakerR 1 Reply Last reply Reply Quote 0
                                        • rbakerR
                                          rbaker @meleu
                                          last edited by

                                          @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!

                                          meleuM 1 Reply Last reply Reply Quote 0
                                          • meleuM
                                            meleu @rbaker
                                            last edited by

                                            @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. ;-)

                                            • Useful topics
                                            • joystick-selection tool
                                            • rpie-art tool
                                            • achievements I made
                                            rbakerR 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.