Switch axis in pifba retropie emulator configuration

I recently replaced original icade joystick made by Zippy with the one from Sanwa. In order to fit the new joystick properly in the icade I needed to rotate the base 90 degrees.

This means vertical axis is now horizontal one and vice versa. It’s easy to re-configure this in EmulationStation and all changes will be properly propagated to retroarch configuration files.

Where it fails short is some other emulator configuration files that need to be fixed manually. This was the chase with Final Burn Alpha (pifba) that I use for games like Metal Slug.

You need to edit the fba2x.cfg file located at:

/opt/retropie/configs/fba/fba2x.cfg

Here is the example config found at that location:

[Keyboard]
 # Get codes from /usr/include/SDL/SDL_keysym.h
 A_1=306 #LCTRL (button1)
 B_1=32 #SPACE (button3)
 X_1=308 #LALT (button2
 Y_1=304 #LSHIFT
 L_1=122 #z
 R_1=120 #x
 START_1=49 #1
 SELECT_1=53 #5
 LEFT_1=276 #left
 RIGHT_1=275 #right
 UP_1=273 #up
 DOWN_1=274 #down
 QUIT=27 #escape
 #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

[Joystick]
 # Get codes from "jstest /dev/input/js0"
 # from package "joystick"
 A_1=3
 B_1=1
 X_1=2
 Y_1=0
 L_1=4
 R_1=5
 START_1=9
 SELECT_1=8
 #Joystick axis
 JA_LR=0
 JA_UD=1
 #player 2 button configuration
 A_2=3
 B_2=1
 X_2=2
 Y_2=0
 L_2=4
 R_2=5
 START_2=9
 SELECT_2=8
 #Joystick axis
 JA_LR=0
 JA_UD=1

[Graphics]
 DisplaySmoothStretch=1
 # Display Effect: 0 none, 1 scanlines
 DisplayEffect=0
 DisplayBorder=0
 MaintainAspectRatio=1

[Sound]

What I initially thought was to replace

#Joystick axis
JA_LR=0
JA_UD=1

to

#Joystick axis
JA_LR=1
JA_UD=0

But it doesn’t actually do the job. Because it will behave the same, as nothing was changed. What you actually need to do is to add _1:

#Joystick axis
JA_LR_1=1
JA_UD_1=0

This worked as a charm.

Be sure to backup your changed configuration file just in case retropie_setup script overwrites your changes.

Leave a Reply

Your email address will not be published. Required fields are marked *