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 40.8k 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.
    • edge3000E
      edge3000 @psyke83
      last edited by

      @psyke83 Thank you for your work on the sixaxis scripts!

      After I setup a new Stretch build on my Pi 3B+ I found I could no longer get more than 4 dualshock3's to connect at the same time using the ps3controller driver. I installed your sixaxis PR and am happy to report I can get 5 official dualshock3's working great! I will borrow at least 1 more PS3 controller and do some more thorough testing to make sure 6player Xmen arcade still works.

      Inputs seemed very responsive as if the input lag is reduced as well.

      Thanks again!

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

        So I removed ps3controller and installed sixaxis (rebased on the most up to date RetroPie-Setup) and ran into a weird issue...

        After pairing my two legimate DualShock 3's I did not need to reconfigure them in EmulationStation, they worked as is! However, I can't get them to work in any of RetroArch emulators.

        I tried removing all gamepads from es_input.cfg and it did not help - later I'll try resetting ES controls completely and maybe re-pairing the controllers.

        What worries me is that nobody else mentions an issue like this... puzzling.

        pjftP 1 Reply Last reply Reply Quote 0
        • pjftP
          pjft @Silent
          last edited by

          @Silent Have you tried re-configuring them in ES, though? That's what then sets up the controls in the remaining emulators - maybe there's something missing there, even though they paired and worked just fine?

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

            @pjft Yes, I have. One thing worth noting is that libretro joystick configuration shows both pad 0 and 1 as "not connected".

            That said, I'll try one more time.

            EDIT:
            I have repeated the steps (including removing es_input and re-adding onfinish action for it), and it works fine everywhere (including Retropie-Setup and runcommand), but not in game. Interestingly, when launching the game it says "controller connected" but no button works.

            EDIT2:
            An entry in retroarch-joypads is also being created, so I think there may be something I need to re-set in retroarch configs.

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

              Update - I tried installing ps3controller driver again and it didn't even want to pair - but thankfully, I had a full SD card backup I made just before swapping drivers (guess I expected problems) and everything works flawlessly now.

              So all in all, I am not using this driver yet, but I have a clean starting point I can re-try from at a later point. I'll make use of this opportunity to compare retroarch config files with what I remember from the "broken" install and see if I can find the difference.

              EDIT:
              I can't find any differences in config files (other than different files in retroarch-joypads, of course). However joypad assignments in Configuration Editor now show PLAYSTATION(R)3 Controller, as expected - after migrating drivers this menu claimed pads are not connected.

              edge3000E 1 Reply Last reply Reply Quote 0
              • edge3000E
                edge3000 @Silent
                last edited by

                @Silent Good call making a backup beforehand! The version of sixaxis and related scripts I am running is psyke83's PR test branch of sixaxis, its working great for me. I never had much luck with the up to date RetroPie-Setup version you tried.

                These are the steps I did to install it, quoting from earlier in this thread:

                @psyke83 said:

                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
                S 1 Reply Last reply Reply Quote 0
                • S
                  Silent @edge3000
                  last edited by

                  @edge3000 Then the steps are identical, the only difference is that I rebased this PR on top of up-to-date RetroPie-Setup because I didn't want to lose newest Setup features. I may try again without rebasing, however. After all, if it ends up working fine I can restore Setup back to master.

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

                    @Silent

                    The hid-sony driver uses a completely different button mapping to the old driver, but also identifies itself with the manufacturer prefix -- so you should look for Sony PLAYSTATION(R)3 Controller.cfg.

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

                      @psyke83 As far as I understand, name doesn't really matter here. I wiped retroarch-joypads when migrating drivers anyway, and I did have a .cfg generated there, the fact whether it had "Sony" prefix or not didn't really bother me.

                      I do wonder however why I did not have to remap the gamepad after migrating drivers. Perhaps I had some older mappings lingering, as right now (after revert, without sixaxis drivers) I my es_input.cfg has mappings for both PLAYSTATION(R)3 Controller and Sony PLAYSTATION(R)3 Controller. I thought that was my PS3 pads presenting differently, as one of them is from Fat PS3 era, while the other was bundled with PS3 Super Slim and they are in fact a bit different - but that doesn't seem to be the case.

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

                        @Silent

                        Even if you never touched this PR, the hid-sony kernel driver is used on the USB connection, which is likely the reason why you already had a mapping (with the Sony prefix). This PR installs a patched version of this driver; if you're on jessie, the mappings will be different from the stock version, but they are identical to the default stretch version.

                        If you're using jessie, keep in mind that we recently dropped support, so it would be a good idea to upgrade to a stretch-based image regardless of whether you intend to use this PR.

                        I can't say for sure why the buttons aren't being detected in emulators, but if you are on jessie, it's possible that you still have the old mappings. Manually deleting the Sony mappings and setting up again might fix your issue.

                        You can try running evtest (from the package of the same name) to check if controller inputs are working correctly, to rule out driver issues.

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

                          @psyke83 I am not on jessie, no - I run an up to date Stretch version. It's just that I used ps3controller until now.

                          Good call about USB controllers however! That's most likely the reason.

                          I did remove mappings completely after initially complaining about that in this thread, reconfigured everything, ensured retroarch does indeed have a .cfg file for this joypad - still, no dice, and an inbuilt joypad selection in Configuration Menu showed controllers as "disconnected".

                          Since I was unable to go back to proper BT connection after uninstalling sixaxis and going back to ps3controller but restoring the SD image made pads work perfectly again even without having to connect them once (which means DS3's themselves were still correctly paired), I am going to give it another try soon. Maybe there is something which didn't work quite right the first time, or maybe I should have explicitly unpaired controllers from ps3controller first.

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

                            Hi, sorry for not fine-combing the thread before posting this. It's 04:20 at night and I can't sleep but need to try, so I thought I'd at least try to get this off my chest.

                            I have just installed RetroPie, I have an old PS3 controller which I got working. But I don't have a second controller. Tomorrow I thought about buying a new one, problem is PS3 controllers aren't for sale anymore where I live. Only PS4 controllers.

                            Does this new thing discussed in this thread make it possible to use both a PS3 controller and PS4 controller? What about a PS3 controller and Xbone controller?

                            Again, sorry for not fine-combing the thread but I need to try and get some sleep. Kind of asking this at the very last minute since I am getting a ride into town tomorrow from a friend to be able to buy a controller. Would suck if I get home and the PS3 controller doesn't work.

                            So if possible I would be really grateful if someone responded to me very soon before I buy a new expensive controller. >__<

                            1 Reply Last reply Reply Quote 0
                            • edge3000E
                              edge3000 @Silent
                              last edited by

                              @Silent Just to clarify I did start with the fresh Stretch image and did all the updates from RetroPie-Setup before applying the sixaxis PR.

                              So far I have tested 5 dualshock 3's at once wirelessly and they are stable!

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

                                @edge3000 Right, that's not how I tried indeed - I attempted to set it up on my existing RetroPie installation. I don't really have a spare SD card to try and I don't think I want to replace its contents with a new installation for testing, then restore it from backup again. Was hoping I can try it in a live environment.

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

                                  OK, I'm giving this another go on my existing RetroPie installation (Stretch based) - removed ps3controller driver, rebooted and proceeded to installing sixaxis.

                                  Why is custombluez installed automatically with sixaxis, when the instructions say to grab it only if you have third party PS3 controllers?

                                  I'll edit this post with progress as I go by.

                                  EDIT:
                                  So I retraced my steps and results are identical, sadly. EmulationStation works perfectly with the controller (presenting itself as Sony PLAYSTATION(R)3 Controller), reconfigured buttons anyway to be sure and to re-create a RetroArch configuration for it (which it did, \\RETROPIE\configs\all\retroarch-joypads contains Sony PLAYSTATION(R)3 Controller.cfg). Despite all that, libretro joypad assignment (in Configuration Editor in ES) sees the pad as "not connected" and games do not react to it.

                                  Even weirder, starting lr emulators does show Sony PLAYSTATION(R)3 Controller configured on port #0! Bindings don't work at all, though.

                                  Also tried removing and reinstalling retroarch from core packages, no success.

                                  EDIT2:
                                  Tried evtest - every button and axis (including analog triggers) work fine. Which makes sense, considering controller works perfect in EmulationStation.

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

                                    @Silent

                                    Thanks for the information. I've identified the reason why the configuration editor doesn't show the controller as connected; this will be fixed by https://github.com/RetroPie/RetroPie-Setup/pull/2592.

                                    The above problem should only be a cosmetic issue, and still doesn't explain why your controller isn't working in retroarch. Maybe you could zip and upload your retroarch configuration files for me to take a look?

                                    P.S. The sixaxis PR is still in flux, but in the last revision I changed it so that the updated BlueZ stack + patched kernel driver is automatically installed, just so that people testing third-party controllers don't have to go through extra steps. The final version of the PR will only install the package that includes the udev rule and script to handle calibration and idle disconnection.

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

                                      @psyke83 Thanks for looking into this, the latest changes sound good!

                                      I have zipped retroarch.cfg, retroarch-core-options.cfg, and config + autoconfig directories from retroarch - is this enough?

                                      https://www.dropbox.com/s/vb8ve63iimed5ax/retroarch-files.zip?dl=0

                                      Do note these configs are from as-is state, without using your latest changes. For those I'll need to restore my SD card again before trying.

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

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

                                        @psyke83 Thanks for looking into this, the latest changes sound good!

                                        I have zipped retroarch.cfg, retroarch-core-options.cfg, and config + autoconfig directories from retroarch - is this enough?

                                        https://www.dropbox.com/s/vb8ve63iimed5ax/retroarch-files.zip?dl=0

                                        Do note these configs are from as-is state, without using your latest changes. For those I'll need to restore my SD card again before trying.

                                        That was enough - thanks.

                                        It looks like your retroarch.cfg configuration has been improperly edited; look at the first line:

                                        all_users_control_menuall_users_control_menu = "true"
                                        

                                        This should be:

                                        all_users_control_menu = "true"
                                        

                                        I haven't had time to check everything else, but the above is not the reason for controls not working. It seems that this line is the culprit:

                                        input_axis_threshold = "0.000000"
                                        

                                        When I change this to 0.500000 (to match the value in my configuration before I replaced it with yours), my controller works with your configuration.

                                        I'm also seeing retroarch complain about this line:

                                        input_libretro_device_p1 = "5"
                                        

                                        This was set to 1 in my configuration, but perhaps this is related to another input device you're using that you didn't mention.

                                        S edge3000E 2 Replies Last reply Reply Quote 0
                                        • S
                                          Silent @psyke83
                                          last edited by Silent

                                          @psyke83 Amazing, all_users_control_menu and input_axis_threshold indeed helped! (tested them in one batch so I'm unsure if I had to use both or just one). Kinda makes you think why did it work fine with sixad, but I don't think it's something to worry about =)

                                          With that change it seems to work perfectly! However, when doing Moonlight streaming (no reconfiguration was needed! triggers are still analog. Since evtest can report their analog values properly, would it mean that it's just a matter of providing and updated SDL controllerdb entry?

                                          Thanks a lot for your help! I think I will keep using this driver for a while, then just back up my saves, restore SD card from the backup and get a new one when it's updated/finalized. Alternately, I can just keep updating it here since now I know it works :D

                                          1 Reply Last reply Reply Quote 0
                                          • edge3000E
                                            edge3000 @psyke83
                                            last edited by

                                            @psyke83

                                            Does the sixaxis PR have any effect on button mappings or button detection? I know there were big changes recently to the numbers buttons had assigned to them, I'm just not sure if the PR matches the current standard?

                                            (I am on my new Stretch build / rpi3b+ / all updates installed, then Sixaxis PR applied)

                                            The issue I am having is with Advmame 3.9, and dualshock 3 buttons.
                                            In advmame.rc I have it set to "device_joystick event" and Advmame only sees buttons 0 to 10. It won't detect L3, R3, or the d-pad buttons. (which are 11-16) Same thing with it set to auto or raw. d-pad buttons worked fine on my old Jessie/rpi3b/advmame 3.5 build I think because the buttons were assigned lower numbers back then. (I may have been missing all the L and R buttons instead - which for the games I play didn't effect me)

                                            If I set "device_joystick sdl" all the buttons are detected, I thought this was my solution but now I notice a huge 1 minute+ loading time before a game starts, and at least a 5 second freeze every time I exit a game! With it set to event, auto or raw it loads and exits almost instantly.

                                            If I test the controller with jstest all buttons 0 to 16 operate correctly.

                                            Anyway I just wanted to verify if it's related to the PR or just an Advmame issue!
                                            Thanks

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