UAE4Arm XBOXDRV - Mouse in Pad - F12
-
Hi all,
I am struggling wit UAE4Arm.
It is not convenient to have to hook keyboard and mouse just to start and quit a game.Can someone point me on how to have my 360 pad (using xboxdrv) to use X,Y as mouse buttons, right stick as mouse and Select as F12?
Thanx guys! -
See the advanced mapping thread, but you may have to map your joypad outside of the emulator. Tbh I just use small cheap WiFi keyboards
-
I have. In fact I study every addition made BUT I am not at a NASA level yet (hahahahaha) so I cannot implement some of the things suggested.
If any member of the community has achieved the mouse and F12 thingies in UAE4Arm, it would be nice to share his/her config.
-
@Pyjamarama said in UAE4Arm XBOXDRV - Mouse in Pad - F12:
If any member of the community has achieved the mouse and F12 thingies in UAE4Arm, it would be nice to share his/her config.
Sharing a base controller mapping won't work because every model of controller is different. However, once the base is done, the points of interest you mentioned would simply be a matter of adding these two lines:
--ui-axismap x1=REL_X:10,y1=REL_Y:10 \ --ui-buttonmap y=BTN_LEFT,x=BTN_RIGHT,back=KEY_F12 \
The first line maps the mouse movement to the left joystick and the second line maps the 'X' and 'Y' buttons to right and left mouse clicks respectively, as well as 'F12' key to the 'Back' button. 'Back' is used because xboxdrv is virtualizing an Xbox 360 controller which lacks a 'Select' button, so most people just use 'Back' it as a stand-in.
-
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...
-
There are a few more steps involved and the command will actually need to be in the launch script that the 'emuators.cgf' file references. I would recommend taking a look at the guide again from the beginning, but the short of it is that you'll map the physical controller to a virtual XBox 360 controller. From there you can key-map or calibrate the virtual controller, leaving only the final step where you add the whole configuration to
/home/pi/RetroPie/roms/amiga/+Start\ UAE4Arm.sh
. It can be daunting to start for sure. It actually took me a few months of looking at it off and on to get it in my head without any real guides out there. -
@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
andevtest /dev/input/event0
are your friends).
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.