RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Sony DualShock 3 - call for testers: "sixaxis" script module

    Scheduled Pinned Locked Moved Ideas and Development
    sixaxisdriverbeta
    208 Posts 24 Posters 34.4k 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.
    • S
      Silent @edge3000
      last edited by

      @edge3000 Do try! For the most part it's really great, possibly better than Steam Link. Plus, thanks to this not-yet merged scriptmodule it integrates with EmulationStation as an "emulator":

      https://retropie.org.uk/forum/topic/19872/moonlight-request-for-comments-and-testing/

      1 Reply Last reply Reply Quote 0
      • P
        psyke83 Global Moderator @Silent
        last edited by

        @Silent said in Sony DualShock 3 - call for testers: "sixaxis" script module:

        @psyke83 FYI I have only verified it with pre-changes sixaxis driver, that is with custombluez and customhidsony. While this is not (and will never be, I think) an issue in libretro emulators, in Moonlight Game Streaming it's really obvious - any racing game displaying inputs indeed shows that throttle is either 0 or 100.

        I'll try messing with gamecontrollerdb.txt there, just need to figure out where it is in the first place.

        Unfortunately I don't own a NVIDIA GPU, but I may have some racing games in my Steam library. Can you confirm that the same issues happens with triggers in the steamlink app? I'm also not certain which racing games I own would definitely show this (as I've never really played any in my backlog).

        S 1 Reply Last reply Reply Quote 0
        • S
          Silent @psyke83
          last edited by Silent

          @psyke83 So I tested both Moonlight and Steam Link:

          • Moonlight: Triggers register as 100% press upon the slightest press.
          • Steam Link: Behaviour was same, but in Steam Link app I ran Setup Controller again and reconfigured the controller. After that, it works as expected!

          Do you know where Moonlight and Steam Link keep their mappings? I want to try to sync them to see if I can get triggers to work in Moonlight too.

          For both my test case was DiRT Rally - a XInput game, in which you can see % press of an axis in Controls screen, so it's a reliable method of checking.

          H P 2 Replies Last reply Reply Quote 0
          • H
            Headcrab @Silent
            last edited by

            @Silent said in Sony DualShock 3 - call for testers: "sixaxis" script module:

            • Moonlight: Triggers register as 100% press upon the slightest press.

            I might be wrong, but take a look at /etc/modprobe.d/xpad.conf
            If "triggers_to_buttons" is set to 1, change the value to 0, reboot and see if it makes any difference in moonlight.

            1 Reply Last reply Reply Quote 0
            • rodrigoleaoR
              rodrigoleao @psyke83
              last edited by

              @psyke83 said in Sony DualShock 3 - call for testers: "sixaxis" script module:

              @lostless said in Sony DualShock 3 - call for testers: "sixaxis" script module:

              how would one install said driver? I would like to test it.

              You need to be relatively comfortable with using the command-line to test.

              These commands will enable the PR branch:

              cd RetroPie-Setup
              git remote add psyke83 https://github.com/psyke83/RetroPie-Setup
              git fetch psyke83
              git checkout sixaxis
              

              Make sure to go back to the official branch after testing the PR! Uninstall sixaxis from the menu, then:

              cd RetroPie-Setup
              git checkout master
              

              It's been confirmed that both official and Shanwan controllers are working. I need someone with a Gasia branded pad to test.

              I had problems with the default Driver for Dualshock3. In my case, the problem was about the use of a 8bitdo controller with the dualshock. After the dualshock configuration, the 8bitdo is deconfigured, change the driver and it didn't work when the dualshock was on. This solution solved my problem.

              P 1 Reply Last reply Reply Quote 0
              • P
                psyke83 Global Moderator @rodrigoleao
                last edited by

                @rodrigoleao said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                @psyke83 said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                @lostless said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                how would one install said driver? I would like to test it.

                You need to be relatively comfortable with using the command-line to test.

                These commands will enable the PR branch:

                cd RetroPie-Setup
                git remote add psyke83 https://github.com/psyke83/RetroPie-Setup
                git fetch psyke83
                git checkout sixaxis
                

                Make sure to go back to the official branch after testing the PR! Uninstall sixaxis from the menu, then:

                cd RetroPie-Setup
                git checkout master
                

                It's been confirmed that both official and Shanwan controllers are working. I need someone with a Gasia branded pad to test.

                I had problems with the default Driver for Dualshock3. In my case, the problem was about the use of a 8bitdo controller with the dualshock. After the dualshock configuration, the 8bitdo is deconfigured, change the driver and it didn't work when the dualshock was on. This solution solved my problem.

                There was a problem with the RetroPie bluetooth menu script, but it was fixed in a commit separate from the PR. If you rebased the PR against latest master it would have been fixed.

                1 Reply Last reply Reply Quote 0
                • P
                  psyke83 Global Moderator @Silent
                  last edited by

                  @Silent said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                  @psyke83 So I tested both Moonlight and Steam Link:

                  • Moonlight: Triggers register as 100% press upon the slightest press.
                  • Steam Link: Behaviour was same, but in Steam Link app I ran Setup Controller again and reconfigured the controller. After that, it works as expected!

                  Do you know where Moonlight and Steam Link keep their mappings? I want to try to sync them to see if I can get triggers to work in Moonlight too.

                  For both my test case was DiRT Rally - a XInput game, in which you can see % press of an axis in Controls screen, so it's a reliable method of checking.

                  See the readme here: https://github.com/gabomdq/SDL_GameControllerDB

                  Steam Link on Pi stores its bootstrapped binaries in /home/pi/.local/share/SteamLink/ and configuration in /home/pi/.local/share/Valve Corporation/SteamLink/, so the latter is a possible location to look for mappings.

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    Silent @psyke83
                    last edited by

                    @psyke83 That was helpful, thank you! I fished out my configuration and applied it to Moonlight and it all works like a charm.

                    Update:
                    Mapping from @psyke83 didn't work for me, but this one did:
                    050000004c0500006802000000800000,PS3 Controller,platform:Linux,a:b0,b:b1,x:b3,y:b2,back:b8,guide:b10,start:b9,leftstick:b11,rightstick:b12,leftshoulder:b4,rightshoulder:b5,dpup:b13,dpdown:b14,dpleft:b15,dpright:b16,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,

                    (notice how GUIDs are slightly different)

                    With this, triggers are pressure sensitive without the need to change triggers_to_buttons.

                    However, when playtesting I encountered a problem - I was streaming via Moonlight and around 10 minute mark my controller disconnected! Was it a coincidence or a bug in idle timeout script? I was using triggers, left analog stick and face buttons - so the possibility of idle script only reacting to eg. face buttons is out of question.

                    Also, does this driver allow reporting battery level somehow? One last issue I have with using DS3 on pi is that I am unable to tell when the battery is running low.

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      hhromic @Silent
                      last edited by

                      @Silent said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                      Mapping from @psyke83 didn't work for me, but this one did:

                      Where did you find that particular mapping? Perhaps I can make the Moonlight scriptmodule to grab gamecontrollerdb.txt files from a more up-to-date source instead of the included one from Moonlight.

                      Another (better) alternative would be if you can submit your updated controller entry to the upstream maintainer of gamecontrollerdb.txt here: https://github.com/gabomdq/SDL_GameControllerDB

                      @Silent said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                      Also, does this driver allow reporting battery level somehow? One last issue I have with using DS3 on pi is that I am unable to tell when the battery is running low.

                      I want to work on this in close future and already have some ideas drafted. I just need to find some good spare time to develop them. Also I have to finish the last details on the Moonlight scriptmodule :)

                      S 1 Reply Last reply Reply Quote 1
                      • S
                        Silent @hhromic
                        last edited by Silent

                        @hhromic That's the mapping I created from Steam Link app on rpi. Also, it looks like an identical mapping is already present in the database, so no need to submit anything new =)

                        Also, what file does this version of Moonlight read entries from? From the one in /usr/local/ or the one in scriptmodule directory?

                        If Moonlight is using an up to date sdl2, it would be very neat if your scriptmodule could grab mappings from this repository instead!

                        H 1 Reply Last reply Reply Quote 0
                        • H
                          hhromic @Silent
                          last edited by

                          @Silent said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                          Also, it looks like an identical mapping is already present in the database

                          The mapping in the database for your same GUID is not the same as the one you provided. from SteamLink. The differences are clearly stating the triggers being regarded as analog instead of buttons:

                           guide:b10
                           leftshoulder:b4
                           leftstick:b11
                          -lefttrigger:b6
                          +lefttrigger:a2
                           leftx:a0
                           lefty:a1
                           platform:Linux
                           PS3 Controller
                           rightshoulder:b5
                           rightstick:b12
                          -righttrigger:b7
                          +righttrigger:a5
                           rightx:a3
                           righty:a4
                           start:b9
                          

                          Also, what file does this version of Moonlight read entries from?

                          I made the scriptmodule to use the database included with Moonlight, which gets installed in the scriptmodule directory (/opt/retropie/supplementary/moonlight).

                          If Moonlight is using an up to date sdl2, it would be very neat if your scriptmodule could grab mappings from this repository instead!

                          Moonlight uses the system-instaled SDL2 lib when building and @irtimmer regularly keeps the database in sync with that repository. I will think about pulling directly instead.

                          Btw, more Moonlight-specific discussion should be made in its topic :)

                          P 1 Reply Last reply Reply Quote 0
                          • P
                            psyke83 Global Moderator @hhromic
                            last edited by psyke83

                            @hhromic said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                            @Silent said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                            Also, it looks like an identical mapping is already present in the database

                            The mapping in the database for your same GUID is not the same as the one you provided. from SteamLink. The differences are clearly stating the triggers being regarded as analog instead of buttons:

                             guide:b10
                             leftshoulder:b4
                             leftstick:b11
                            -lefttrigger:b6
                            +lefttrigger:a2
                             leftx:a0
                             lefty:a1
                             platform:Linux
                             PS3 Controller
                             rightshoulder:b5
                             rightstick:b12
                            -righttrigger:b7
                            +righttrigger:a5
                             rightx:a3
                             righty:a4
                             start:b9
                            

                            That's right... and my post was intended to encourage others to check their own GUID. I've checked @Silent's, and the version of the db that's compiled into the current version of SDL2 built by RetroPie does use the digital buttons for this controller, unfortunately. In fact, at a quick glance, there are at least 16 PS3 variations that use the digital button mappings:

                            $ git grep "lefttrigger:b6" | grep "righttrigger:b7" | grep "PS3" -c
                            16
                            

                            It might be a good idea to submit a patch to upstream SDL2 for your own GUID so that future releases work out of the box. I'm a bit hesitant to send a patch for all 16+ en masse, considering that I can't tell which GUIDs are clones that may possibly have malfunctioning analog triggers, etc.

                            S 1 Reply Last reply Reply Quote 1
                            • S
                              Silent @psyke83
                              last edited by Silent

                              @psyke83 Sure, I intend to do that, and also check with both my pads in case they have different GUIDs (which they may, considering both are legit but one is considerably newer than the other). I am not yet sure how to send patches to SDL yet though, so will need to look that up.

                              Also, this potentially important info seems to have gotten lost between the mappings talk:

                              However, when playtesting I encountered a problem - I was streaming via Moonlight and around 10 minute mark my controller disconnected! Was it a coincidence or a bug in idle timeout script? I was using triggers, left analog stick and face buttons - so the possibility of idle script only reacting to eg. face buttons is out of question.

                              1 Reply Last reply Reply Quote 0
                              • S
                                steeeb
                                last edited by

                                I've been trying to get this working on Odroid XU4 (ubuntu with 3.10 kernel).

                                But not having any luck with both official or Shanwan controllers. I upgraded bluez manually to 5.48 but that didn't help either.

                                Anyone know if it's ever likely to work on a kernel so old before I continue trying?

                                1 Reply Last reply Reply Quote 0
                                • J
                                  jmbooth2000
                                  last edited by

                                  Would it be possible to dynamically change the configuration per game. For example you might want to configure pacman limited to 4 way movement or allow for analog triggers for acceleration and braking in racing games but digital in most.

                                  This can, sort of, be done by using the xboxdrv and tearing down and restarting it on a per emulator / per game basis. This doesn't really scale.

                                  What I'm thinking would be much better is if the driver could be load once but accept configuration changes.

                                  Thoughts?

                                  P 1 Reply Last reply Reply Quote 0
                                  • P
                                    psyke83 Global Moderator @jmbooth2000
                                    last edited by

                                    @jmbooth2000 said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                                    Would it be possible to dynamically change the configuration per game. For example you might want to configure pacman limited to 4 way movement or allow for analog triggers for acceleration and braking in racing games but digital in most.

                                    This can, sort of, be done by using the xboxdrv and tearing down and restarting it on a per emulator / per game basis. This doesn't really scale.

                                    What I'm thinking would be much better is if the driver could be load once but accept configuration changes.

                                    Thoughts?

                                    You can specify a controller configuration via a hint in SDL2: https://wiki.libsdl.org/SDL_HINT_GAMECONTROLLERCONFIG

                                    IIRC, hints can also be specified as an environment variable if you omit the _HINT part, so this could be a way to do it. I'm not sure if this can only append new entries or if it'll actually override an existing GUID entry.

                                    @Silent said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                                    @psyke83 Sure, I intend to do that, and also check with both my pads in case they have different GUIDs (which they may, considering both are legit but one is considerably newer than the other). I am not yet sure how to send patches to SDL yet though, so will need to look that up.

                                    Also, this potentially important info seems to have gotten lost between the mappings talk:

                                    However, when playtesting I encountered a problem - I was streaming via Moonlight and around 10 minute mark my controller disconnected! Was it a coincidence or a bug in idle timeout script? I was using triggers, left analog stick and face buttons - so the possibility of idle script only reacting to eg. face buttons is out of question.

                                    I'll look into that soon.

                                    J 1 Reply Last reply Reply Quote 1
                                    • J
                                      jmbooth2000 @psyke83
                                      last edited by

                                      @psyke83 That would be awesome!

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        Silent
                                        last edited by Silent

                                        I am not convinced I understand the flow of pairing DS3's via Bluetooth. Here now it went for me now, after I restored pre-sixaxis image from a backup, updated emulationstation and retropie-setup and then applied an updated sixaxis branch:

                                        • Installation went without any issues
                                        • For the first gamepad, during "Register Bluetooth Devices" process there was no mention of DualShock 3 (just "Searching..."), and I had to manually pick a pairing mode after DS3 was detected. I don't recall having to do that before I rolled back - is it because back then custombluez was being installed?
                                        • For the second gamepad, I am seeing the notice about DS3 (plug/unplug/replug), but I don't know how long am I expected to wait and sit idle on this screen. Feels like eternity, but it eventually did switch screens.

                                        Also, I noticed bluez showed for update - a version newer than 5.48 was included officially into Stretch now maybe?
                                        EDIT:
                                        bluetoothd -v actually shows 5.43... not sure what did it show before the update.

                                        edge3000E P 2 Replies Last reply Reply Quote 0
                                        • edge3000E
                                          edge3000 @Silent
                                          last edited by

                                          @Silent For me with official dual shock 3's it just says Searching.... and I paired 5 controllers in a row without the screen changing... eventually it times out and I see that they are all in fact paired. I believe I had to plug in the cable, unplug the cable, plug it back in and press the playstation button for it to light up a controller number LED... as soon as it does that you're good.

                                          I didn't worry too much about it because I only had to do it once, but it would be nice if that searching screen had a way to cancel - if you hit CTRL-C it jumps back to emulationstation, but if you go back in to bluetooth it will still be searching (usually times out after that).

                                          P 1 Reply Last reply Reply Quote 0
                                          • P
                                            psyke83 Global Moderator @edge3000
                                            last edited by

                                            @edge3000 said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                                            @Silent For me with official dual shock 3's it just says Searching.... and I paired 5 controllers in a row without the screen changing... eventually it times out and I see that they are all in fact paired. I believe I had to plug in the cable, unplug the cable, plug it back in and press the playstation button for it to light up a controller number LED... as soon as it does that you're good.

                                            I didn't worry too much about it because I only had to do it once, but it would be nice if that searching screen had a way to cancel - if you hit CTRL-C it jumps back to emulationstation, but if you go back in to bluetooth it will still be searching (usually times out after that).

                                            There's some variance in the behaviour of the controller (and version of Bluez). In the older version of Bluez, if an unpaired controller in scanning mode (flashing LEDs) is connected via USB, it won't bind to the connection unless you press the PS button.

                                            A commit has been applied to clarify the message and ensure that the "Searching..." part no longer has the possibility of hanging infinitely. Make sure to update your script so it includes this commit: https://github.com/RetroPie/RetroPie-Setup/commit/6ce74e997efa2a6109b5db8884ce8f7e2032f5f0

                                            Another issue that's not entirely clear for end-users is that once you've successfully initiated the registration via USB cable connect, it's not necessary to choose a security mode on the next page (as the controller is already registered, and choosing any option will only cause an error). I'd like to clean that up, but I first need to ensure that the existing changes to the script haven't caused regressions for other BT peripherals.

                                            edge3000E 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.