Arcade joystick and a few buttons - where to start.
  • Hi - I purchased a kit a little over a year ago and am struggling on the approach to connecting the controllers to the breadboard. My goal is to play some popular 1980's arcade games (galaga, frogger, pacman, etc). I have installed Raspbian Wheezy kernel 3.18 (May 2015) along with the mame4all emulator. A few games are starting up, so I'll look to iron out my final list once everything is set. I'm now working on connecting the controls (basic joystick and four buttons). I believe the right approach is to solder the wires to the controller, and then to insert the jumpers into the breadboard. Sounds easy enough....

    My main question is how do I know what number, on the breadboard, to put each wire into?
    Do I need any additional software to configure the controllers? Or just use the Tab menu options for each game?

    I saw one post about a kernel module for RetroPie, but I'm not using that. Unless I should be?

    Any help / advice would be appreciated.


    Raspberry Pi B+ v1.2
    Generic Classic Arcade Joystick Red Ball Design by ParadiseArcadeShop
    Player 1 start pushbutton with horizontal microswitch
    Three generic buttons with horizontal microswitches from Ablackhorse


    Thanks so much

    Mike


  • are you doing your controls directly to the raspberry pi? or are they being connected to a micro-controller? (a micro-controller usually means that you will connect to your pi via usb.) Either way is fine.
  • Hi - I neglected to put the link to the images before, hopefully it will help. My plan was to use the breadboard and connect them directly to there, no micro-controller. I'm completely open to suggestions though if there is a better way.

    http://s2.photobucket.com/user/buns1525/library/RaspberryPi

    Thank you so much for taking the time to answer my post.

    Mike
  • ok, gotcha. so you are essentially going straight to the gpio (even though you are going through a breadboard to do it.) You basically have two options. You can use the adafruit retrogame utility or you can use my GPIOneer utility.

    Basically what they both do is watch the GPIO for any change, then they will output a keyboard keystroke. The main difference between the two is that GPIOneer has a config utility, whereas Retrogame requires you to manually edit the retrogame.c file.

    There are 2 different numbering schemes for the GPIO. BCM numbering (also known as GPIO numbers), and BOARD numbering (also known as pin numbers). GPIOneer uses BOARD numbers, Retrogame uses BCM numbers. Here's a diagram that lists both types of numbering for all types of raspberry pi's:

    PINOUT

    You are going to connect 1 side of each button to 1 NON-GROUND pin each. Then the other side of the buttons can all go to the same GROUND pin (or separate ground pins, it makes no difference). Just make sure that you don't use either the 5v or 3v pins.
  • Thats perfect. I'll be trying the GPIOneer utility today (just sounds like the better, easier choice).

    I think my final question, before hooking it all up, is that the joystick has 8 terminals. 4 are obviously for the directional, and 4 are for the grounds. Is it safe to have the 4 grounds come together in either a twist or butt connector and then they all go to a single ground input in the breadboard.

    Again, thanks so much for your time that you dedicate to this site and to help so many people. Very much appreciated.

    Mike
  • yes, it's perfectly alright. If you look at your breadboard, the two columns on the far left and the two on the far right are 'rails'. you can connect one or two of those rails to your raspberry pi ground pin(s) and then connect all grounds to those rails. it would be perfectly acceptable.
  • Ok - I'm getting a bit closer. I've attached the Raspberry Pi to the breadboard via the ribbon cable. I've connected the wires (colors are not the best but have everything noted for what is what) to the controllers. I then put the pins in the breadboard.

    I've installed the GPioneer utility, but once I run the configuration and pushed up on the joystick, my screen goes blue and the Raspberry Pi reboots. I initially thought that I may have mistakenly put a button in the 3.3v pin (22 on the breadboard), so I move it out of there, but unfortunately, the same thing happened once I ran the utility and pushed up on the joystick.

    Based on the images below, can you see if I'm putting the pins in the wrong spots? Or maybe I've wired the joystick incorrectly? Thank you in advance.


    Controls: http://s2.photobucket.com/user/buns1525/media/RaspberryPi/controls.jpg.html

    Breadboard: http://s2.photobucket.com/user/buns1525/media/RaspberryPi/breadboard.jpg.html
  • ok, so you have everything connected to the 3v line. The two columns on either side of the breadboard are for your 3v and 5v lines. You need to move everything to the pin ROWS. it looks like you have 3 open holes per pin (you really only need 1). Here's a picture of what I mean, the green sections are your pins, the red and blue sections are your voltage rails. https://imgur.com/oazTpt6

    and here's a magestic unicorn
  • That is pretty magestic. And wow was I off on my understanding of the breadboard. Much clearer now. Thank you, and I'll report back with hopefully some success.
  • Thanks so much for all of your help. The wires are now all inside (not on the rails), I was able to configure the buttons with the GPioneer utility (realized I'll need more than 4 buttons) and started up and played a few games successfully. The GPioneer utilites web front end is very nice for making changes after the fact too.

    One bit of advice for you though - I think you should reply with the magestic unicorn much sooner. It really seemed to do the trick :)

    Thanks again for all of your help.

    Mike
  • haha, thanks for the advice. I'll keep it in mind.

    Glad you got it working!

Howdy, Stranger!

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