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

UAE4All2: Joystick Recommendation



  • Hi. I realized that my PS3-Sixaxis does work to some degree (up, down, left, right), but the Buttons don't. As I read in the documentation, the controller support is hardcoded and not configurable. Which controller do you recommend to buy.

    My requirements are trivial:

    • It has 2 buttons: one is mapped to amiga-fire-1, the other to amiga-fire-2
    • the directions do work

    Will any cheap controller do? I doubt that because of my sixaxis experience.
    Thanks in advance, kirschsuppe


  • Global Moderator

    @kirschsuppe

    Well, the Wiki recommends the picade or anything else that is specifically designed for MAME use. This is stated to be because their control schemes are similar. You could also have your choice of controllers if you learn how to keymap. Some information on this can be found at...

    http://blog.petrockblock.com/forums/topic/mapping-a-game-controller-in-kodi/



  • Thank you. That is a nice hint into the right direction. If I use "Linux Joy Mapper" now to get my joypad to work in UAE4All2, does it overule my settings in emulationstation / retroarch?


  • Global Moderator

    @kirschsuppe

    It will override, but the instructions include a way to have it initiate alongside KODI. You would need to adapt that technique for UAE4All, but there are actually a few possible ways to launch and quit the mapper in tandem with whatever application you want. I've recently taught myself the ins & outs of xboxdrv as a universal joystick driver and plan to start on LJM next. My goal is to have universal controller support throughout my RetroPie setup... and of course, two chicks at the same time.



  • Thank you. Maybe there is another alternative: to overwrite the configuration right in the code. I found a post in the interwebs to checkout, manipulate and rebuild Hatari. Maybe (if the code is readable) this knowledge can be transferred to UAE4All2.



  • Has anyone found a (relatively) simple way to custom map a controller's buttons for UAE4All2 yet? I'm also using official Sony PS3 controller but it's far too unwieldy to use the left analog stick and L3/R3 for fire. Would much rather use the d-pad and X/Square (A/B).



  • I did not find a way to use the dpad (yet). But I found a way to make the analog stick usable and use X aus the primary fire button. Stay tuned.

    Edit: found a way to enable the dpad



  • Description

    You have to:

    • ssh into your pi box
    • checkout the sourcecode for uae4all
    • find and change the file with the controller configuration
    • recompile the sources
    • copy the compiled binary over to where retropie expects it

    What will you change:

    • configure a deadzone for the analog stick to prevent unwanted movement to one direction
    • enable the dpad on PS3 Dualshock 3 and Sixaxis controllers
    • enable the X Button as primary fire button on PS3 Dualshock 3 and Sixaxis controllers

    CLI history

    • cd ~/RetroPie-Setup/
    • sudo ./retropie_packages.sh uae4all sources
    • cd tmp/build/uae4all/src
    • sudo nano od-joy.cpp (see changes below)
    • cd ~/RetroPie-Setup/
    • sudo ./retropie_packages.sh uae4all build
    • quit running uae4all
    • sudo mv /opt/retropie/emulators/uae4all/uae4all /opt/retropie/emulators/uae4all/uae4all-old
    • sudo cp tmp/build/uae4all/uae4all /opt/retropie/emulators/uae4all/
    • start uae4all

    Changes in file od-joy.cpp

    Step 1

    remove the following lines completely (around line 40)

    extern int dpadUp;
    extern int dpadDown;
    extern int dpadLeft;
    extern int dpadRight;
    extern int buttonX;
    

    Step 2

    add

    int buttonX;
    int dpadUp, dpadDown, dpadLeft, dpadRight;
    

    right before statement

    SDL_Joystick *joy = nr == 0 ? uae4all_joy0 : uae4all_joy1;
    

    Step 3

    add

    buttonX = SDL_JoystickGetButton(joy, 14);
    dpadUp = SDL_JoystickGetButton(joy, 4);
    dpadDown = SDL_JoystickGetButton(joy, 6);
    dpadLeft = SDL_JoystickGetButton(joy, 7);
    dpadRight = SDL_JoystickGetButton(joy, 5);
    

    right after statement

    SDL_JoystickUpdate ();
    

    Step 4

    Find this block (around Line 150)

    if (dpadRight || SDL_JoystickGetAxis(joy, 0) > 0) right=1;
    if (dpadLeft || SDL_JoystickGetAxis(joy, 0) < 0) left=1;
    if (dpadUp || SDL_JoystickGetAxis(joy, 1) < 0) top=1;
    if (dpadDown || SDL_JoystickGetAxis(joy, 1) > 0) bot=1;
    

    and change it to

    if (dpadRight || SDL_JoystickGetAxis(joy, 0) > 8192) right=1;
    if (dpadLeft || SDL_JoystickGetAxis(joy, 0) < -8192) left=1;
    if (dpadUp || SDL_JoystickGetAxis(joy, 1) < -8192) top=1;
    if (dpadDown || SDL_JoystickGetAxis(joy, 1) > 8192) bot=1;
    


  • This post is deleted!


  • @kirschsuppe
    Hi,
    what does it mean quit/starting uae4all..
    if i'm in console it isn't closed?

    after i compile
    sudo ./retropie_packages.sh uae4all build
    it says
    collect2: error: ld returned 1 exit status
    Makefile.pi:174: recipe for target 'uae4all' failed
    make: *** [uae4all] Error 1
    /home/pi/RetroPie-Setup
    Could not successfully build Amiga emulator UAE4ALL (/home/pi/RetroPie-Setup/tmp/build/uae4all/ua4all not found)

    i try to start uae4all and doesn't work .. is it possible having a package or file working to put in the sd?
    Thks a lot



  • @magoburicchio I would love to be able to change the UAE4ALL configuration, some games just don't play well with keyboard. I was curious, did you ever get it to compile and run properly?

    Thanks!



  • @Goosebuster hey. I got it to complie and work but i only changed it to set up the dead zone for the analog stick and so far all the games i have tired have worked fine


Log in to reply
 

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.