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

    Using RetroPie For My Own Software

    Scheduled Pinned Locked Moved Help and Support
    retro piegpio to usb
    8 Posts 2 Posters 234 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.
    • S
      saiki20
      last edited by

      Hi all, I am fairly new to the RetroPie community and had a quick question. I am looking to use a kit to convert signals from some buttons and a joystick as I am already using all of my GPIO pins. I was wondering if I would be able to do this when creating my own game? I am currently making TETRIS and it would be really convenient to have the input signals go through my Raspberry Pi 3's USB ports.

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

        Depends on how you implement your game, but using USB for the input device(s) is not a problem - most of the USB gamepads/joystick encoders should be recognized by the OS without problems.

        1 Reply Last reply Reply Quote 1
        • S
          saiki20
          last edited by

          Thank you! So I would just need to create the game in Python for it to work? or are there any other restrictions that I need to account for?

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

            @saiki20 Python is one of the programming languages you can use to create your game, not a bad one.

            or are there any other restrictions that I need to account for?

            If you'd like the game to work with RetroPie, you should take into account that RetroPie doesn't rely on an Xorg environment on the Pi.
            If your game uses something like pygame_sdl2 (which I think uses SDL2 underneath), then it should work. If you already started development, maybe sharing some details about the libraries/framework you're using can help clear up the doubts of your future game ability to run on RetroPie.

            1 Reply Last reply Reply Quote 0
            • S
              saiki20
              last edited by

              Thanks, I think I could get Python to work with it! What if I were to use ARM assembly?

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

                @saiki20 said in Using RetroPie For My Own Software:

                What if I were to use ARM assembly?

                IMHO you don't need to, at least not at this stage. Some of the underlying libraries already contain ARM optimised code and you're using a high-level language like Python that takes advantage of those libraries.

                1 Reply Last reply Reply Quote 1
                • S
                  saiki20
                  last edited by

                  okay, I have decided to use C to program the game. Do I have to do anything special when programing it to account for these new USB signals?

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

                    @saiki20 said in Using RetroPie For My Own Software:

                    Do I have to do anything special when programing it to account for these new USB signals?

                    Can you be more specific ? How are you using the USB ports - just using a regular controller/gamepad or you have a another device type of device that connects via USB and you'd like to act as a controller ?

                    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.