@Pyjamarama said in UAE4Arm XBOXDRV - Mouse in Pad - F12:
I have put them in the opt/retropie/configs/amiga/emulators.cfg
uae4all = "/home/pi/RetroPie/roms/amiga/+Start\ UAE4All.sh"
default="uae4arm"
uae4arm="/home/pi/RetroPie/roms/amiga/+Start\ UAE4Arm.sh %ROM%"
--ui-axismap x1=REL_X:10,y1=REL_Y:10 \
--ui-buttonmap y=BTN_LEFT,x=BTN_RIGHT,back=KEY_F12 \
but it does not do anything. I must be doing something wrong...
It requires a bit more effort unfortunately.
Take a look at my solution that by the way enables per-game joypad mapping config.
The +Start UAE4Arm.sh script has been modified to look for a file with the same name as the .uae config, but having .script extension. The .script file can contain things you might want to get executed before launching the game and after it is closed.
/opt/retropie/configs/amiga/emulators.cfg uae4arm line:
uae4arm="/home/pi/RetroPie/roms/amiga/+Start\ UAE4Arm.sh %ROM%"
/home/pi/RetroPie/roms/amiga/+Start UAE4Arm.sh
#!/bin/bash
pushd "/opt/retropie/emulators/uae4arm"
config=$1
script=$(echo $config | awk -F\. '{print $1}').script
if [ -f "$script" ]; then
/bin/bash "$script" "before"
fi
if [ -n "$config" ]; then
./uae4arm -f "$config"
else
./uae4arm
fi
if [ -f "$script" ]; then
/bin/bash "$script" "after"
fi
popd
Now the fun part - an example specific for Slam Tilt (and my pad) - Slam Tilt.script:
(note: my config name is Slam Tilt.uae)
#!/usr/bin/env bash
case $1 in
"before")
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
--evdev /dev/input/event0 \
--silent \
--detach-kernel-driver \
--force-feedback \
--deadzone-trigger 15% \
--deadzone 4000 \
--device-name "Media-Tech Wireless Pad" \
--evdev-absmap ABS_X=x1,ABS_Y=y1 \
--evdev-keymap BTN_SOUTH=a,BTN_EAST=b,BTN_NORTH=x,BTN_C=y,BTN_WEST=lb,BTN_Z=rb,BTN_TL=tl,BTN_TR=tr,BTN_TL2=guide,BTN_SELECT=back,BTN_TR2=start \
--ui-buttonmap tl=KEY_SPACE,tr=KEY_SPACE,lb=KEY_A,rb=KEY_L,a=KEY_ENTER,b=KEY_S,x=KEY_Y,start=KEY_F1,guide=KEY_ESC,back=BTN_LEFT,y=KEY_UP \
--ui-axismap y1=KEY_DOWN,x1=KEY_LEFT \
&
;;
"after")
sudo pkill -9 xboxdrv
;;
*)
echo "Need a paramter: 'before' or 'after'"
esac
Obviously, you should tune the absmap, keymap, buttonmap and axismap lines to suit your needs (/opt/retropie/supplementary/xboxdrv/bin/xboxdrv --help-all and evtest /dev/input/event0 are your friends).