RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    UAE4Arm XBOXDRV - Mouse in Pad - F12

    Scheduled Pinned Locked Moved Help and Support
    uae4armxboxdrvmouse
    7 Posts 4 Posters 2.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Pyjamarama
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • BuZzB
        BuZz administrators
        last edited by

        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

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        1 Reply Last reply Reply Quote 0
        • P
          Pyjamarama
          last edited by

          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.

          mediamogulM 1 Reply Last reply Reply Quote 0
          • mediamogulM
            mediamogul Global Moderator @Pyjamarama
            last edited by mediamogul

            @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.

            RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

            1 Reply Last reply Reply Quote 1
            • P
              Pyjamarama
              last edited by

              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...

              mediamogulM kormikK 2 Replies Last reply Reply Quote 0
              • mediamogulM
                mediamogul Global Moderator @Pyjamarama
                last edited by mediamogul

                @Pyjamarama

                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.

                RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                1 Reply Last reply Reply Quote 1
                • kormikK
                  kormik @Pyjamarama
                  last edited by kormik

                  @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).

                  1 Reply Last reply Reply Quote 2
                  • First post
                    Last post

                  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.