If you're having a problem with a generic game controller or more traditional gamepad or joystick, it's time to troubleshoot. A tool called joystick includes drivers and detects input. You can also use it to reconfigure controller mappings.
Joystick and Gamepad support is enabled using the cross-platform SDL2 library. Compatibility with a particular controller depends on SDL (all buttons that are exposed by that API are displayed through the QGroundControl UI).A number of common joysticks and gamepads are known to work.
How To Setup a Generic Joystick or Gamepad In Ubuntu Linux
this maps the EV_ABS event with id of 40 and 41 (use xboxdrv with --evdev-debug to see the events registered), which is the normally inaccessible "mouse pointer" on the throttle, to first gamepad joystick and throttles to second joystick, it also clamps the top and lower ranges as they not always register fully.
this maps the 3 joystick axes to gamepad axes and changes the calibration (min value, centre value, max value), dead zones (negative side, positive side, flag to turn smoothing) and finally change of response curve to a more flat one in the middle.
If you want to play games with your gamepad, you might want to disable its joystick control over mouse cursor. To do this, edit /etc/X11/xorg.conf.d/51-joystick.conf (create if it does not exists) so that it looks like this:
This is a good solution for systems where restarting Xorg is a rare event because it is a static configuration loaded only on X startup. The example runs on a Kodi media PC, controlled with a Logitech Cordless RumblePad 2. Due to a problem with the d-pad (a.k.a. "hat") being recognized as another axis, Joy2key was used as a workaround. Since kodi version 11.0 and joy2keyAUR 1.6.3-1, this setup no longer worked and the following was created for letting Xorg handle joystick events.
Sometimes USB gamepad can be recognized as HID mouse (only in X, it is still being installed as /dev/input/js0 as well). Known issue is cursor being moved by the joystick, or escaping to en edge of a screen right after plugin. If your application can detect gamepad by itself, you can remove the xf86-input-joystickAUR package.
If you are using a generic non-widely used gamepad you may encounter issues getting the gamepad recognized in games based on SDL. Since 14 May 2015, FNA supports dropping a gamecontrollerdb.txt into the executable folder of the game, for example the SDL_GameControllerDB.
It is worth noting that when using DirectInput gamepads on Windows, or generic gamepads on other platforms, the constants given below may not match exactly the buttons that you expect when they are pressed, due to the fragmented and non-standardised way that the API is implemented by controller manufacturers. Because of this, it is recommend that you have some kind of gamepad setup screen in your games where people can redefine the gamepad buttons based on input from any connected device to mitigate any issues (there are gamepad "mapping" functions that can help with this on Windows Desktop, Ubuntu, macOS, and Android targets, while on all others you would need to do this yourself using code).
Out of the box the Arduino Leonardo and the Arduino Micro appear to the host computer as a generic keyboard and mouse. This article discusses how the Arduino Leonardo and the Arduino Micro can also appear as one or more generic Game Controllers or Joysticks. The Arduino Joystick Library Version 2.0 can be used with Arduino IDE 1.6.6 (or above) to add one or more joysticks (or gamepads) to the list of HID devices an Arduino Leonardo or Arduino Micro (or any Arduino clone that is based on the ATmega32u4) can support. This will not work with Arduino IDE 1.6.5 (or below) or with non-32u4 based Arduino devices (e.g. Arduino UNO, Arduino MEGA, etc.).
Once the Arduino Leonardo or Micro has been tested using the JoystickTest example, I suggest making a simple gamepad controller. You will need five buttons to build this simple example. Each button will correspond to one of the following joystick functions: up, down, left, right, and fire.
The Input System supports the Standard Gamepad mapping as specified in the W3C Gamepad Specification. It also supports gamepads and joysticks that the browser surfaces without a mapping, but this support is generally limited to detecting the axes and buttons which are present, without any context as to what they mean. This means gamepads and joysticks are generally only useful when the user manually remaps them. The Input System reports these Devices as generic Joysticks.
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.
You can sort of make it work by using advanced settings in FS-UAE Launcher / config file in FS-UAE, for example:joystick_0_button_4 = action_key_del should work, if your xbox one gamepad is the first in the list of recognized joysticks on your system.
Hi, the joystick device should appear in FS-UAE Launcher settings (and in FS-UAE) if it is recognized by the operating system as a joystick device. Have you checked if other applications detect it as a *joystick/gamepad* device? Perhaps a driver is needed for the device?
Here we see that the (keyboard) cursor keys are mapped to the SNES directional pad, while buttons on joystick 0 is mapped to the other SNES controller buttons. This means that your gamepad D-Pad is actually pretending to be a keyboard with cursor keys.
For easy configuration, FS-UAE requires that a joystick device actually is *one* device, and not using hacks like this (presents itself as two devices). It looks like your gamepad is configurable/reprogrammable, so perhaps you can reconfigure to be *a single joystick device*?
In short, it will work fine as long as you use the gamepad as primary Amiga joystick. If you get your gamepad reconfigured as a proper gamepad (D-pad is also joystick buttons/hat/axes), it will work properly when you use it in both Amiga ports. 2ff7e9595c
Comments