• 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

DualShock 2 - getting it to work

Scheduled Pinned Locked Moved Help and Support
dualshock 2controller setusetupscph-10010ps2 to ps3
82 Posts 11 Posters 40.1k 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.
  • J
    Jofo
    last edited by 12 Feb 2017, 22:01

    The problem is that I've made more changes in the driver between those two releases, so I might have done something that damaged the timing. I will investigate... in the meantime, do You still have the original .deb that didn't have the random input issue, but had small motor rumble missing? I might need it...

    P 1 Reply Last reply 13 Feb 2017, 07:07 Reply Quote 0
    • P
      PET2001 @Jofo
      last edited by 13 Feb 2017, 07:07

      @Jofo

      A few minutes of actual gaming and I had ghost input even with the 166 kHz version - mostly "Start" and "Select". Also rumble is very weak on my controller, but I already identified the lines in the source where I might be able to change that (thanks to your code commentary).

      I still have the driver version with only the big motor working. I'll be happy to provide it to you.

      1 Reply Last reply Reply Quote 0
      • J
        Jofo
        last edited by 13 Feb 2017, 07:26

        That would be nice, upload it for me please, cos I don't do any subversion, which is probably a mistake :D I will try to diff it with the current version and see whats the problem...

        P 1 Reply Last reply 13 Feb 2017, 07:55 Reply Quote 0
        • P
          PET2001 @Jofo
          last edited by 13 Feb 2017, 07:55

          @Jofo

          You find the old version of the gamecon driver here: MegaNZ

          1 Reply Last reply Reply Quote 0
          • J
            Jofo
            last edited by 13 Feb 2017, 09:14

            The link does nothing... you need to right-click the file and choose "Get link"

            P 1 Reply Last reply 13 Feb 2017, 09:58 Reply Quote 0
            • P
              PET2001 @Jofo
              last edited by 13 Feb 2017, 09:58

              @Jofo

              Sorry for the confusion - I've shared the file on Google Drive

              1 Reply Last reply Reply Quote 0
              • J
                Jofo
                last edited by 13 Feb 2017, 10:06

                Thanks.

                So that 2.0 200KHz in the archive was working well for you, in terms of random input?

                P 1 Reply Last reply 13 Feb 2017, 10:23 Reply Quote 0
                • P
                  PET2001 @Jofo
                  last edited by 13 Feb 2017, 10:23

                  @Jofo

                  Yes it was. Tested for about 12 hours in Emulationstation (with the game menu open, were a random button press would bring up the menu or start a game) an for various, although short game sessions (were the current driver resets the game or exits RetroArch after just a few minutes because "Start" or "Select" are erroneously detected).

                  1 Reply Last reply Reply Quote 0
                  • J
                    Jofo
                    last edited by Jofo 13 Feb 2017, 10:54

                    When I get home from work I will look into it... in the meantime, try the older working version if You happen to encounter any random inputs

                    1 Reply Last reply Reply Quote 0
                    • J
                      Jofo
                      last edited by 13 Feb 2017, 21:24

                      Well, the changes are only marginal to be honest...

                      But I might be up to something. I've managed to find this web on the WebArchive

                      http://web.archive.org/web/20090228013235/http://www.geocities.com/digitan000/Hardware/22/e22_page.html

                      This guy puts quite significant delays between bytes - 60us! Thats less than what he used when transmitting/receiving bits - 100us (thats just 10KHz clock). Current driver has only 25us as gap between bytes, not speaking of clock (5-6us). I will try to experiment with it, I've set the clock to 7us (142KHz) and delay between bytes to 12 clocks (12*7).

                      I have updated the repository (2.0 142KHz) and I've also included new "SDK" for 2.0, the scripts have changed a bit. Simply edit/overwrite the .c file that is in the directory and run sudo ./do.sh - it will unpack the package, update the .c file, calculate new MD5 hashes, pack it together and install.

                      1 Reply Last reply Reply Quote 0
                      • J
                        Jofo
                        last edited by Jofo 14 Feb 2017, 08:16

                        Still random input...

                        What I am testing now is to read the data not straight when the clock edge goes up, but after a half-clock interval. I hope this will finally work, I am leaving it running as I am off to work

                        1 Reply Last reply Reply Quote 0
                        • J
                          Jofo
                          last edited by 19 Feb 2017, 21:06

                          I've uploaded an 8us version of driver that so far has not caused much trouble. Try it

                          1 Reply Last reply Reply Quote 0
                          • J
                            Jofo
                            last edited by 22 Feb 2017, 09:12

                            I've implemented a safety feature from Katemonster's code

                            https://www.dropbox.com/s/ejdwtkjovr8ue9m/gamecon_gpio_rpi.c?dl=0

                            detecting random SELECT pushes. Adds a bit of delay to Select press, but should eliminate random input once for all. I've also increased frequency back to 5us, testing now...

                            1 Reply Last reply Reply Quote 0
                            • J
                              Jofo
                              last edited by 22 Oct 2017, 10:43

                              Back after a long time!

                              I have the final version of the driver, updated also for running on the new 4.9 kernel, no random input.

                              Enjoy!

                              https://uloz.to/!ini7iEICM5Vb/gamecon-gpio-rpi-dkms-2-0-all-deb

                              1 Reply Last reply Reply Quote 0
                              • J
                                JeffJordan
                                last edited by JeffJordan 12 Jul 2017, 12:03 7 Dec 2017, 12:02

                                this thread answers a few questions from my side about the usage of force-feedback/vibration at the psone/ps2 controllers.
                                @Jofo: a BIG thank you for your work here !

                                but I'm sorry for such a dull question now (I'm a NewPie in linux-stuff, but an old-timer in hw-stuff):
                                how do I install the gamecon-gpio-rpi-dkms_2.0_all.deb driver now?
                                guess I can't use the RetroPie-Setup Script (because this will only look at the drivers found @ www.niksula.hut.fi/~mhiienka/Rpi).

                                is there a way to copy the debian file to the raspberry and install it from there via command line ?

                                Dem Inscheniör is' nix zu schwör...

                                1 Reply Last reply Reply Quote 0
                                • J
                                  Jofo
                                  last edited by Jofo 12 Jul 2017, 12:17 7 Dec 2017, 12:09

                                  Hello Jeff,
                                  in order to install the driver, run (once copied on your RsPi):

                                  sudo dpkg -i gamecon-gpio-rpi-dkms_2.0_all.deb

                                  Configuration is the same as for the original gamecon driver, so check the documentation. I plan to make a page about the driver, the wiring and so on, if any questions - write here for now ;)

                                  Hope it will work on Your setup :)

                                  J 1 Reply Last reply 7 Dec 2017, 12:27 Reply Quote 0
                                  • J
                                    JeffJordan @Jofo
                                    last edited by 7 Dec 2017, 12:27

                                    @jofo said in DualShock 2 - getting it to work:
                                    ...I plan to make a page about the driver, the wiring and so on, if any questions - write here for now ;)...

                                    guess I'm a good guinea pig to bring up all the NewPie questions for your page ;-), at least from the software point of view.

                                    first question: to which folder do I need to copy the *.deb file ?
                                    and I guess I need to set the rights for the file to a specific value...

                                    Dem Inscheniör is' nix zu schwör...

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      Jofo
                                      last edited by 7 Dec 2017, 12:45

                                      home folder will do (should be the default folder when you log into the Pi). It actually does not matter where it is. As far as I remember, no rights need to be set.

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        JeffJordan
                                        last edited by JeffJordan 12 Jul 2017, 22:44 7 Dec 2017, 22:06

                                        @Jofo :
                                        just to give you a feedback:

                                        got it running now.

                                        1st: hooked up a keyboard to the raspberry.
                                        2nd: copied the gamecon-gpio-rpi-dkms_2.0_all.deb driver via network from my windows pc to a directory at the RETROPIE (used the /BIOS directory).
                                        3rd: pressed F4 and navigated to the /BIOS directory with:
                                        cd RetroPie/BIOS
                                        then started the installation with: sudo dpkg -i gamecon-gpio-rpi-dkms_2.0_all.deb

                                        4th: after the installation was finished, I changed the directory to the /etc directory with:
                                        cd /etc
                                        and edited the modules file with the nano editor:
                                        sudo nano modules
                                        there I added the line "gamecon_gpio_rpi", as mentioned at the GPIO Modules installation guide.
                                        so far there was only one active entry with "uinput". I placed the gamecon_gpio_rpi in the next line.

                                        5th: changed the directory from there to /etc/modprobe.d with cd modprobe.d and opened the nano editor a second time:
                                        sudo nano gamecon.conf, entered "gamecon_gpio_rpi map=0,0,0,0,7,0" in the first line and saved it as gamecon.conf (until then, there was no such file).

                                        6th: did some soldering work according to your schematics above (1.8k resistor between pin#1 and pin#3 of the raspberry) and connected pin#3 of the pad (supply for the vibration motors) to +5V (pin#2 & pin#4 of the raspberry).

                                        0_1512684675759_20171207_GPIO.jpg

                                        by the way: used the female part of an old extension cable to connect the gamepad... approx. 40cm long.

                                        7th: checked every joint and connection twice, powered off the raspberry and connected the psx pad to the gpio port.

                                        after rebooting the raspberry I needed to configure my psx gamepad (don't forget to switch on the analog mode).
                                        then I started Spyro the Dragon and encountered that there was no analog support. ok, needed to set the pad type from "standard" to "analog" inside the quick-menu (<select> + <triangle>, -> quick-menu -> options -> pad 1).
                                        now starting the game gave me analog support and rumble/vibration !

                                        unfortunately the vibration effect is very decent. I got much more force feedback when I use the joystick at my pc, with an USB twinport adapter. there the motors are powered with +5V as well, but work much stronger.

                                        8th: then I disconnected pin#3 (motor supply) of the pad from the raspberry's +5V Vcc, connected it to a lab power supply and feeded the pad with a higher voltage.
                                        but it didn't make a big difference at the genuine scph-110 pad... there I could increase the voltage up to 7.5V before the pad draws some unwanted current, even when not rumbling (so I stopped there).
                                        with other ps2 compatible pads I was able to increase the voltage to 12V and above... and got a better vibration effect; but still not as strong as at the genuine psone console, or when testing the pad at the pc.
                                        so there is still something fishy with the driver. guess the pwm ratio needs to be increased.

                                        furthermore I noticed that the in-game effects differ from the original. so if you reanimate a frozen dragon inside spyro, there is no rumble at retropie, while there is a strong vibration at the genuine console (and ePSXe as well).
                                        but when Spyro hits a wall, or knocks up a chest, I get my force-feedback :-D.

                                        so, enough for today.

                                        cheers,
                                        Jeff

                                        Dem Inscheniör is' nix zu schwör...

                                        1 Reply Last reply Reply Quote 0
                                        • J
                                          Jofo
                                          last edited by 8 Dec 2017, 09:54

                                          Hi,
                                          thanks for the feedback!

                                          I never had a PlayStation, so I can't tell how strong the vibrations should be. I tested mostly on Crash Bandicoot 3 and Need For Speed. I have two PS2 controllers and both behave differently for the same settings. I can increase the vibration intensity in the driver itself if You want, or I will try to find a way how to put the vibration force setting to some config file.

                                          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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received