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

    Found a fix for deadzone issue on UAE4ARM (Amiga)

    Scheduled Pinned Locked Moved Help and Support
    uae4armamigadeadzone
    5 Posts 3 Posters 2.5k 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.
    • G
      GrethTom
      last edited by GrethTom

      By default, there is no deadzone parameter in UAE4ARM and looking at the code it just registers anything off 0 to be a movement (for analogue stick usage), queue a frustrating time trying to control games. Looking at most other emulators they have 4000 as the default. Found a way of updating it so it is now finally usable with an analogue joypad (like the 360 controller). To update you need to do the following.

      1. Make sure you exit EmulationStation so you are at the command prompt (this can be done by hitting F4).

      2. Type the following:
        cd RetroPie-Setup
        sudo ./retropie_packages.sh uae4arm sources

      3. Once the last command is complete, enter the following:
        sudo nano /home/pi/RetroPie-Setup/tmp/build/uae4arm/src/od-Pandora/joystick.cpp

      4. A little way down the file you will find the following 4 lines:
        if ((hat & SDL_HAT_RIGHT) || dpadRight || SDL_JoystickGetAxis(joy, 0) > 0) right=1;
        if ((hat & SDL_HAT_LEFT) || dpadLeft || SDL_JoystickGetAxis(joy, 0) < 0) left=1;
        if ((hat & SDL_HAT_UP) || dpadUp || SDL_JoystickGetAxis(joy, 1) < 0) top=1;
        if ((hat & SDL_HAT_DOWN) || dpadDown || SDL_JoystickGetAxis(joy, 1) > 0) bot=1;

      Change the last 0's of each line to the following (either 4000 or -4000)
      if ((hat & SDL_HAT_RIGHT) || dpadRight || SDL_JoystickGetAxis(joy, 0) > 4000) right=1;
      if ((hat & SDL_HAT_LEFT) || dpadLeft || SDL_JoystickGetAxis(joy, 0) < -4000) left=1;
      if ((hat & SDL_HAT_UP) || dpadUp || SDL_JoystickGetAxis(joy, 1) < -4000) top=1;
      if ((hat & SDL_HAT_DOWN) || dpadDown || SDL_JoystickGetAxis(joy, 1) >4000) bot=1;

      1. Save the file using Control X then Y to the prompt.

      2. Type the following:
        sudo ./retropie_packages.sh uae4arm build

      3. Once complete, copy the file 'uae4arm' from /home/pi/RetroPie-Setup/tmp/build/uae4arm/ to /opt/retropie/emulators/uae4arm/ (I do this via FTP software, not sure on the unix commands here)

      4. Reboot then launch Amiga emulator UAE4ARM as you would normally.

      Let me know how you get on.

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

        Nice - you should consider sending the changes upstream too - https://github.com/Chips-fr/uae4arm-rpi (and please use markdown to format posts - http://commonmark.org/help/)

        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 1
        • G
          GrethTom
          last edited by

          Great idea. I have now joined GitHub and suggested this as a change to the code.

          1 Reply Last reply Reply Quote 1
          • G
            GrethTom
            last edited by

            So just to follow-up, this code change was updated into UAE4ARM and getting the latest Binary, includes this fix. Very chuffed to be part of the development of UAE4ARM, even if it's a very tiny element.

            1 Reply Last reply Reply Quote 0
            • dankcushionsD
              dankcushions Global Moderator
              last edited by

              Great work :)

              1 Reply Last reply Reply Quote 0
              • 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.