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

    Connecting Playstation 2 Controller via GPIO Pins

    Scheduled Pinned Locked Moved Help and Support
    raspberry pi 5playstation 2gpio controllerdriverspackages
    4 Posts 2 Posters 616 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.
    • K
      kylen12
      last edited by

      Hi everyone, I am currently setting up RetroPie on a new Raspberry Pi 5. I have been able to set up and successfully play games. I am now hoping to use an original Playstation 2 controller. I tried to install the "Gamecondriver" package from the RetroPie-Setup script in the "Manage Driver Packages" menu, but it seems that it is not yet available for the RPi5. Has anyone had any success connecting their Playstation controller to an RPi5 via the GPIO pins and using it for RetroPie? I have appropriate jumper wires and I know how to set up pull-up/pull-down resistors, etc. if necessary. Thanks in advance for any help!

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by mitu

        The gamecondriver indeed has not been made compatible with the Pi5 and it may not work with recent RaspiOS kernels (6.6.x) even for other Pi models. However, the driver does not support the PS2 gamepads/controllers - it's not just a matter of setting up the GPIO communication, but also decoding/encoding the I/O protocol understood by the controller.
        My advice is to get a PS2 to USB adapter (like this Raphnet converter, now out-of-stock though) and use it to connect you controller via USB.

        K 1 Reply Last reply Reply Quote 0
        • K
          kylen12 @mitu
          last edited by

          @mitu Thanks for your response. I will have to figure out a different way of connecting it. I am wondering if it would be possible to set up a Python script that would use a library for decoding the SPI protocol for the PS2 controller. Do you think it is feasible to have a Python script that would do so? In the past, I was able to use an Arduino library that could decode I/O from the PS2 controller, but I imagine it is not as easy with the RPi5.

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @kylen12
            last edited by

            @kylen12 said in Connecting Playstation 2 Controller via GPIO Pins:

            Do you think it is feasible to have a Python script that would do so?

            Probably yes, but I'm not famiiar with the SPI ecosystem on the PI. There's https://github.com/mholgatem/GPIOnext which is a simpler input simulation library (i.e. 1 GPIO line = 1 input/button) and can provide a starting point for the 'virtual' input device creation, but for the SPI part I'm afraid I have no idea.

            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.