24 Replies Latest reply on Jun 25, 2017 2:49 AM by omniearth

    How to Interface Arcade Controls with the Raspberry Pi

      Hi guys! As you know, we're putting together a Raspberry Pi-powered arcade machine, so we can live firmly in the past (where all the good stuff happened) and revel in the joys of retro video games!


      Among the various challenges we're faced with in adapting our new cabinet is interfacing the controls with a Raspberry Pi, so I thought I'd ask for a few suggestions from the people in the know (that's you).


      Joysticks & Buttons

      In principle this is a very simple task, because the arcade controls are just micro-switches. They could go straight onto the GPIO pins, with a bit of cunning software running on the Pi to turn the inputs in HID keyboard presses. The emulator recognises these straight out of the box, making it a very neat and efficient way to interface the controls.


      However, the problems arise from there not being enough GPIO inputs for the number of controls we need. So what can we do to either increase the number of inputs, or maybe even go in a totally different direction, such as converting it all to use a USB input of kind? Would love to hear some creative suggestions from you guys on the subject.


      List of Inputs

      Here's a breakdown of the number of inputs we need to get the arcade machine up and running. Each input can just be considered a simple switch -- nothing clever needed with analogue controls or the likes. This is purely on/off digital simplicity. Just a lot of them.


      Input NumberFunction
      1Player One - Left
      2Player One - Right
      3Player One - Up
      4Player One - Down
      5Player One - Button 1
      6Player One - Button 2
      7Player One - Button 3
      8Player One - Button 4
      9Player One - Button 5
      10Player One - Button 6
      11Player One - Start
      12Player Two - Left
      13Player Two - Right
      14Player Two - Up
      15Player Two - Down
      16Player Two - Button 1
      17Player Two - Button 2
      18Player Two - Button 3
      19Player Two - Button 4
      20Player Two - Button 5
      21Player Two - Button 6
      22Player Two - Start
      23Coin/Credit (a single input from the coin mechanism, rather than one for each player)
      24Exit Game (a button to bring players out of the game, and back to the emulator)
      25Select Game (for choosing a game to play from the emulator's list)
      27Spare (just in case)


      Your thoughts on a post card, please!