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