• 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

Retropie configure 2 GPIO joysticks

Scheduled Pinned Locked Moved Help and Support
retropieretrogameadafruit gpiogpiogpiooner
9 Posts 3 Posters 3.0k 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.
  • F
    Freddy00
    last edited by 14 Mar 2019, 16:46

    Hello there

    I've recently set up my Raspberry Pi 3 with retrogame, and my goal is to play with 2 joysticks and 6 buttons (3 buttons each).
    The problem is that I haven´t been able to figure out how to find a program that lets me use both joysticks. Atm, I'm using adafruits Adafruits retrogame, and its worked well with 1 joystick. But they only let you configure 1 joystick with 6 buttons at max, and since i need another joystick it dosen't fulfil my goal. I've seen GPIOneer and know that it's an alternative to retrogame, but im not sure if that lets you use two joysticks?

    Basically my question is, do you guys know if GPIOner will work, or do you have a better idea?

    Grateful for fast answers since this is a school project.

    Thanks in advance!

    1 Reply Last reply Reply Quote 0
    • M
      mitu Global Moderator
      last edited by 14 Mar 2019, 17:14

      Take a look at the mk_arcade_joystick_rpi gamepad driver - it allows you to map more than 1 joystick (over GPIO) to a Raspberry Pi. The driver is easily installable from the RetroPie setup drivers' section, but you'll have to load it and configure it accordingly.

      F 1 Reply Last reply 14 Mar 2019, 20:49 Reply Quote 0
      • F
        Freddy00 @mitu
        last edited by 14 Mar 2019, 20:49

        @mitu Thanks for the reply. I'm having trouble installing, stuck on something about not finding kernel headers? I'm going to install a fresh copy of retropie again tomorrow to see if it does the trick. I'll let you know how it goes

        1 Reply Last reply Reply Quote 0
        • L
          Lolonois
          last edited by Lolonois 14 Mar 2019, 22:37

          For the missing kernel headers, check if the package raspberrypi-kernel-headers is installed with:

          apt-cache policy raspberrypi-kernel-headers. If you get an output like this:

          raspberrypi-kernel-headers:
            Installed: 1.20190215-1
            Candidate: 1.20190215-1
            Version table:
           *** 1.20190215-1 500
                  500 http://archive.raspberrypi.org/debian stretch/main armhf Packages
                  100 /var/lib/dpkg/status
          

          the mk_arcade_joystick_rpi should build out-of-the-box, eerm, out-of-the-setupscript as mitu noted.
          If the headers are missing (no version in Installed: ), issue: sudo apt-get install raspberrypi-kernel-headers. Then build the mk_arcade_joystick_rpi from the setupscript.

          After the build process has finished check if the modules are loaded, check with: lsmod | grep mk_arcade_joystick_rpi, it should give you a result with one line.

          Alternatively you may check with jstest /dev/input/js0and jstest /dev/input/js1 if both GPIO controller are recognized.

          HTH

          F 1 Reply Last reply 15 Mar 2019, 08:17 Reply Quote 0
          • F
            Freddy00 @Lolonois
            last edited by 15 Mar 2019, 08:17

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • F
              Freddy00
              last edited by Freddy00 15 Mar 2019, 08:26

              @Lolonois I didn't realise he meant there was an installation driver built into the retropie so i followed the steps on Github.

              Since it didn't work yesterday, I tried to download it through the drivers section instead, and it worked (says it's installed).
              I ran "apt-cache policy raspberrypi-kernel-headers" and i got the result you listed.

              So then i tried to load the driver (like the steps shown at github), but when i write:
              "sudo modprobe mk_arcade_joystick_rpi map=1,2", i get the following message:
              "modprobe: FATAL: Moudle mk_arcade_joystick_rpi not found in directory /lib/modules/4.19.27-v7+".

              Also I couldn't get the Ismod command to work, just said that it couldn't find the command. I'm probably just writing it wrong, still fairly new to this.

              M L 2 Replies Last reply 15 Mar 2019, 09:01 Reply Quote 0
              • M
                mitu Global Moderator @Freddy00
                last edited by mitu 15 Mar 2019, 09:01

                @Freddy00 said in Retropie configure 2 GPIO joysticks:

                I didn't realise he meant there was an installation driver built into the retropie so i followed the steps on Github.

                What exactly wasn't clear from my reply ? I'm genuinely interested to know, it's not a reproach.

                The driver is easily installable from the RetroPie setup drivers' section, but you'll have to load it and configure it accordingly.

                F 1 Reply Last reply 15 Mar 2019, 09:39 Reply Quote 0
                • F
                  Freddy00 @mitu
                  last edited by 15 Mar 2019, 09:39

                  @mitu You did nothing wrong, I might have just read it to fast and overlooked it. I clicked the link and it took me to the page and I thought you meant it was easily installable by following the steps on that link (which it should be either way, don't know why I can't get it to work).

                  1 Reply Last reply Reply Quote 1
                  • L
                    Lolonois @Freddy00
                    last edited by 15 Mar 2019, 19:42

                    @Freddy00 Driver installation with sudo ~/Retropie-Setup/retropie_setup.sh should work. If you want to review the compile log see zless ~/~/RetroPie-Setup/logs/rps_2019-03-15_194311.log.gz when back on commandline (your date and time may vary).

                    You can type lsmod alone, you should spot the mk_arcade... driver loaded.
                    (If the command still is not found you should install kmod, but it should be already there, so there should no need to issue sudo apt-get install kmod.

                    Then, and only then when lsmod shows the module, proceed with https://github.com/recalbox/mk_arcade_joystick_rpi#auto-load-at-startup edit the mk_arcade_joystick.conf and change the map=1 to map=1,2. Save the file, reboot and then you can configure your joysticks with emulationstation.

                    If you use the retropie_setup.sh method you should succeed. If not please do post the build log as noted above.

                    PS: I would refrain from following the Github tutorial from A to Z, a) it is tailored towards another Retro-Distro (Recalbox), b) if you get stuck it's hard to help and c) last but not least this is a forum about Retropie-Distro (and not Recalbox).

                    1 Reply Last reply Reply Quote 1
                    9 out of 9
                    • First post
                      9/9
                      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