• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Analog controller Limit-Zone (opposite Dead-Zone)

Scheduled Pinned Locked Moved Help and Support
analogdeadzonecalibrationretroarchmonkeys
11 Posts 4 Posters 2.3k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E
    Efriim
    last edited by Efriim 22 Jun 2019, 05:21

    RetroPie 4.4.14
    Retroarch 1.7x
    Playstation DualShock3 controller.

    The games with quantitative movement controls with the analog are barely able to detect full analog movement.
    The analog when pushed in the direct cardinal directions won't reach the full axis limit.
    Basically I can't run in Ape Escape unless I go diagonal, I've tried retroarch settings and the other pcsxr doesn't even support analog. What do I do? I can't just leave these monkeys on the loose.

    1 Reply Last reply Reply Quote 0
    • E
      Efriim
      last edited by 22 Jun 2019, 19:53

      Of course I tried the other Sixaxis driver too.

      1 Reply Last reply Reply Quote 0
      • P
        Protocultor
        last edited by 23 Jun 2019, 16:09

        Have you tried updating / reinstalling the driver you are using?
        In any case, you seem to have the same problem I had with my Switch controller, evdev calibration was off:
        https://retropie.org.uk/forum/topic/22337/gamepad-calibration-problem/

        E 2 Replies Last reply 23 Jun 2019, 18:39 Reply Quote 0
        • E
          Efriim @Protocultor
          last edited by Efriim 23 Jun 2019, 18:39

          @Protocultor
          Thanks pal.
          I was able to get it with retroarch using the evdev-joystick
          evdev-joystick --e /dev/input/event4 --fuzz 0

          At first it said to use --m and --M and then it said that was too ambiguous. I ended up changing the fuzz value from 10 to 0 and this worked.

          What the fuzz value is I don't know, I guess it just chooses to randomly add or subtract a value from the js, which does describe its previous functionality.

          Thanks again.

          1 Reply Last reply Reply Quote 1
          • E
            Efriim @Protocultor
            last edited by 24 Jun 2019, 04:18

            @Protocultor
            The changes with evdev-joystick weren't saved so I tracked down the fuzz code in the sixaxis helper.
            /usr/bin/sixaxis-helper.sh#line60
            This worked for that, for other controllers and drivers a similar implement must be found.

            P 1 Reply Last reply 24 Jun 2019, 15:43 Reply Quote 0
            • P
              Protocultor @Efriim
              last edited by 24 Jun 2019, 15:43

              @Efriim someone in the comments of the Switch gamepad link came up with a nice solution for that.

              First, create a script that takes the device as parameter, let's say /opt/ps3-config, and applies any calibration needed for that type of controller to that device:

              #!/bin/bash
              
              device="${1}"
              
              echo "Configuring device ${device}"
              sudo evdev-joystick --e $device --fuzz 0 || echo "Failed!"
              

              ...without forgetting to chmod +x this script.

              Then create a udev rule for those controllers, let's say /etc/udev/rules.d/85-ps3gamepad.rules, that executes the script above passing the proper device as parameter:

              SUBSYSTEM=="input", KERNEL=="event*", ACTION=="add", ATTRS{name}=="*PLAYSTATION(R)3 Controller*", RUN+="/opt/ps3-config /dev/input/%k"
              

              Note that I'm speculating about how to detect the PS3 controller here, since it will depend on the name of the controller. Someone with knowledge of udev rules may come up with a better way to match the device.

              The convenience of doing it this way is that you don't have to "know" or "assume" to which /dev/input/eventX the controller will be associated, and you can apply the calibration to multiple controllers of the same type.

              E 1 Reply Last reply 25 Jun 2019, 00:09 Reply Quote 1
              • E
                Efriim @Protocultor
                last edited by Efriim 25 Jun 2019, 00:09

                @Protocultor
                I'm not sure if I could get that to work, the sixaxis.sh script has a similar rule.
                /etc/udev/99-sixaxis.rules
                and it links to
                /etc/systemd/... sixaxishelper~ something
                which calls
                /usr/bin/sixaxis-helper.sh

                I think the rule would work if there wasn't already one calling a script for that setting. But would it work if the hierarchy was changed from 99 to 80?

                I think I figured out what the purpose of the fuzz value is. If this wasn't the purpose of a deadzone; it seems to help when going in one direction along the axis from it tending to go either way on the other axis, easier to run precisely straight ahead. I'm really not too sure.

                P 1 Reply Last reply 25 Jun 2019, 02:41 Reply Quote 0
                • P
                  Protocultor @Efriim
                  last edited by Protocultor 25 Jun 2019, 02:41

                  @Efriim I just saw what you posted in your previous post, /usr/bin/sixaxis-helper.sh line 60. Had to install sixaxis to see it, but was worth it. Changing it to 0 is a good solution in my eyes; the less rules, scripts and external dependencies, the better IMHO.

                  About rules that refer to the same device, that's something I cannot tell for certain; the only way to know if two rules can coexist is testing them. If it makes you feel better, in any udev conflict, the last rule wins:
                  http://www.timocharis.com/help/udev.html

                  About "fuzz", your comment is the best documentation I've found online, since the man page for evdev-joystick is useless, and checking the source code seems to be the way to really know what it does. Regarding calibration, sometimes I miss the old joystick API...

                  I found this project by chance:
                  https://github.com/gamelaster/evdev-calibration
                  I'm not gonna touch it, but it may be of help to you if you are not happy with "fuzz 0".

                  1 Reply Last reply Reply Quote 0
                  • P
                    psyke83 Global Moderator
                    last edited by 25 Jun 2019, 16:23

                    Just a heads-up: setting the fuzz to 0 will break the sixaxis helper's timeout functionality, as the joystick axes produce constant output in the resting position.

                    I'm a bit swamped lately but I'll take a look at this issue soon and see if anything better can be done.

                    1 Reply Last reply Reply Quote 0
                    • D
                      DimaKompot
                      last edited by 26 Apr 2020, 13:14

                      Hello people,
                      You might like to use my new utility for the exact purpose:
                      https://github.com/Virusmater/evdev-joystick-calibration
                      it uses python3 in collab with python-evdev
                      I didn't test it on arm processors, but it should work. In case of any problems - welcome to issues.

                      P 1 Reply Last reply 26 Apr 2020, 19:15 Reply Quote 1
                      • P
                        Protocultor @DimaKompot
                        last edited by 26 Apr 2020, 19:15

                        @DimaKompot works great installing the "evdev" python package from source:

                        sudo apt install python-dev python-pip gcc
                        sudo pip3 install evdev
                        

                        Thanks for your work, a decent way to calibrate was needed.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        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.

                          [[user:consent.lead]]
                          [[user:consent.not_received]]