We have rebuild an old dead Arcade cabinet and fitted it with retropie, image: RetroPie SD-card Image for Raspberry Pi 2 Version 3.0 BETA 4
It uses two seperate “DragonRiseInc.GenericUSBJoystick” joystickcontroller.
As the arcade cabinet only has 3 buttons+start+coin on each side, there are plenty of button connections left on the controllers.
I would like to dedicate a button to exit the emulator and return to the retropie frontend.
I have managed to do so in AdvMame and Mame4All, but am having trouble in FBA.
The exitbutton is wired to js0-button 10 (verified by jstest /dev/input/js0)
my /opt/retropie/configs/fba/fba2x.cfg is as follows. As you can see, I tried to add QUIT to the joystick portion.
[Keyboard]
# Get codes from /usr/include/SDL/SDL_keysym.h
A_1=306
B_1=32
X_1=308
Y_1=304
L_1=122
R_1=120
START_1=13
SELECT_1=9
LEFT_1=276
RIGHT_1=275
UP_1=273
DOWN_1=274
QUIT=27
#player 2 keyboard controls, disabled by default
A_2=999
B_2=999
X_2=999
LEFT_1=276
RIGHT_1=275
UP_1=273
DOWN_1=274
QUIT=27
#player 2 keyboard controls, disabled by default
A_2=999
B_2=999
X_2=999
Y_2=999
L_2=999
R_2=999
START_2=999
SELECT_2=999
LEFT_2=999
RIGHT_2=999
UP_2=999
DOWN_2=999
[Joystick]
# Get codes from “jstest /dev/input/js0”
# from package “joystick”
A_1=0
B_1=1
X_1=2
Y_1=3
L_1=4
R_1=6
START_1=9
SELECT_1=8
QUIT=10
#Joystick axis
JA_LR=0
JA_UD=1
#player 2 button configuration
A_2=0
B_2=1
X_2=2
Y_2=3
L_2=4
R_2=6
START_2=9
SELECT_2=8
#Joystick axis
JA_LR_2=0
JA_UD_2=1
[Graphics]
DisplaySmoothStretch=1
# Display Effect: 0 none, 1 scanlines
DisplayEffect=0
DisplayBorder=0
MaintainAspectRatio=1
[Sound]
I also altered my /opt/retropie/configs/all/retroarch.cfg file and added:
input_exit_emulator = escape
input_exit_emulator_btn = 10
input_enable_hotkey = nul