Build Your Own Arcade Controls Forum
Main => Raspberry Pi & Dev Board => Topic started by: EightBySix on April 01, 2015, 05:55:19 am
-
Wanted to start a thread around this. It's attractive to me because it's one less component (the keyboard encoder). I also have a simple setup of two players, 2 buttons. If you have lots, then you'll run out of pins.
I got it working for player 1 (still to do player 2, coin sensor and a few admin buttons) using retropie - a program to monitor the pins, and initiate key presses - with these instructions (https://learn.adafruit.com/retro-gaming-with-raspberry-pi/buttons) from adafruit.
Note that some of the links are updated for the RPi2. It seems to work fine with Emulation Station.
The tricky bit for me was the physical connection from the controls to the GPIO header. The available pins aren't all together, so I connected the control wires individually after crimping these on the end.
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=326941;image)
The way I did it is flexible (I knew I wouldn't get them right 1st time) but I think a better approach would be to get or make a GPIO breakout cable with some screw terminals like this.
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=136713.0;attach=326943;image)
Might actually be better to make one, so I can put meaningful labels on it from the controls.
-
Interesting. How many inputs are available? Enough for two player?
-
Pi with the 26 pin header has 15 i/o ports. Can be programmed as either input or output.
-
Pi with the 26 pin header has 15 i/o ports. Can be programmed as either input or output.
Not enough for most two player games.
I guess games that have both players using same controls would be ok (IE: Pacman, Donkey Kong, etc). But two player fighter games not so much.
-
Doesn't the new RPI 2 have a 40 pin header?
That should equally a few more inputs.
Maybe enough for neo Geo?
Now I gotta research this.
-
Doesn't the new RPI 2 have a 40 pin header?
That should equally a few more inputs.
Maybe enough for neo Geo?
Now I gotta research this.
Marketing can be deceiving because not all 40 GPIO pins are I/O pins. I forgot the actual number.
-
Doesn't the new RPI 2 have a 40 pin header?
That should equally a few more inputs.
Maybe enough for neo Geo?
Now I gotta research this.
Marketing can be deceiving because not all 40 GPIO pins are I/O pins. I forgot the actual number.
It should be half.
if they followed the same scheme as the original.
so 20.
which should be enough for two joysticks with 6 buttons each.
admin/coin/start buttons would have to be handled by USB which isn't too bad an option.
I'm just not sure exactly which fighter games would work on a RPI or an RPI2.
i've read recently that some people have Final Burn Alpha Libretro Playing street fighter 3 smoothly on the RPI2 but I haven't tested this myself.
-
There are 15 pins available, plus 4 extra if you are happy to solder a header on = 19.
So for my setup:
4 directions, and 2 buttons = 6
x 2 players = 12
Plus p1 and p2 start and coin leaves room for 4 admin type buttons
-
There are 15 pins available, plus 4 extra if you are happy to solder a header on = 19.
So for my setup:
4 directions, and 2 buttons = 6
x 2 players = 12
Plus p1 and p2 start and coin leaves room for 4 admin type buttons
ok.
So the classics.
-
I did exactly this....
So I ended up making my own connections, but with the pins on the Pi end pre bought.
I had a 20cm cable length with one of those little pin connectors on each side.
I chopped the end off, and reused it. The other end, I crimped myself with spade connectors of various sizes and then simply spliced/soldered them together and put a bit of insulating tape around it
Note, soldering is important, because they would just not hold themselves with tape alone
worked well for me :)
If I were to do it again, id definitely go for either crimping both ends myself, or a breakout board like you suggest. It would just be cleaner, and easier to trace the cabling once its all in there
I have joystick, 6 player buttons and 3 more for start/credit/select/exit, so the wiring got a bit tiresome at times!
-
(https://raw.githubusercontent.com/DigitalLumberjack/mk_arcade_joystick_rpi/master/wiki/images/mk_joystick_arcade_GPIOsb+.png)
This is the pinout I used in a RPi 2 using DigitalLumberjacks driver. It allows 2 joysticks, and 8 buttons per player. Works fine with Retropie
-
Then I guess I was right.
didn't think it made sense to have a 40 pin GPIO but not increase the actual number of usable GPIO's incrementally.
-
Adafruit has also an gpio to usb-keyboard driver:
https://github.com/adafruit/Adafruit-Retrogame (https://github.com/adafruit/Adafruit-Retrogame)
-
I use an iPac with my Pi bar top and it's worked great. Very simple.
-
I also use Ultimarc iPac4 with raspberry-pi 2 and it works great (just plug and play, will be recognized as a keyboard, no special drivers necessary).
Another approach would be a simple custom pcb with shiftregisters:
http://www.instructables.com/id/Using-a-shift-register-with-Raspberry-Pi/?lang=de (http://www.instructables.com/id/Using-a-shift-register-with-Raspberry-Pi/?lang=de)
Regards
Stefan
-
Some YouTube Tutorial about using shiftregisters to expand number of input ios:
https://youtu.be/nXl4fb_LbcI
-
I use a KADE mysef programmed as a keyboard encoder. Not had any problems.
-
Pi 2 has recognized everything I've thrown at it thus far.
-
(https://raw.githubusercontent.com/DigitalLumberjack/mk_arcade_joystick_rpi/master/wiki/images/mk_joystick_arcade_GPIOsb+.png)
This is the pinout I used in a RPi 2 using DigitalLumberjacks driver. It allows 2 joysticks, and 8 buttons per player. Works fine with Retropie
Anyone have a pinout pic like this one, but for the RPi B? 26 pins
-
I'll be using this guide for my rpi1
https://learn.adafruit.com/retro-gaming-with-raspberry-pi/buttons
-
I'll be using this guide for my rpi1
https://learn.adafruit.com/retro-gaming-with-raspberry-pi/buttons
Thanks!
So from what I understand, we could use GPIO 24 & 8 for ESC and Player 1 Start?
I have a small (2.8") touchscreen that I plan to plug into this connector too. How would using these pins as inputs affect the screen?
-
...
I have a small (2.8") touchscreen that I plan to plug into this connector too. How would using these pins as inputs affect the screen?
well, assumed thats the same 2.8 touch tft like the following
http://www.adafruit.com/products/1601 (http://www.adafruit.com/products/1601)
...then:
...Uses the hardware SPI pins (SCK, MOSI, MISO, CE0, CE1) as well as GPIO #25 and #24. All other GPIO are unused. Since we had a tiny bit of space, there's 4 spots for optional slim tactile switches wired to four GPIOs, that you can use if you want to make a basic user interface. For example, you can use one as a power on/off button. See below for the link to get the optional tact switches, they're not included...