pifba trick: custom button configs for different games)
-
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
filesLet'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
entriesEdit 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:
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.
-
-
There was a missing 'l' in the
emulators.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%"
-
This post is deleted! -
This post is deleted! -
This post is deleted! -
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
-
@Polezi does it load when you don't use the trick here?
-
@meleu Yes when I load with normal pifba the game works great
-
@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.
-
@Polezi could you tell me what game it is? Or any other way to reproduce your issue.
-
@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.
-
@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...
-
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
-
@Polezi If you still need my help, please provide the info I asked above.
-
@meleu http://codepad.org/e7dFIg1p 4btns
http://codepad.org/ljt4VBkF emulators
http://codepad.org/vCCD1r8J fbaDon't show anymore the option to choose 4btns for load the game, whats happening?
-
@Polezi said in pifba trick: custom button configs for different games):
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.cfgAnd for 6 buttons:
https://raw.githubusercontent.com/meleu/share/master/pifba-6btns.cfghttp://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.
-
@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
-
@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.
-
@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
-
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.
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.