"Fossies" - the Fresh Open Source Software Archive

Member "stella-6.0.2/src/tools/evdev-joystick/Readme.txt" (11 Oct 2019, 3457 Bytes) of package /linux/privat/stella-6.0.2-src.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 EVDEV-JOYSTICK
    2 --------------
    3 
    4 This program is based on G25manage, located at:
    5   https://github.com/VDrift/vdrift/tree/master/tools/G25manage
    6 
    7 It is developed by Stephen Anthony, and released under the GPL/v2.
    8 
    9 evdev-joystick is used to set the deadzone for Linux 'evdev' joystick devices.
   10 Currently, other than G25manage there is no other standalone program available
   11 to perform such calibration.  This program was originally developed for Stella
   12 (https://stella-emu.github.io), an Atari 2600 emulator, and as such much of this document
   13 refers to Stella.  The program itself can be used to calibrate any joystick
   14 for any application, though, and is not specific to Stella.
   15 
   16 
   17 Short Explanation (Stella users with Stelladaptor, 2600-daptor, etc.)
   18 -----------------
   19 
   20 1)  Decompress the archive
   21 2)  Build the application by typing 'make'
   22 3)  Install it by typing 'sudo make install'
   23 4)  Unplug your 'daptor device, re-plug them, and play a game.
   24 
   25 
   26 Long Explanation (For the curious, or if something doesn't work, etc.)
   27 ----------------
   28 
   29 1)  Decompress the archive
   30 2)  Build the application by typing 'make'
   31 
   32 3)  Type './evdev-joystick --l'.  For me, it produces output as follows:
   33 
   34 /dev/input/by-id/usb-Microsoft_Inc._Controller_101F9B0-event-joystick
   35 /dev/input/by-id/usb-Microchip_Technology_Inc._2600-daptor_II-event-joystick
   36 /dev/input/by-id/usb-RetroUSB.com_SNES_RetroPort-event-joystick
   37 
   38 4)  Make note of the name of the device.  For 2600-daptor II users, this
   39     would be:
   40 
   41 /dev/input/by-id/usb-Microchip_Technology_Inc._2600-daptor_II-event-joystick
   42 
   43 5)  Check the current deadzone (known as 'flatness') by typing:
   44       'evdev-joystick --s <NAME_OF_DEVICE>'
   45     Again, for me, this will output the following:
   46 
   47   Absolute axis 0x00 (0) (X Axis) (min: 0, max: 4095, flatness: 128 (=0.00%), fuzz: 15)
   48   Absolute axis 0x01 (1) (Y Axis) (min: 0, max: 4095, flatness: 128 (=0.00%), fuzz: 15)
   49   Absolute axis 0x02 (2) (Z Axis) (min: 0, max: 15, flatness: 0 (=0.00%), fuzz: 0)
   50 
   51 6)  Notice that the flatness/deadzone for axes 0 & 1 is 128.
   52 
   53 7)  Now, we change the deadzone by typing 'evdev-joystick --s <NAME_OF_DEVICE> --d 0'
   54 
   55 8)  Now check the current deadzone again by typing:
   56       'evdev-joystick --s <NAME_OF_DEVICE>'
   57 
   58   Absolute axis 0x00 (0) (X Axis) (min: 0, max: 4095, flatness: 0 (=0.00%), fuzz: 15)
   59   Absolute axis 0x01 (1) (Y Axis) (min: 0, max: 4095, flatness: 0 (=0.00%), fuzz: 15)
   60   Absolute axis 0x02 (2) (Z Axis) (min: 0, max: 15, flatness: 0 (=0.00%), fuzz: 0)
   61 
   62 9)  Note that the 'flatness' has changed to 0?  If so, then the program is
   63     working as intended.
   64 
   65 10) Note that there are other options to the program.  You can change the
   66     'fuzz' value, change attributes for only certain axis, etc.  See the
   67     options by typing 'evdev-joystick'.
   68 
   69 11) Once you're certain that the application is working, type 'sudo make install'
   70     to install it.
   71 
   72 
   73 RULES File
   74 ----------
   75 
   76 Included in the archive is a udev .rules file that will automatically run
   77 evdev-joystick with the correct parameters for a Stelladaptor, 2600-daptor,
   78 and 2600-daptor II.  If you have another joystick you wish to modify,
   79 simply add the proper entry to the .rules file.  Note that it is necessary
   80 to add all joysticks (where you want to change the deadzone) to this file,
   81 since the settings are lost when the device is unplugged and plugged in again.
   82 When using a .rules file, the system will automatically re-run evdev-joystick
   83 and set your deadzone values again.