xboxdrv with lr-x1
-
can xboxdrv be used with lr- emulators (libretro emulators)? i'm having trouble getting this example script to work with my setup (System Info: Retropie 4.5 from Pre made SD Image on RetroPie website running on Pi Zero W inside Retroflag GPi Case).
my script looks like the Expanding Launch Capabilities example in the RetroPie Docs xboxdrv guide; here's a snippet i added for lr-x1 to my
runcommand-onstart.sh
script:lr-x1) case $rom in "Boulder Dash.d88"|"test2.zip"|"test3.zip") # Configuration used only for these ROMs $xboxkill joycommand="$basicGPI $x1boulderdash &" eval $joycommand ;; *) # Configuration for every other ROMs on this emulator $xboxkill joycommand="$basicGPI &" eval $joycommand ;; esac ;;
but when i launch the emulator with this the controls no longer work at all in any x1 rom.
(same thing happened when i tried to use xboxdrv with lr-vice in this way.)
here are my $basicGPI and $x1boulderdash snippets:
basicGPI="sleep 3 && sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \ --evdev $joystick \ --detach-kernel-driver \ --silent \ --force-feedback \ --deadzone-trigger 15% \ --deadzone 4000 \ --mimic-xpad \ --dpad-as-button \ --trigger-as-button \ --no-extra-events \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RX=x2,ABS_RY=y2,ABS_Z=lt,ABS_RZ=rt \ --evdev-keymap BTN_SOUTH=a,BTN_EAST=b,BTN_NORTH=x,BTN_WEST=y,BTN_TL=lb,BTN_TR=rb,BTN_THUMBL=tl,BTN_THUMBR=tr,BTN_MODE=guide,BTN_SELECT=back,BTN_START=start,BTN_TRIGGER_HAPPY3=du,BTN_TRIGGER_HAPPY4=dd,BTN_TRIGGER_HAPPY1=dl,BTN_TRIGGER_HAPPY2=dr \ --evdev-absmap ABS_X=dpad_x,ABS_Y=dpad_y \ --evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y"
x1boulderdash="--ui-buttonmap lb=KEY_0,rb=KEY_2,start=KEY_ENTER+KEY_SPACE \ --ui-buttonmap du=KEY_8,dd=KEY_2,dl=KEY_4,dr=KEY_6"
-
could somebody help me with this example
runcommand-onstart.sh
script from the xboxdrv guide for retropie?for the following example script, i want to try using xboxdrv just for a certain rom, and if that rom doesn't match i don't want to launch/use xboxdrv. ex. in the
fba)
section below, what if i wanted to use xboxdrv if there is a match for one of the$rom
cases, but do nothing if not? would i just delete these lines?:$xboxkill joycommand="$basicPS3 &" eval $joycommand ;;
#!/bin/sh ## Uncomment one or all of the following if you need to find some information about the emulator or roms ## Name of the emulator #echo $1 >> /dev/shm/runcommand.log ## Name of the software used for running the emulation #echo $2 >> /dev/shm/runcommand.log ## Name of the rom #echo $3 >> /dev/shm/runcommand.log ##Executed command line #echo $4 >> /dev/shm/runcommand.log ### The FUN begins #Get ROM name striping full path rom="${3##*/}" ### Try to automatically find the correct event[•] of the connected controllers controller1=`cat /proc/bus/input/devices | egrep -i "js*" | sort | grep -o 'event[0-9]' | sed -n -e '1{p;q}'` controller2=`cat /proc/bus/input/devices | egrep -i "js*" | sort | grep -o 'event[0-9]' | sed -n -e '2{p;q}'` controller3=`cat /proc/bus/input/devices | egrep -i "js*" | sort | grep -o 'event[0-9]' | sed -n -e '3{p;q}'` controller4=`cat /proc/bus/input/devices | egrep -i "js*" | sort | grep -o 'event[0-9]' | sed -n -e '4{p;q}'` ### Set variables for your joypad and emulator ### Basic Configuraions - Standard controller mappings basicPS3="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv >/dev/null \ --evdev /dev/input/$controller1 \ --silent \ --detach-kernel-driver \ --force-feedback \ --mimic-xpad \ --dpad-as-button \ --trigger-as-button \ --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RX=y2 \ --evdev-keymap KEY_#302=a,KEY_#301=b,BTN_DEAD=x,KEY_#300=y,BTN_THUMB=tl,BTN_THUMB2=tr,BTN_BASE5=lb,BTN_BASE6=rb,BTN_BASE3=lt,BTN_BASE4=rt,BTN_TRIGGER=back,BTN_TOP=start,BTN_SOUTH=guide,BTN_TOP2=du,BTN_PINKIE=dr,BTN_BASE=dd,BTN_BASE2=dl --calibration x1=-32767:0:32767,y1=-32767:0:32767,x2=-32767:0:32767,y2=-32767:0:32767" ### Extended Configurations ### Specific emulator configuration or any other parameters you will need only for some emulators scummVM="--axismap -Y1=Y1,-Y2=Y2 \ --ui-axismap x1=REL_X:10,y1=REL_Y:10 \ --ui-buttonmap a=BTN_LEFT,b=BTN_RIGHT,start=KEY_F5,back=KEY_ESC \ --ui-buttonmap guide=void,x=void,y=void,lb=void,rb=void,tl=void,tr=void,lt=void,rt=void,back=void \ --ui-axismap x2=void" amiga="--axismap -Y1=Y1,-Y2=Y2 \ --ui-axismap x2=REL_X:1,y2=REL_Y:1 \ --ui-axismap x1=KEY_LEFT:KEY_RIGHT,y1=KEY_DOWN:KEY_UP \ --ui-buttonmap du=KEY_UP,dd=KEY_DOWN,dl=KEY_LEFT,dr=KEY_RIGHT \ --ui-buttonmap lt=BTN_LEFT,rt=BTN_RIGHT,start=KEY_ESC,back=KEY_LEFTCTRL,y=KEY_SPACE,a=KEY_LEFTCTRL,b=KEY_LEFTALT,x=KEY_LEFTSHIFT \ --ui-buttonmap guide=void,tl=void,lt=void,rt=void,back=void \ --ui-axismap x2=void" fourway="--four-way-restrictor" invert="--ui-buttonmap du=KEY_DOWN,dd=KEY_UP" ### Kill Command xboxkill="sudo killall >>/dev/shm/runcommand.log xboxdrv" ### Execute the driver with the configuration you need # $1 is the name of the emulation, not the name of the software used # it is intellivision not jzintv case $1 in mame-libretro) ;; fba) case $rom in "amidar.zip"|"atetris.zip"|"puckman.zip") # Configuration used only for these ROMs $xboxkill joycommand="$basicPS3 $fourway &" eval $joycommand ;; *) # Configuration for every other ROMs on this emulator $xboxkill joycommand="$basicPS3 &" eval $joycommand ;; esac ;; daphne) ;; scummvm) $xboxkill joycommand="$basicPS3 $scummVM &" eval $joycommand ;; amiga) $xboxkill joycommand="$basicPS3 $amiga &" eval $joycommand ;; intellivision) ;; esac
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.