RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    gamecon_gpio_rpi 1.3 (kernel 4.9 build fix)

    Scheduled Pinned Locked Moved Ideas and Development
    gpiocontrollergamecongamecondriver
    20 Posts 7 Posters 5.2k 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.
    • B
      BPMnyc
      last edited by

      I just installled your package. I have a pi Zero with NES controller inputs wired to GPIO. I am testing now.
      Will report back

      1 Reply Last reply Reply Quote 0
      • B
        BPMnyc
        last edited by

        This worked like a charm! Thanks for your work! BTW I made this splashscreen image for my "NesPi," setup. Feel free to use it!0_1501795319232_NesPi.png

        1 Reply Last reply Reply Quote 0
        • B
          BornDead
          last edited by

          @psyke83
          Thank you! It´s working perfectly.
          Do you have knowledge how to change which GPIO pins that are used for player 5 and 6?

          I have tried to edit gamecon_gpio_rpi.c to the following code without success:

          /* GPIO pins 0, 1, 4, 7, 22, 23 */
          static const int gc_status_bit[] = { 0x01, 0x02, 0x10, 0x80, (1<<22), (1<<23) };
          static const int gc_gpio_ids[] = { 0, 1, 4, 7, 22, 23 };

          I want to be able to use GPIO02 and GPIO03 for power and reset buttons. And to use 2 nes controllers and 2 snes controllers via gamecon gpio.

          1 Reply Last reply Reply Quote 0
          • E
            EmuChicken
            last edited by

            Nice to see this is a quite recent topic. Hey y'all!

            Thanks for helping rewrite the code to work in the latest Retropie, psyke83! - I can successfully install your package, but when I configure the controller through the commandline, "modprobe --first-time db0_gpio_rpi map 4,4" - it throws out an error ... (re: finding a modfile or db9 etc)

            Is there a way around this?

            Thanks in advance
            Tim (with a pi primed with 2 sets of wired db9 connectors all ready to go)

            --- slightly unrelated, but if I set up both to megadrive connectors, would the amiga / atari work also? I remember megadrive pads working fine in the amiga, so any thoughts?

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

              @EmuChicken

              The RetroPie script's gamecon driver installation consists of two packages that build kernel modules - db9_gpio_rpi and gamecon_gpio_rpi. The package that I provided is only for one, and not the one you need.

              I'm guessing that you tried installing my updated package without first following the installation instructions, which is why the db9 package (and driver) is not present. https://github.com/RetroPie/RetroPie-Setup/wiki/GPIO-Modules

              1 Reply Last reply Reply Quote 0
              • DarksaviorD
                Darksavior
                last edited by Darksavior

                The original developer, marqs, has updated both drivers to build properly:

                https://github.com/marqs85/gamecon_gpio_rpi
                https://github.com/marqs85/db9_gpio_rpi

                Do those repos need to be added by @BuZz to retropie?

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

                  @darksavior said in gamecon_gpio_rpi 1.3 (kernel 4.9 build fix):

                  The original developer, marqs, has updated both drivers to build properly:

                  https://github.com/marqs85/gamecon_gpio_rpi
                  https://github.com/marqs85/db9_gpio_rpi

                  Do those repos need to be added by @BuZz to retropie?

                  Great news. I see that marqs has already sent a PR to update the RetroPie-Setup script, so nothing needs to be done. I've added a note to the top of this thread.

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

                    @EmuChicken,

                    I didn't realize that the db9_gpio_rpi driver also needed patching with the same build fix, but the original author has done it now. If you update your script and reinstall the official drivers, your controllers should work.

                    1 Reply Last reply Reply Quote 0
                    • E
                      EmuChicken
                      last edited by

                      Aye, thanks for the update... Will give it a shot now

                      1 Reply Last reply Reply Quote 0
                      • E
                        EmuChicken
                        last edited by

                        when configuring with modprobe:
                        "modprobe: ERROR: could not insert 'db9_gpio_rpi': Invalid argument"

                        ;-(

                        1 Reply Last reply Reply Quote 0
                        • E
                          EmuChicken
                          last edited by

                          Sussed it! Updated everything using the command lines- reinstalled. then needed to add "SUDO" to the "modprobe --first-time gamecon_gpio_rpi map 4,4"

                          All working! Thanks for the help!

                          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.