Guide: Advanced Controller Mappings
-
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.
-
for some reason it will not see my mapping as a valid key press
Ah, OK. I think I know what's wrong. Take a look at the final part of section 3A of the guide if you haven't already. It tells how to set a udev rule so that RetroArch will see the xboxdrv vitualized keyboard as being a real keyboard.
-
the funny thing is that i already had that, so when i looked at it again i saw my problem
you have this on your guide
SUBSYSTEM=="input", ATTRS{name}=="Microsoft X-Box 360 pad - Keyboard Emulation", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="1"
i had to change it to this
SUBSYSTEM=="input", ATTRS{name}=="Microsoft X-Box 360 pad", GROUP="users", MODE="0666", ENV{ID_INPUT_KEYBOARD}="1"
i know that i dont have a custom name but i remember what the
cat /proc/bus/input/devices
pulled up when i ran it whit the script going.so i think that did it, but i will have to do more testing tomorrow, but it is looking good now
and as always thanks for the help
-
@ExarKunIv said in Guide: Advanced Controller Mappings:
you have this on your guide... i had to change it to this
I'll test that with a few controllers. It may need to be changed in the guide. Thanks for pointing it out.
-
well i have done testing on my end and my config works, and so do the others even with the change for the
99-xboxdrv.rules
here is my config for 8BitDo to work with videopac/Odyssey2
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 \ --dpad-as-button \ --trigger-as-button \ --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
just remember to do part of section 3A of the guide as @mediamogul says
-
quick question
how do i use this for ports, i mean what do i put in the nameif [ "$1" = "videopac" ]
example if i want to set a mapping for rise of the triad, do i use rott for that is the folder name, or does the word port need to be in there due to it being in the port folder?
hope this is clear
-
-
sweet
thanks again -
so have been playing round with getting ESC mapped for Solarus. so that way i can exit it easyly.
my mapping works greatif [ "$1" = "zelda_roth_se,zsdx,zsxd" ] then sudo killall > /dev/null 2>&1 xboxdrv sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv > /dev/null 2>&1 \ --evdev /dev/input/event1 \ --silent \ --detach-kernel-driver \ --force-feedback \ --mimic-xpad \ --deadzone 15% \ --evdev-no-grab \ --dpad-as-button \ --trigger-as-button \ --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_ESC \ --ui-axismap x2=void,Y2=void \ & fi
but only if i put it in manually. if will not auto start.
im sure that i have something wrong with the port name
if [ "$1" = "zelda_roth_se,zsdx,zsxd" ]
i have tryed just useing Solarus but no go. any ideas?
-
-
thanks for getting back to me, but sadly nothing happens
i ran
cat /proc/bus/input/devices
and all it pulls up is my 8BitDo.this is beginning to bug me
-
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.