Guide: Advanced Controller Mappings
-
it works :)
heres my config for my 8BitDo FC30
if [ "$1" = "apple2" ] then sudo killall > /dev/null 2>&1 xboxdrv sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \ --evdev /dev/input/event2 \ --detach-kernel-driver \ --force-feedback \ --dpad-as-button \ --trigger-as-button \ --deadzone-trigger 15% \ --deadzone 4000 \ --silent \ --axismap -Y1=Y1,-Y2=Y2 \ --buttonmap tl^toggle=tl \ --buttonmap tr^toggle=tr \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RZ=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap KEY_#304=a,KEY_#305=b,KEY_#307=x,KEY_#308=y,KEY_#312=lt,KEY_#313=rt,KEY_#310=lb,KEY_#311=rb,KEY_#317=tl,KEY_#318=tr,KEY_#314=back,KEY_#315=start \ --ui-axismap X1=KEY_KP4:KEY_KP6,Y1=KEY_KP8:KEY_KP2,X2=KEY_UNKNOWN:KEY_UNKNOWN,Y2=KEY_UNKNOWN:KEY_UNKNOWN \ --ui-buttonmap b=KEY_KPDOT,a=KEY_KP0,x=KEY_UNKNOWN,y=KEY_UNKNOWN,lb=KEY_F3,rb=KEY_F4,du=KEY_KP8,dd=KEY_KP2,dl=KEY_KP4,dr=KEY_KP6,start=KEY_PAUSE,back=KEY_UNKNOWN,lt=KEY_UNKNOWN,rt=KEY_UNKNOWN,tl=KEY_UNKNOWN,tr=KEY_UNKNOWN \ --ui-buttonmap back+start=KEY_F10,back+b=KEY_F2,back+y=KEY_F8,back+lb=KEY_LEFTALT+KEY_F12,back+rb=KEY_LEFTALT+KEY_F11,back+a=KEY_PAUSE \ --ui-buttonmap lt+a=KEY_A,lt+b=KEY_B,lt+x=KEY_X,lt+y=KEY_Y,lt+lb=KEY_L,lt+rb=KEY_R,lt+du=KEY_UP,lt+dd=KEY_DOWN,lt+dl=KEY_LEFT,lt+dr=KEY_RIGHT,lt+start=KEY_T,lt+back=KEY_E \ --ui-buttonmap rt+du=KEY_UP,rt+dd=KEY_DOWN,rt+dl=KEY_LEFT,rt+dr=KEY_RIGHT,rt+b=KEY_ESC,rt+a=KEY_ENTER \ --ui-axismap tl+x1=REL_X:20,tl+y1=REL_Y:20 \ --ui-buttonmap tr+b=BTN_LEFT,tr+a=BTN_RIGHT \ --ui-buttonmap guide=void \ & fi
did anyone use this to get the Videopac/Odyssey 2 to work?
that will be my next mission. -
@ExarKunIv said in Guide: Advanced Controller Mappings:
it works :)
Nice!
did anyone use this to get the Videopac/Odyssey 2 to work?
The Videopac/Odyssey 2 emulator is a RetroArch core, so you might not need an xboxdrv mapping. I use one to map 0-9 to the right joystick for starting games, but that's about it.
-
yes i did see that as i started messing around with it more.
@mediamogul said in Guide: Advanced Controller Mappings:
I use one to map 0-9 to the right joystick for starting games
good to know that it can be done.
does the mapping have to be done in the RetroArch config?
i would think it would, but not sure -
I use a trick to where I put
--evdev-no-grab
into an xboxdrv configuration. This allows the physical controller to still have control input that would otherwise be blocked to prevent a conflict with the xboxdrv virtual controller. Then I map every button on the virtual controller toKEY_UNKNOWN
except for the right joystick, which I map to the number pad. This way, RetroArch can still make use of the original control scheme with only the right joystick being read as keyboard input. -
-
here is what i got for now.
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/event2 \ --silent \ --detach-kernel-driver \ --force-feedback \ --mimic-xpad \ --dpad-as-button \ --deadzone 15% \ --trigger-as-button \ --evdev-no-grab \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RZ=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap KEY_#304=a,KEY_#305=b,KEY_#307=x,KEY_#308=y,KEY_#312=lt,KEY_#313=rt,KEY_#310=lb,KEY_#311=rb,KEY_#317=tl,KEY_#318=tr,KEY_#314=back,KEY_#315=start \ --axismap -Y1=Y1,-Y2=Y2 \ --ui-buttonmap a=KEY_UNKNOWN,b=KEY_UNKNOWN,start=KEY_UNKNOWN,back=KEY_UNKNOWN,x=KEY_UNKNOWN,y=KEY_UNKNOWN,lt=KEY_UNKNOWN,rt=KEY_UNKNOWN,lb=KEY_UNKNOWN,rb=KEY_UNKNOWN,tl=KEY_UNKNOWN,tr=KEY_UNKNOWN \ --ui-axismap x2=KEY_1:KEY_2,Y2=KEY_3:KEY_4 \ &
i dont get any errors, but still no mapping.
the no-grab works. as my left stick works fine. i think im useing the no-grab wrong
i'll mess around with it more tomrrow. -
RetroArch may be prioritizing the virtual xboxdrv controller as player one.
-
so i need to use this im guessing?
input_remapping_directory = "/opt/retropie/configs/fba/" input_player1_joypad_index = "1" input_player2_joypad_index = "0" input_player2_analog_dpad_mode = 1 #include "/opt/retropie/configs/all/retroarch.cfg"
sorry for asking all the questions. this config stuff for me is very confusing
-
Not a problem. If it is that RetroArch is confusing the controller order and if we're still talking about videopac/Odyssey², then your additions are right, but they should be made in
/opt/retropie/configs/videopac/retroarch.cfg
which would in turn mean that the first line would be:input_remapping_directory = "/opt/retropie/configs/videopac/"
-
-
i think this looks right from what you said
# Settings made here will only override settings in the global retroarch.cfg if placed above the #include line input_device = "Xbox 360 Wireless Receiver (XBOX)" input_driver = "udev" input_r_y_plus_axis = "+4" input_l3_btn = "9" input_r_x_minus_axis = "-3" input_l_btn = "4" input_load_state_btn = "4" input_start_btn = "7" input_exit_emulator_btn = "7" input_l_y_minus_axis = "-1" input_up_btn = "13" input_r_y_minus_axis = "-4" input_a_btn = "1" input_b_btn = "0" input_reset_btn = "0" input_down_btn = "14" input_l_x_plus_axis = "+0" input_l_y_plus_axis = "+1" input_r_btn = "5" input_save_state_btn = "5" input_r2_axis = "+5" input_r3_btn = "10" input_right_btn = "12" input_state_slot_increase_btn = "12" input_key_1 = "3" input_menu_toggle_btn = "3" input_select_btn = "6" input_enable_hotkey_btn = "6" input_l_x_minus_axis = "-0" input_y_btn = "2" input_left_btn = "11" input_state_slot_decrease_btn = "11" input_r_x_plus_axis = "+3" input_l2_axis = "+2" input_remapping_directory = "/opt/retropie/configs/videopac/" input_player1_joypad_index = "1" input_player2_joypad_index = "0" input_player2_analog_dpad_mode = 1 #include "/opt/retropie/configs/all/retroarch.cfg"
-
ok this is a good head turner
i add this to my videopac as we said
input_remapping_directory = "/opt/retropie/configs/videopac/" input_player1_joypad_index = "1" input_player2_joypad_index = "0" input_player2_analog_dpad_mode = 1 #include "/opt/retropie/configs/all/retroarch.cfg"
and it switchs my 8BitDo to player 2
if i change it to this
input_remapping_directory = "/opt/retropie/configs/videopac/" input_player1_joypad_index = "0" input_player2_joypad_index = "1" input_player2_analog_dpad_mode = 1 #include "/opt/retropie/configs/all/retroarch.cfg"
its player 1 again
and here is what i got when i ran the script
pi@retropie:~ $ xboxdrv 0.8.8 - http://pingus.seul.org/~grumbel/xboxdrv/ Copyright © 2008-2011 Ingo Ruhnke <grumbel@gmail.com> Licensed under GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details. Your Xbox/Xbox360 controller should now be available as: /dev/input/js1 /dev/input/event3 Press Ctrl-C to quit Shutdown complete
not really sure where to go from here.
-
That appears to indicate a successful launch of xboxdrv. Are you saying that it stays on that screen indefinitely? Post your script and we'll take a look.
-
it says up until i exit a game, turn off my controller, or press ctrl c
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev /dev/input/event2 \ --silent \ --detach-kernel-driver \ --force-feedback \ --mimic-xpad \ --deadzone 15% \ --evdev-no-grab \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RZ=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap KEY_#304=a,KEY_#305=b,KEY_#307=x,KEY_#308=y,KEY_#312=lt,KEY_#313=rt,KEY_#310=lb,KEY_#311=rb,KEY_#317=tl,KEY_#318=tr,KEY_#314=back,KEY_#315=start \ --axismap -Y1=Y1,-Y2=Y2 \ --ui-buttonmap a=KEY_UNKNOWN,b=KEY_UNKNOWN,start=KEY_UNKNOWN,back=KEY_UNKNOWN,x=KEY_UNKNOWN,y=KEY_UNKNOWN,lt=KEY_UNKNOWN,rt=KEY_UNKNOWN,lb=KEY_UNKNOWN,rb=KEY_UNKNOWN,tl=KEY_UNKNOWN,tr=KEY_UNKNOWN \ --ui-axismap x2=KEY_1:KEY_2,Y2=KEY_3:KEY_4 \ &
is that i manually add
the shutdown complete was just from me exiting the game.
other then no errors coming up i get no mapping down. i still need my usb keyboard in to press 1 -
I've only ever known the screen to stay like that when the '&' is left off the tail end of the xboxdrv launch script. If that were the case, pressing 'Ctrl-C' would stop xboxdrv and allow things to move forward without the map being active, which would explain why it's not accessible once the emulator is up. You've posted the command itself, but can you post it in context with how it's being launched from
runcommand-onstart.sh
? -
if [ "$1" = "Videopac" ] then sudo killall > /dev/null 2>&1 xboxdrv sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \ --evdev /dev/input/event2 \ --silent \ --detach-kernel-driver \ --force-feedback \ --mimic-xpad \ --deadzone 15% \ --evdev-no-grab \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RZ=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap KEY_#304=a,KEY_#305=b,KEY_#307=x,KEY_#308=y,KEY_#312=lt,KEY_#313=rt,KEY_#310=lb,KEY_#311=rb,KEY_#317=tl,KEY_#318=tr,KEY_#314=back,KEY_#315=start \ --axismap -Y1=Y1,-Y2=Y2 \ --ui-buttonmap a=KEY_UNKNOWN,b=KEY_UNKNOWN,start=KEY_UNKNOWN,back=KEY_UNKNOWN,x=KEY_UNKNOWN,y=KEY_UNKNOWN,lt=KEY_UNKNOWN,rt=KEY_UNKNOWN,lb=KEY_UNKNOWN,rb=KEY_UNKNOWN,tl=KEY_UNKNOWN,tr=KEY_UNKNOWN \ --ui-axismap x2=KEY_1:KEY_2,Y2=KEY_3:KEY_4 \ & fi
sorry for the delay
busy nite -
Everything appears to be OK. The only thing I can even guess is that there might be something else in
runcommand-onstart.sh
that may be conflicting in some way. -
ok ill pull out the other configs and see that i get
-
ok i pulled everything out of my
runcommand-onstart.sh
and still got nothing. so i ran
cat /proc/bus/input/devices
and got thiscat /proc/bus/input/devices I: Bus=0005 Vendor=3810 Product=0009 Version=0100 N: Name="8Bitdo FC30 Pro" P: Phys=b8:27:eb:47:c7:78 S: Sysfs=/devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:3810:0009.0003/input/input8 U: Uniq=e4:17:d8:7a:6a:7d H: Handlers=js0 event0 B: PROP=0 B: EV=1b B: KEY=ffff0000 0 0 0 0 0 0 0 0 0 B: ABS=30627 B: MSC=10
the event code is different. so i went in and changed it in my script
if [ "$1" = "Videopac" ] then sudo killall > /dev/null 2>&1 xboxdrv sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \ --evdev /dev/input/event0 \ --silent \ --detach-kernel-driver \ --force-feedback \ --mimic-xpad \ --deadzone 15% \ --evdev-no-grab \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RZ=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ --evdev-keymap KEY_#304=a,KEY_#305=b,KEY_#307=x,KEY_#308=y,KEY_#312=lt,KEY_#313=rt,KEY_#310=lb,KEY_#311=rb,KEY_#317=tl,KEY_#318=tr,KEY_#314=back,KEY_#315=start \ --axismap -Y1=Y1,-Y2=Y2 \ --ui-buttonmap a=KEY_UNKNOWN,b=KEY_UNKNOWN,start=KEY_UNKNOWN,back=KEY_UNKNOWN,x=KEY_UNKNOWN,y=KEY_UNKNOWN,lt=KEY_UNKNOWN,rt=KEY_UNKNOWN,lb=KEY_UNKNOWN,rb=KEY_UNKNOWN,tl=KEY_UNKNOWN,tr=KEY_UNKNOWN \ --ui-axismap x2=KEY_1:KEY_2,Y2=KEY_3:KEY_4 \ & fi
sadly nothing, but i can test it my controller using
evtest /dev/input/event0
and i get reading, but nothing showing any mapping. :(
so it still seems that the--evdev-no-grab \
is working too welledit
i know why the event number changed so no big on there -
update
my mapping works, i move my right joystick and i get KEY_1, KEY_2 ect..and when i exit the
evtest /dev/input/event1
goes away showing that it see that i have exited the same, and the--evdev-no-grab \
works as i can move with in the game just fine....as long as i have a usb keyboard to press 1 for me.for some reason it will not see my mapping as a valid key press
now im confused.
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.