Custom Controller Configuration

Controller configuration is specified in configuration files bundled with FS-UAE. The folder share/input/ contains the bundled configuration files. There is one .ini file per controller type.

FS-UAE Launcher comes with a joystick / gamepad configuration tool (started from the settings dialog). This tool will create configuration files for you and it is highly recommended.

Custom configurations can be placed in the directory:

(My) Documents/FS-UAE/Controllers/

The name of the ini file is the system name of the controller, converted to lowercase, with an underscore between each work. Characters other than letters and numbers are also converted to underscore, and there is never more than one underscore between each word, and the name will not start nor end with underscore.

Example: Controller (Xbox 360 Wireless Receiver For Windows) becomes

controller_xbox_360_wireless_receiver_for_windows.ini

This forum thread has some more information: http://eab.abime.net/showthread.php?t=63800

Universal configuration file (recommended)

If you have a general-purpose gamepad with button layout more or less like PlayStation/Xbox controllers (e.g. a hat, two analog sticks, 4 buttons to the right, start/select and shoulder/trigger buttons), you can create a config which maps the controller events to generic event names (which again is automatically mapped against amiga input events). In this way, the same configuration can be shared with other emulators using the same configuration file format without having to create an explicit configuration for amiga, super nintendo, c64, and so on.

Here is a complete example for this kind of configuration file:

[default]
include = common/gamepad
axis_0_neg = lstick_left
axis_0_pos = lstick_right
axis_1_neg = lstick_up
axis_1_pos = lstick_down
axis_2_neg = rstick_left
axis_2_pos = rstick_right
axis_3_neg = rstick_up
axis_3_pos = rstick_down
button_0 = west_button
button_1 = south_button
button_2 = east_button
button_3 = north_button
button_4 = left_shoulder
button_5 = right_shoulder
button_6 = left_trigger
button_7 = right_trigger
button_8 = select_button
button_9 = start_button
button_10 = lstick_button
button_11 = rstick_button
button_12 = menu_button
hat_0_left = dpad_left
hat_0_right = dpad_right
hat_0_up = dpad_up
hat_0_down = dpad_down

What you must to is to check (with a joystick test application) what button number each physical button on your gamepad has, and update the configuration accordingly.

Example: If you test a button labelled  “start” on your controller, and you want to map this to the generic event “start_button”, you press “start” in a joystick tester program. Let’s say the program indicates that this is button 5! In the config file, the first button is numbered 0, so if the joystick test program calls the first button “1”, you must subtract one from the number, and you get:

button_5 = start_button

This line is important to include:

include = common/gamepad

– since this imports the common gamepad configuration file which maps the generic button names to Amiga joysticks.

Additional information

Axes on your controller are identified as axis_x_neg/axis_x_pos where x is the zero-based index (the first axis is 0). Hat events are referred to with hat_x_left, hat_x_right, hat_x_up and hat_x_down (x is hat number – the first hat is 0). Button events are simply button_x (where button_0 is the first button on the controller).

Also, remember to check the log file to see whats going on when FS-UAE starts. You will probably get some hints to what’s wrong if it does not work.

If you create a configuration file to support your controller, I would very much like a copy of this file to include with FS-UAE in future releases.

Amiga-specific configuration file

If you have a controllers which looks nothing like a “standard” gamepad, if can be better to create a specific configuration file and map the Amiga joystick events directly.

If you created a universal configuration you do not have to add [menu] or [amiga] sections.

The ini file should contain a section [amiga] with a mapping between controller events and amiga joystick events. You should also create a [menu] section where you provide mapping for the menu navigation (if you want to navigate the menu).

Here is an example for a joystick with one stick and 4 buttons:

[menu]
axis_0_neg = left
axis_0_pos = right
axis_1_neg = up
axis_1_pos = down
button_0 = primary
button_1 = back
button_2 = select
button_3 = start

[amiga]
axis_0_neg = left
axis_0_pos = right
axis_1_neg = up
axis_1_pos = down
button_0 = 1
button_1 = 2
button_2 = 3

Amiga events are named left, right, up, 1 (fire), 2 (secondary fire) and 3 (tertirary fire). (see common/gamepad.ini for Amiga CD32 controller mapping).

88 thoughts on “Custom Controller Configuration

  1. Hi there,

    I have trouble configuring the second pad. I managed to fix the first one like that:

    # gamepad 1
    [default]
    include = universal_gamepad
    hat_0_left = dpad_left
    hat_0_right = dpad_right
    hat_0_up = dpad_up
    hat_0_down = dpad_down
    axis_0_neg = lstick_left
    axis_0_pos = lstick_right
    axis_1_neg = lstick_up
    axis_1_pos = lstick_down
    #button_10 = lstick_button
    axis_2_neg = rstick_left
    axis_2_pos = rstick_right
    axis_3_neg = rstick_up
    axis_3_pos = rstick_down
    #button_11 = rstick_button
    button_0 = west_button
    button_3 = north_button
    button_2 = east_button
    button_1 = south_button
    button_8 = menu_button
    button_9 = start_button
    #button_12 = menu_button
    #button_4 = left_shoulder
    #button_6 = left_trigger
    #button_5 = right_shoulder
    #button_7 = lstick_right

    It’s right there:
    /home/uzytkownik/Dokumenty/FS-UAE/Controllers/dragonrise_inc_generic_usb_joystick_12_5_1_0_linux.conf

    That is, one file only.

    I try to follow FrodeSolheim’s advice, but still, in the end I only get one file and for one pad only. What should I do? Any ideas?

    • Hi, if the second device is the same as the first one, they are supposed to share config. Please set up the launcher to use both gamepads (one in each port), start FS-UAE, close it down after confirming it does not work, and send the resulting FS-UAE.log.txt to frode@fs-uae.net 🙂

    • Hi, I checked the log file you send me, and everything looks fine except one thing: Port mode of joystick port 0 is set to mouse – it needs to be switched to joystick mode when you want to use a secondary joystick.

      • Hi there, You were right about the modes, I didn’t set it right. I changed it the way you told me to and it works. I can’t believe I overlooked it 🙂 Thanks once again! I think this emulator is really great. It would be even greater if you could load profiles not just floppy discs during the game after pressing F12. Then you could control everything with the pad only.

  2. Would it be possible to assign two joystick buttons to one and the same Amiga button/direction?
    I am more used to console gaming and prefer having a button for jumping instead of pressing up on the d-pad. I managed to configure it that way, but there is a problem when a game changes gameplay style. A good example would be Turrican 2. All works smoothly in the “normal” levels, but then the game switches gears in the shmup levels and now a button for “up” does not work that well anymore :-).

    • Yes, you can have both D-PAP up mapped to Amiga joystick up, as well as any number of other buttons at the same time. Infact, if you use the joystick config tool which is a part of FS-UAE Launcher, you’ll get a setup like this automatically. The “east button” is mapped to Amiga joystick up by default, and the “north button” is also mapped to fire along with the “south button” – so you can move your fingers from south/west (fire/2ndfire) to east/borth (jump/fire).

      • Hi frode, I tried this but really couldn’t make both up and the south button on the gamepad configured as “up”. It’s either one or the other, I can’t force in the joystick config both buttons for “up”.

        • No, you cannot do it like that. In Launcher settings, you tell FS-UAE what buttons your gamepad/joystick has. So you map up to up, and the south-most button as south-button (etc). Then start FS-UAE. FS-UAE will then make sure both the up button and east buttons are mapped to Amiga joystick up. If you want the “south” button on your gamepad to be up, you can of course lie about your layout and swap for example with the west button. For reference, here is the full mapping:

          (So as you can see, what you tell FS-UAE is dpad_up, lstick_up, east_button and right_shoulder are all mapped to Amiga joystick up):

          dpad_left = left
          dpad_right = right
          dpad_up = up
          dpad_down = down
          south_button = 1
          west_button = 2

          lstick_left = left
          lstick_right = right
          lstick_up = up
          lstick_down = down
          east_button = up
          north_button = 1
          right_shoulder = up
          left_shoulder = down
          left_trigger = toggle_autofire
          right_trigger = autofire
          select_button = pause
          start_button = menu_alt

  3. Hey, in the 2.3.8 dev version, are you supposed to see the configuration files in the preferences > joysticks window?

      • Okay. So I’ve got a controller (it’s an impulse controller) that identifies itself as a keyboard. It works out of the box with directions (as these are cursor keys effectively), but it’s fire buttons map to a, w, v, m. So I need to map these keyboard keys to fire buttons basically.

        I’ve put this in a impulse_v1_0_c1b761.ini in controllers, but nothing seems to work (device shows up in FS-UAE launcher joystick menus as IMpulse v1.0 C1B861):

        [default]

        impulse_v1_0_c1b761_key_cursor_left = action_joy_1_left
        impulse_v1_0_c1b761_key_cursor_right = action_joy_1_right
        impulse_v1_0_c1b761_key_cursor_up = action_joy_1_up
        impulse_v1_0_c1b761_key_cursor_down = action_joy_1_down
        impulse_v1_0_c1b761_key_a = action_joy_1_fire_button
        impulse_v1_0_c1b761_key_w = action_joy_1_2nd_button
        impulse_v1_0_c1b761_key_v = action_joy_1_3rd_button

        I’ve tried replacing the impulse_v1_0_c1b761 bit with ‘keyboard’ but that doesn’t work either. Any ideas? I also can’t seem to get anything appearing in the custom joystick port area to try to deal with it. So I’m now at a bit of a loss.

        • Ignore me – I figured it out

          Had to put kyboard_key_a = action_joy_1_fire_button etc in to advanced config bit. All good now.

  4. Hi,

    thanks for your great work! 🙂

    Unfortunately the Joystick configuration doesnt seem to save my configuration. So I can’t use the joytick in games. Any Idea?

    My System is Debian 32 bit.

    Thanks & Regards,
    Christian

    • To be more precise: I have a XBOX controller which should be supported out of the box and works in other applications. I can configure it through the GUI but the save button doesn’t seem to have any effect.

    • I think it most likely already worked, but in the stable version the config isn’t loaded by the joystick configuration program, so it might look like the config has not been saved (though it really has been). In the development version, I have fixed it so you can see your previous config when you re-open the configuration tool.

      The XBox controller is supposed to be supported out of the box (there’s configs for it bundled with FS-UAE), so please to send your config (it is stored in Documents/FS-UAE/Controllers) so I can check what is different about it, and include it with future FS-UAE releases (if applicable) 🙂

  5. Hi, first of all – Thank you for that great Emu! -. I am trying to get my gravis gamepad running with fs-uae, but it does not seem to work. Every time i plug it and start fs uae it asks me to install some kind of “old” mac software (x11). Is there any way to walk around this?

    Greetings, Justin

    • Hi, I don’t know why plugging the joystick in causes any difference, but I have discovered a packaging error which makes FS-UAE Launcher depend (unnecessarily) on X11. This will be fixed 🙂

  6. Hi,

    how is it possible to configure the competion pro USB.
    Just to have the traditional gameplay feelings 🙂

    • Hi, this joystick should work out of the box, no configuration needed. If it does not work, please provide more details and check that it is recognized by the operating system 🙂

  7. Hi guys !! Is possible to configure the right stick on xbox 360 wireless controller to emulate the Amiga mouse ??

    thanks !!

  8. Hi, I gave FS-UAE on OS X (Snows Leopard) a try, installed the recommended Xbox 360 driver and got it instantly running without one Xbox 360 controller but somehow i can’t get it running with two of them, although both respond correctly to the driver. The second one simply refused to work no matter what i tried. From the “docs” i’m not sure how to set this up and whenever i tried to define the controller configuration, i got two windows opened but with the same controller name.

    Can you use two Xbox 360 controllers on a Mac and if so how do you set this up correctly? Thanks in advance

    • Hi, there should be no problems with multiple controllers, as long as they both are separate joystick devices. The controllers will share configuration. I don’t know if you have used FS-UAE with or without the launcher, but FS-UAE Launcher has a interface to define the controller mapping if the device is not supported out of the box. You only need to do this once for each controller model.

      In the FS-UAE and FS-UAE Launcher interface, you should see two joystick devices:
      – “Name of XBox Joystick Device”, and
      – “Name of XBox Joystick Device #2”
      And you should put one in each joystick port. Make sure joystick port 0 is in joystick mode, and not mouse mode.

      If it does not work, you should run FS-UAE with both joystick attached, exit FS-UAE, and then send Documents/FS-UAE/Logs/FS-UAE.log to fs-uae@fengestad.no.

      • Hi Frode, And thanks for the amazing work on FS-UAE. I am having a great time with it.

        One small thing: I appear to be having an issue similar to e789 above. I have two Wiimotes connected via WJoy on OSX Mavericks and with FS-UAE 2.2.3. They present themselves as two different devices (no “#2”), and although I have configured them with identical custom controller config files, they only work in port 1 (even though I have set port 0 to “Joystick” mode). I can switch which Wiimote I use at runtime with the F12 menu, but neither of them work in port 0.

        I will email you the config and log files in case it helps (and if you have time to look at it), but I’m posting it here just in case anybody else is having the same issue.

        Best regards, Jens

        • Hi, if both devices work (individually) in the joystick port, but not in the mouse port, then something is fishy. Please send config and log to frode@fs-uae.net 🙂 (Ideally, send fs-uae.log after you have tried to start with both joysticks in separate ports).

          • Ah, something was in fact fishy. I think it was an error on my end — I had log files and everything packaged up to send to you and then thought I should in fact check it one more time. Lo and behold, now everything is fine. Apologies for the confusion.

            I will email you the minimal config file for the Wiimote (directions+fire button), just in case you want to include it in a future version of FS-UAE. (In fact, Wiimotes via WJoy identify with different IDs so perhaps it is not so useful, but I’ll send it anyway.)

  9. I’m using a retro 9-pin Amiga joystick together with an Amiga-USB adaptor, something I’d think is quite popular, could you add this to your default/built-in gamepads.

    • Yes I could, but I haven’t got this device and do not have the details needed to create the configuration. If you create a configuration for it (see docs) and send to me, I’ll include it in later versions.

      • I just got me a couple of these USB-Amiga/Atari 9pin adaptors, and connected my trusty old Zipstik Pro joystick’s to them. Mine show up as “Retro Joystick interface v1.2” (so I’m guessing there is other versions named “Retro Joystick interface” and “Retro Joystick interface v1.1” as well), I simply copied the configuration file for Speedlink competition pro; FS-UAE\share\fs-uae\input\mosic\speed_link_competition_pro.ini naming it retro_joystick_interface_v1_2.ini and I removed all other buttons then button_0, as my zipstik has 2 buttons but the work as 1.

        This config worked for me:

        # Retro Joystick interface v1.2

        [device]
        name = Retro Joystick interface v1.2
        type = joystick/joystick

        [menu]
        axis_0_neg = left
        axis_0_pos = right
        axis_1_neg = up
        axis_1_pos = down
        button_0 = primary

        [amiga]
        axis_0_neg = left
        axis_0_pos = right
        axis_1_neg = up
        axis_1_pos = down
        button_0 = 1

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.