Found a fix for deadzone issue on UAE4ARM (Amiga)
-
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.
-
Make sure you exit EmulationStation so you are at the command prompt (this can be done by hitting F4).
-
Type the following:
cd RetroPie-Setup
sudo ./retropie_packages.sh uae4arm sources -
Once the last command is complete, enter the following:
sudo nano /home/pi/RetroPie-Setup/tmp/build/uae4arm/src/od-Pandora/joystick.cpp -
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;-
Save the file using Control X then Y to the prompt.
-
Type the following:
sudo ./retropie_packages.sh uae4arm build -
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)
-
Reboot then launch Amiga emulator UAE4ARM as you would normally.
Let me know how you get on.
-
-
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/)
-
Great idea. I have now joined GitHub and suggested this as a change to the code.
-
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.
-
Great work :)
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.