Please do not post a support request without first reading and following the advice in

(advanced) Guide: How to get uae4arm (amiga) working on picade with only your picade controls.

  • Hi,

    I could not get the default binary / sources of uae4arm to work on picade. The problem was the keys being pressed on a real keyboard or my keyboard encoder where my joystick was hooked to were interfering with the controls that the pandora version used to use and the controls for menu etc i could not map to my picade. So i'm going to explain how i got it working on my picade.

    i'm posting it here because someone on facebook asked me how i did it and i might benefit others as well

    First off start by using the retropie menu and let the uae4arm binary install from sources once, let it compile & build. This is to make sure you got everything setup and the essentials build tools / libaries.

    Next you'll need to connect to your pi using ssh. once logged in start by makeing a projects directory in your home / pi folder (don't type "$" it's to indacte a prompt:

    $ mkdir /home/pi/projects
    $ cd /home/pi/projects

    Next Git clone the original sources:

    $ git clone

    Next cd into the newly created directory

    $ cd /home/pi/projects/uae4arm-rpi

    Now we are going to edit some files to make the controls work for your picade. we'll start with the basic controls in this file using nano. in nano you work with key up down etc and edit the text parts. when your done you press ctrl+x and then type "y" key to save the file

    $ nano /home/pi/projects/uae4arm-rpi/src/od-pandora/config.h

    you need to edit the SDLK_* constants to something your picade / keyboard encoder uses, this is what i changed them to for the pimoroni picade: (you need to change these to what your encoder uses and you can look up the possible values in this file

    #define VK_A SDLK_LSHIFT
    #define VK_B SDLK_z
    #define VK_X SDLK_LCTRL
    #define VK_Y SDLK_LALT
    #define VK_L SDLK_SPACE
    #define VK_R SDLK_x
    #define VK_UP SDLK_UP
    #define VK_DOWN SDLK_DOWN
    #define VK_LEFT SDLK_LEFT

    next we will change the key for accessing the gui menu as i can't press any of the default keys using my encoder

    you'll have to edit a few files for this:

    1. change this file p->key_for_menu = SDLK_F12; to something you want your key to be set to for example in my case : p->key_for_menu = SDLK_c;
    $ nano /home/pi/projects/uae4arm-rpi/src/cfgfile.cpp
    1. change these 2 lines in this file: edit the 1st element to a key you want to use to access the menu i had chose C so i do these changes:

    static const int ControlKey_SDLKeyValues[] = {SDLK_F11 , SDLK_F12, SDLK_LALT , SDLK_LCTRL }; becomes static const int ControlKey_SDLKeyValues[] = { SDLK_c , SDLK_F12, SDLK_LALT , SDLK_LCTRL };`

    and const char *ControlKeyValues[] = { "F11", "F12", "LeftAlt", "LeftCtrl" }; becomes const char *ControlKeyValues[] = { "C", "F12", "LeftAlt", "LeftCtrl" };

    $ nano /home/pi/projects/uae4arm-rpi/src/od-pandora/gui/PanelInput.cpp

    Next we will disable any keyboard input you do this by commenting out the keyboard layout's in this file

    you have to place 3 times /* and 3 times */ in thise file i'll show the locations in the links below

    place "/*" without the double quotes so only /* at the beginnig of the lines here, here and here

    place "*/" without the double quotes so only */at the beginning of the lines here, here and here

    so you start with a /* at the beginning of a line and end it with */at the beginning of line (that's commenting out lines of code)

    $ nano /home/pi/projects/uae4arm-rpi/src/od-pandora/keyboard.cpp

    Next we are going to switch mouse button left and right to the VK_R and VK_L key you assigned in config.h

    you do this by editing the line here and here

    change setmousebuttonstate (1, 0, keystate[VK_A]); // A button -> left mouse to setmousebuttonstate (1, 0, keystate[VK_L]); // A button -> left mouse
    and change setmousebuttonstate (1, 1, keystate[VK_B]); // B button -> right mouse to setmousebuttonstate (1, 1, keystate[VK_R]); // B button -> right mouse

    $ nano /home/pi/projects/uae4arm-rpi/src/od-pandora/pandora_input.cpp

    now we are done changing the sources. Next we will compile a new binary with the changes we made
    (change make to make make PLATFORM=rpi1) if you have a raspberry pi 1 for 2 & 3 just type make

    $ cd /home/pi/projects/uae4arm-rpi
    $ make clean
    $ make

    now sit back and relax and let the pi work. if you have made no typing mistakes and did everything correctly there should be no errors

    next we need to copy this new binary to the location where retropie has uae4arm installed and making a backup of the previous version

    $ sudo mv /opt/retropie/emulators/uae4arm/uae4arm /opt/retropie/emulators/uae4arm/uae4arm.bak
    $ sudo cp /home/pi/projects/uae4arm-rpi/uae4arm /opt/retropie/emulators/uae4arm/uae4arm

    now the new emulator binary is in the correct place.

    The last thing you need to do is changing the settings of the emulator (you might need a keyboard for this intialally)

    • In the gui of the emulator Change the menu key to the key you had chosen, it should be visible in the combobox
    • change mouse speed to 0.50, 0.25 is too low for most games and they won't register mouse movement.
    • change input for port 1 to "dpad as mouse"
    • change input for port 2 to "dpad as joystick"

    save the configuration as a default. Next play load a disk image, and press the reset button. It should start. from what i have seen most roms come with some kind of intro / crack and in most cases you should be able to control the cracks menu's using the joystick up / down / right / left and the keys you had assigned to VK_L (= left mouse button) and VK_R (= right mouse button) in config.h. Most intro's wants you to press either the left mouse button or right mouse button to continue do this

    in game most games work with the keys you had assigned to X and Y, the key assigned to X being the start button.

    Some games use extra keys, what you need to do for those games is load the rom and save a config for it then goto input in the emulators gui and make sure use custom input ins enabled the change the values for either L / R or Y / X (you'll have to try it)

    for example the game 1943 uses an extra key space for dropping the "bomb" so you have to choose the space key for either (X / Y / A /B /L /R ) for example choose L. Then whenever you press the key that you had assigned to VK_L in that specific game will register a space keypress in the emulator and you can drop the bomb in 1943.

    Turrican is also such an example at least Left alt in my case needs to be extra assigned and i think there's another key but did not really look into that.

    If you had created uae files you will need to recreate them with new config template (use a config you saved before with no disk loaded and no customn input specifed and mouse speed set 0.50).

    That's how i did it and now my picade / arcade cabinet can use only my picade controls to control the games for amiga using uae4arm.

    just to be clear this is NOT a general solution as i completely disabled any external keyboards by these modifications and is only ment for people using arcade cabinets / bartops / picades with keyboard encoders. But i had to do it for my picade as one of the buttons kept pausing the game while the button itselve was needed for playing the games. It

  • @joyrider3774
    This is a great guide. A pi-based bartop cabinet build is in my not-too-distant future, and this post will be key (no pun intended!) to getting Amiga emulation properly set up and interfaced with a keyboard encoder. Thanks for taking the time to write up and share this detailed guide!

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.