Arcade Inputs
  • I assembled a bartop arcade setup and wired all the inputs to the GPIO of the B + Pi and I have no idea what file I need to edit or create. I also want to program the input of the lower right green and black button to "sudo reboot" and "sudo halt." Is this something that can be done?

    Here is a preview of the cabinet.
  • yes, it can be done. I would recommend checking out this tutorial over at It should give you a good base to start at.
  • you can test my one player retrogame : a modify version of the initial retrogame to support more than 2 buttons :

    wiring schema here
  • I tried the Adafruit setup and the inputs aren't working in the games. I initially thought no inputs weren't working at all but I moved the joystick yesterday when the monitor was in sleep mode and it woke up. I started from scratch by deleting all the Adafruit files and starting over, but I still can't get it to work. I tried the pac man plus and mario brothers games and neither move to the joystick. They do move the the keyboard inputs though.

    Pin out

    GPIO portion of Adafruit script

    command line steps taken again
  •  ...They do move the the keyboard inputs though. 
    Do you mean that when you test it in command line, it actually outputs the correct buttons?

    Did you run the controller config utility inside of PiPlay? (hit the tab key on the main menu, then select controller config)
  • @Bender- I just had a thought. Make sure that you reboot your raspberry-pi. Running ./retrogame and then quitting it, kills the background process for me. I have to reboot before it runs again.
  • That's a great idea. If I recall, I ran ./retrogame from putty, and then walked out to the arcade. I have rebooted a few times since though with no luck. I ran into many more issues since.

    The menu you spoke off actually prevented me from running the calibration. It gives me a message of "calibration not needed" and I can't do anything other than back out of that.

    I tried this other menu, but it never recognized any inputs from the GPIOs

    As far as the other issues, I had a powered USB hub plugged into a surge protector, and never realized it wasn't sitting in both receptacle slots... so it killed the USB ports on the Pi.

    I can't even get the USB keyboard to work anymore while the keyboard is plugged directly into the Pi and nothing else is. I ordered a new Pi and obviously made sure the power adapter to the USB hub was plugged in correctly, but apparently my hub is bad because it killed the USB ports on the second Pi. I ran into the exact same issue. (Both Pi's are model B+) I can't even get either LED on the ethernet port. I put the SD card in a standard model B and the USB keyboard and I was able to use keyboard. 3rd Pi on order and a new powered USB hub.
  • ahh.. I see some problems that we can troubleshoot.
    First off, what version of PiPlay are you running?

    -As for retrogame not working, I think that you configured the wrong section of retrogame.c. You need to configure the area under ioStandard (unless you have a piTFT monitor). According to that, you have the joystick configured correctly, but the buttons are configured to gpio that aren't being used.

    -The reason that that particular config told you that calibration is not needed is because you are using the gpio, which is essentially the equivalent of pressing keys on your keyboard, so there is no calibration needed.

    -That's actually not the controller config that I was trying to get you to run (although you should be able to do it from there as well). That is actually the advmame controller config, not piplay. When you first run piplay (before you select any emulator), press the tab key to open up the popup menu and then at the bottom you can select 'controller config'. Then you can select which emulator that you want to configure.

    Don't give up hope! We'll get 'er working!
  • I'm running version 0.7.10

    I will retry the configuration after my new orders come in since I bricked my two Pi's.

    I greatly appreciate your assistance with this issue.
  • After all the weird issues I've been running into I decided to start from scratch. I downloaded 0.7.10 and put that image on another card. I grabbed a Model B and went to the piplay menu you mentioned, and when I pressed the tab key the screen briefly flashes white and stays on the main menu screen. I was having this issue with the B+ and that is why I started over. I figured something must be corrupt. I was wrong since I'm having the same issue with the fresh image on another card, and model B as well.

  • version .7.10 is VERY old. you need to grab version .8beta3 or newer. Otherwise you have to configure EVERYTHING manually
  • Bender i had this same issue when wiring my arcade controls and found the main pimame menu flashes white when you press (Left) or (Right) keys or if your arcade controls are mapped to these buttons the same thing will occur.
  • OK so i'm back at trying to get over this brick wall of my gpio inputs not working. I started fresh with the latest software version, did the updates and upgrade. I'm starting small and just focusing on the four inputs from the joy stick. I used an LED to test all inputs to confirm all connections are making good contact, etc. I setup the Adafruit retrogame stuff and updated the program for the corresponding I/Os of the joystick. After saving my changes I went through the listed procedures, "make retrogame", "sudo nano /etc/udev/rules.d/10-retrogame.rules, etc" I saved the changes and rebooted and ran the program and the joystick still doesn't do anything. I keep reading through the directions over and over and I cannot see where I keep going wrong or why I cannot get the inputs on the gpio to work. I even unplugged the USB keyboard and rebooted. Still no luck.

    The LED test is taking the 3.3V from pin 1 and sending that to the diode and send the other side of the diode to an input coming off the joystick since the joystick is using ground. Each direction of the joystick lights up the LED for the corresponding input.

    On another note, I keep wondering about this part of the instructions, "If you need an extra ground pin (and have extra GPIO pins available that you’re not using for controls), set the key code to GND instead."

    When I look at the program I already see

    #define GND -1
    struct {
    int pin;
    int key;

    Is there some other place I'm supposed to change that?
  • So I finally got some results. All this time I kept changing the gpio pin numbers in the program because when I see this I would change the numbers in the program to match what gpio pin number I put that corresponding input on. Since I had no luck with the Adafruit program, I once again tried other retrogame from Ian57 and I forgot to change the inputs in the program and all of a sudden the joystick works. So I look at the program and see the numbers are set at 2, 3,4,and 17. Puzzled as to why those numbers work and are not the pin numbers I have my inputs on I look over at this again and see those numbers under "Name." Talk about a critical error for a first timer. I'm also surprised nobody else caught this error since I posted a detail of my inputs and a screenshot of the program detailing my errors on my second post on this page. I really hope anyone else having the same problem sees my mistakes and can learn from it quickly since it took me months to catch this, which led me to miss the initial birthday deadline and the revised deadline of Christmas as well.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!