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

    mk_arcade_joystick_rpi 2 joysticks custom GPIOs

    Scheduled Pinned Locked Moved Help and Support
    joystickgpiocustomarcade
    5 Posts 2 Posters 972 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.
    • craggus2000C
      craggus2000
      last edited by

      Pi Model: 4B
      Power Supply used: official
      RetroPie Version Used: 4.7.15
      Built From: Pre made SD Image on RetroPie website
      USB Devices connected: sometimes keyboard
      Controller used: 1/2 2 button joysticks via DB9 connected to GPIOs, USB snes controller, USB keyboard

      Hi,
      I've just started to migrate retropie from my rpi3 to rpi4. I say migrate, it's a clean install that I'm going to transfer config files over to.
      I've started with getting the joysticks working.

      On the pi3 that I setup about 3 years ago I was using mk_arcade_joystick_rpi installed from github, using map=4,5 to use custom GPIOs and it worked flawlessly.

      However, on the pi4 I'm having an issue getting 2 joysticks to work with the same build.
      If I set to map=1 or map=1,2, or map=4 then I can successfully test with jstest.
      if I set it to map=4,5 or just map=5 then I get the following error:

      modprobe: ERROR: could not insert 'mk_arcade_joystick_rpi': No such device
      

      For clarity, this is the line I used on the pi3 in the modprobe.d conf file and would like to use on the pi4:

      options mk_arcade_joystick_rpi map=4,5 gpio=17,27,22,24,-1,-1,18,23,-1,-1,-1,-1,-1 gpio2=10,9,11,7,-1,-1,25,8,-1,-1,-1,-1,-1
      

      I have also tried installing the driver from the retropie-setup and get the same error.

      I'm not using any GPIO expanders, just the pins on the Pi.

      Any help greatly appreciated!

      Craggus2000

      "If it ain't broke, break it and make it better"

      1 Reply Last reply Reply Quote 0
      • craggus2000C
        craggus2000
        last edited by

        I should have said, I have tried with 0.1.5 , and I believe the version from retropie-setup shows as 0.1.7? Tried both with same error.

        Craggus2000

        "If it ain't broke, break it and make it better"

        LolonoisL 1 Reply Last reply Reply Quote 0
        • LolonoisL
          Lolonois @craggus2000
          last edited by Lolonois

          @craggus2000 Hi Bender ;-) Another GPIO mk_arcade_joystick user here.

          I assume from your config your want to address 13 buttons? (4 for the axis, 9 push buttons).

          If yes: Do remove the current mk_arcade_joystick module via retropie_setup.sh script.

          Then do change to the retropie-hotkeybtn branch: Edit this file and line inside your ~/RetroPie-Setup folder. Change the last retropie to retropie-hotkeybtn. This selects a different branch.

          Afterwards enter the retropie_setup.sh again and install the module mk_arcade_joystick.

          Reboot and retry if
          a) the module is loaded: sudo lsmod | grep arcade
          b) you see some input devices at /dev/input: ls -l /dev/input/js*

          Rationale: The current retropie branch expects a MCP23017 (or similar) as GPIO expander. The retropie-hotkeybtn does use "barebone" GPIO.

          HTH

          craggus2000C 1 Reply Last reply Reply Quote 0
          • craggus2000C
            craggus2000 @Lolonois
            last edited by

            @lolonois said in mk_arcade_joystick_rpi 2 joysticks custom GPIOs:

            @craggus2000 Hi Bender ;-) Another GPIO mk_arcade_joystick user here.

            I assume from your config your want to address 13 buttons? (4 for the axis, 7 push buttons).

            If yes: Do remove the current mk_arcade_joystick module via retropie_setup.sh script.

            Then do change to the retropie-hotkeybtn branch: Edit this file and line inside your ~/RetroPie-Setup folder. Change the last retropie to retropie-hotkeybtn. This selects a different branch.

            Afterwards enter the retropie_setup.sh again and install the module mk_arcade_joystick.

            Reboot and retry if
            a) the module is loaded: sudo lsmod | grep arcade
            b) you see some input devices at /dev/input: ls -l /dev/input/js*

            Rationale: The current retropie branch expects a MCP23017 (or similar) as GPIO expander. The retropie-hotkeybtn does use "barebone" GPIO.

            HTH

            @Lolonois , Thanks very much for that advice, it worked perfectly!

            Craggus2000

            "If it ain't broke, break it and make it better"

            LolonoisL 1 Reply Last reply Reply Quote 0
            • LolonoisL
              Lolonois @craggus2000
              last edited by Lolonois

              @craggus2000 Thanks for reporting back. Have fun. Please edit your first post and add in the something like [solved], so it is more likely to be picked up by search engines.

              Your question made me updating my hint from last year on that topic.

              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.