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

    Setting a controller with MAME and a Pi Zero

    Scheduled Pinned Locked Moved Help and Support
    zero controller
    12 Posts 5 Posters 2.3k 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.
    • G
      garry1540
      last edited by

      I am using a Pi Zero so only have one usb port.

      I can connect my keyboard and get into the menu with tab, but once I want to assign a button I need to pull our the keyboard and put in the usb controller. However I cannot get any button on my controller to register. It works fine with every other emulator. I have googled and watched videos on this setup but none I have found mention how to get a controller to work with a Pi Zero. What am I doing wrong?

      As a second and maybe related question, If I add a micro USB adaptor that converts the one USB port into to several, will I be able to plug both keyboard and controller in OK? And could this solve this problem? My controller already has two ports so in theory I can connect another (player 2 ) controller. Would this work - a keyboard and two controllers from a single USB port? There must be a limit on how many separate devices can be connected?

      markwkiddM 1 Reply Last reply Reply Quote 1
      • markwkiddM
        markwkidd
        last edited by

        Please follow these instructions in order to post the information needed to help you: https://retropie.org.uk/forum/topic/3/read-this-first

        1 Reply Last reply Reply Quote 0
        • G
          garry1540
          last edited by

          Pi Model: Zero W
          Power Supply used: PI supply from the Pi shop
          RetroPie Version Used: Retropie v4.2
          Built From: SD Image on RetroPie website
          USB Devices connected: Wireless keyboard/touch pad combo and wireless Playstation Controller
          Controller used: wireless Playstation Controller
          Error messages received: None
          Emulator: MAME4ALL

          1 Reply Last reply Reply Quote 1
          • markwkiddM
            markwkidd @garry1540
            last edited by markwkidd

            @garry1540 If you use a "powered" USB hub (in other words, one that you also have to plug into a power adapter, not just your rPi) you should be able to connect all of those devices simultaneously.

            Do I understand that you are currently doing this?

            1. Booting the rPi with the keyboard attached
            2. Starting the MAME4ALL core
            3. Pressing the TAB button to open the menu
            4. Disconnecting keyboard and attaching controller
            5. Pressing buttons on the controller does not show up in the Tab menu configuration

            If that's right, I do think you may have having a problem where the Pi doesn't recognize the controller when it's attached during the middle of a MAME4ALL session. In that case using a powered USB hub that allows you to connect all of your devices at once might be the fix as you speculated. (Maybe someone else with a Pi Zero will see this thread).

            In the meantime, I do think it would help if you could confirm whether or not I understand your scenario correctly.

            1 Reply Last reply Reply Quote 0
            • markwkiddM
              markwkidd
              last edited by

              Hi @dankcushions , I know that mame2003 is more your thing but if I'm understanding this question right it might be the basis for an enhancement to the MAME docs.

              Can you tell based on the description whether the user does in fact need to get a USB hub, because the controller input would not be detected if it's plugged in once MAME4ALL is already loaded and in the Tab menu?

              If that's the case I might add a note to docs to the effect of "make sure you have a way to connect a keyboard and controller simultaneously from the time the rPi boots until you get into MAME4ALL".

              1 Reply Last reply Reply Quote 0
              • G
                garry1540
                last edited by

                Thanks for the reply.
                Yes you understand the problem correctly. The keyboard works fine but when I unplug it and plug in the controller at the point where it is waiting for an input to setup a key no input is detected from the controller. My controller plugs into a HUB that allows a second controller for a second player. I have now tried my controller as both controller 1 and 2 and it is the same.

                Do you think if I purchased one of these micro USB doublers that would allow both keyboard and controller HUB to be plugged into what is effectively a single micro USB port it would work?

                It seems odd that no one else with a PI Zero W wouldn't have reported this problem with MAME before.

                1 Reply Last reply Reply Quote 0
                • G
                  garry1540
                  last edited by

                  I have actually found this, hopefully with be the solution to my problem.

                  http://www.ebay.co.uk/itm/OTG-Micro-USB-to-Standard-USB-Host-Splitter-Hub-Adapter-for-Raspberry-Pi-Zero-/262993440126?hash=item3d3ba16d7e:g:TWUAAOSww9xZKAmM

                  markwkiddM tashmanT 2 Replies Last reply Reply Quote 0
                  • M
                    ministryman
                    last edited by

                    I have all three Zeros, and I never saw the problem because I never did what you did. I suspect that's why others never asked the question before.

                    I do have a problem when running my Zeros with a powered hub. If I want all of the peripherals recognized, I need to wait about 10 seconds after I apply power to connect the hub.

                    1 Reply Last reply Reply Quote 1
                    • markwkiddM
                      markwkidd @garry1540
                      last edited by

                      @garry1540 I tend to agree that if this were the issue with the Pi Zero than someone else might have mentioned it by now. I truly don't have your hardware so I don't like to counsel you to spend money, not knowing for sure if it will be the answer.

                      1 Reply Last reply Reply Quote 0
                      • C
                        champrt78
                        last edited by

                        I just came across this , I know its older but I am having the same issue. Same problem, did it turn out to be the hub? I am waiting for my new hub to arrive, hoping that fixes it.

                        1 Reply Last reply Reply Quote 0
                        • tashmanT
                          tashman @garry1540
                          last edited by tashman

                          @garry1540 I use those cheapo 2 or 3 port hubs on my Pi Zeroes and have had no problems. I usually have a wireless controller, wireless keyboard and usb stick plugged in. Yes, it should work to configure a controller for mame4all (it does for me). The only thing I do is swap a couple of buttons around though (I'm used to a certain layout).

                          tashmanT 1 Reply Last reply Reply Quote 0
                          • tashmanT
                            tashman @tashman
                            last edited by

                            ...and configure it so select + start exits to emulationstation.

                            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.