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

    pifba trick: custom button configs for different games)

    Scheduled Pinned Locked Moved Help and Support
    pifbaneo geo
    22 Posts 7 Posters 9.9k 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

      I'm a big pifba fan. It let me play Street Fighter Alpha 2, Marvel vs Capcom, Metal Slug and The King of Fighters on my raspi1 with a satisfactory performance. But one thing that bothered me was the fact that I had to manually change the fba2x.cfg file to remap the buttons when changing between these games.

      Recently it was implemented in the RetroPie's fork of pifba the --config option, where you can load a custom config file. And here I would like to share with you guys the trick I use to avoid the inconvenience described above.

      Step 0 - Reinstall pifba from source

      The --config option was implemented in 2016-08-24, so you may have to reinstall your pifba from source to get this trick working.

      Step 1 - Create custom fba2x.cfg files

      Let's consider here a joystick with the classics A, B, X, Y, L1, L2, R1 and R2 buttons.

      I created 2 files and put them in /opt/retropie/configs/fba:

      • pifba-4btns.cfg: inspired in SNK fighting games. Configured to use Y for weak punch, X for strong punch, B for weak kick, and A for strong kick. Example here.

      • pifba-6btns.cfg: inspired in Capcom fighting games. Configured to use Y for weak punch, R1 for medium punch, X for strong punch, B for weak kick, R2 for medium kick, and A for strong kick. Example here.

      Step 2 - Create custom emulators.cfg entries

      Edit the file /opt/retropie/configs/fba/emulators.cfg and add the following entries:

      pifba-4btns = "/opt/retropie/emulators/fba/pifba --config /opt/retropie/configs/fba/pifba-4btns.cfg %ROM%"
      pifba-6btns = "/opt/retropie/emulators/fba/pifba --config /opt/retropie/configs/fba/pifba-6btns.cfg %ROM%"
      

      The pifba is also used for neogeo, but for neogeo we only need the pifba-4btns.cfg file. Put the same content in the file /opt/retropie/configs/neogeo/emulators.cfg, except the pifba-6btns line.

      Step 3 - Make the game start with the proper config

      When launching a pifba/neogeo game, press a button to go to the runcommand menu. It looks like this:

      menu

      Then choose the "Select emulator for rom" and then select the pifba-Xbtns from the list. Launch the game and see if the buttons are OK for you.

      For neogeo you can "Select default emulator for neogeo" and choose the pifba-4btns.

      meleuM caver01C 2 Replies Last reply Reply Quote 1
      • meleuM
        meleu @meleu
        last edited by meleu

        There was a missing 'l' in theemulators.cfg lines in the first post. Here are the correct entries:

        pifba-4btns = "/opt/retropie/emulators/fba/pifba --config /opt/retropie/configs/fba/pifba-4btns.cfg %ROM%"
        pifba-6btns = "/opt/retropie/emulators/fba/pifba --config /opt/retropie/configs/fba/pifba-6btns.cfg %ROM%"
        
        1 Reply Last reply Reply Quote 0
        • BuZzB
          BuZz administrators
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • BuZzB
            BuZz administrators
            last edited by BuZz

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

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • P
                Polezi
                last edited by

                Hi, for me don't work, I use RP1 and pifba, when I choose the pifba-4btns.cfg the game don't load, any idea? thanks

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

                  @Polezi does it load when you don't use the trick here?

                  P 1 Reply Last reply Reply Quote 0
                  • P
                    Polezi @meleu
                    last edited by

                    @meleu Yes when I load with normal pifba the game works great

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

                      @meleu This is clever. I don't think to use this capability as much as I should. I tend to drop per-rom configs into the corresponding ROMs directory (which is fine for lr cores), but when you simply need consistency, this is cleaner, and beats running scripts to to copy files around pre and post launch.

                      My 4-player cocktail style cabinet built as a custom "roadcase"

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

                        @Polezi could you tell me what game it is? Or any other way to reproduce your issue.

                        P 1 Reply Last reply Reply Quote 0
                        • P
                          Polezi @meleu
                          last edited by

                          @meleu I'm using joystick, a Dragon Rise USB Controller, I use the same configuration of fba2x.cfg and change the numbers, I make all steps, then I click to lauch the game, black screen, don't load the files like the original way. I try copy the file fba2x.cfg and just change your name, don't work too, same problem.

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

                            @Polezi I've tested here on my raspi1 and it seems to work fine. Please, paste the content of the following files in http://codepad.org/ (select the "Plain Text" at the left of text box)

                            • /opt/retropie/configs/fba/emulators.cfg
                            • /opt/retropie/configs/fba/fba2x.cfg
                            • /opt/retropie/configs/fba/pifba-4btns.cfg

                            footnote: You could paste those files in pastebin or something, but I'm behind a restrictive proxy now and it doesn't block codepad.org...

                            1 Reply Last reply Reply Quote 0
                            • P
                              Polezi
                              last edited by Polezi

                              I think that I found the problem, my folder in retropie/emulators/ is pifba not fba, so I will change this, and now I update the fba in retropie setup but now don't show the option for load the game with pifba-4btns, for update I have to remove and install again? I click in update for the source, I'm so close to make work, now back to zero

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

                                @Polezi If you still need my help, please provide the info I asked above.

                                P 1 Reply Last reply Reply Quote 0
                                • P
                                  Polezi @meleu
                                  last edited by

                                  @meleu http://codepad.org/e7dFIg1p 4btns
                                  http://codepad.org/ljt4VBkF emulators
                                  http://codepad.org/vCCD1r8J fba

                                  Don't show anymore the option to choose 4btns for load the game, whats happening?

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

                                    @Polezi said in pifba trick: custom button configs for different games):

                                    http://codepad.org/e7dFIg1p 4btns

                                    Man, did you get this file from my old blog?! I think it's a bit outdated! I suggest you to use this file:
                                    https://raw.githubusercontent.com/meleu/share/master/pifba-4btns.cfg

                                    And for 6 buttons:
                                    https://raw.githubusercontent.com/meleu/share/master/pifba-6btns.cfg

                                    http://codepad.org/ljt4VBkF emulators

                                    This file is lacking these lines (as explained in the first post of this topic):

                                    pifba-4btns = "/opt/retropie/emulators/fba/pifba --config /opt/retropie/configs/fba/pifba-4btns.cfg %ROM%"
                                    pifba-6btns = "/opt/retropie/emulators/fba/pifba --config /opt/retropie/configs/fba/pifba-6btns.cfg %ROM%"
                                    

                                    This is why the 4btns/6btns options are not being offered in runcommand menu.

                                    EDIT: I noticed that the content of those lines are in only one line. Maybe you're editing the file in Notepad/Windows. If you are editing on a Windows environment, use Wordpad rather than notepad.

                                    P 1 Reply Last reply Reply Quote 0
                                    • P
                                      Polezi @meleu
                                      last edited by

                                      @meleu I donT have the folder fba inside emulators, Just pifba, shouldn't I change this LINE in emulators.cfg? And dont have pifba inside the folder pifba, only fba2x

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

                                        @Polezi said in pifba trick: custom button configs for different games):

                                        @meleu I donT have the folder fba inside emulators, Just pifba, shouldn't I change this LINE in emulators.cfg?

                                        You're right. The path has changed since I posted this trick. Please, fix it on your end.

                                        P 1 Reply Last reply Reply Quote 0
                                        • P
                                          Polezi @meleu
                                          last edited by

                                          @meleu I'm very happy here, the trick works, but I change the line in emulators to pifba-4btns = "/opt/retropie/emulators/pifba/fba2x --config /opt/retropie/configs/fba/pifba-4btns.cfg %ROM%" now let's play KOF

                                          1 Reply Last reply Reply Quote 1
                                          • SkinnyboyS
                                            Skinnyboy
                                            last edited by

                                            Hi @Meleu

                                            I've tried following the steps as set out by you above, but somehow still cant get my controller to work in a NeoGeo emulator. So far, I only have the one game in that particular emulator and it's because none of the other emulators seem to run it.

                                            It's a pain because I'm in the process of building an arcade machine and I'd really like if my controller (joystick and buttons) could work on all the games.

                                            Is there a possibility you could assist me please and I know nothing of programming?

                                            I'm running a RPI 3 b+ with a Dragon Rise inc. controller board.

                                            Thank you in advance.

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