I had been reading the Adafruit's guide to add arcade controls to GPIO. But the guide are to the old Raspberry Pi and the guide are only for one joystick with two buttons.
Does any in here knew a newer guide for 40-pins GPIO to add two joysticks with example 4 or 6 buttons each, a coins button and a 1p/2p button? And if possible with a esc-button and a coin acceptor.
@KFJ1972 - It's still the same thing, you just have extra pins to use. You need to edit the retrogame.c file (near the top is an array of pins an corresponding keystrokes to send when those pins get activated) You can connect as many joysticks and buttons as you want, then just map them accordingly. I have 2 joysticks, 10 buttons. Use this image as a reference for your gpio (this is good for a+,b+,pi2)
That means that there are no changes to the source since the last build (which is included) 'make' is the same thing as 'make all', or basically build everything. Since there is only one file to build in this case, it is the same as if you had typed 'make retrogame'
you can test it with sudo ./retrogame, then press your buttons and see if you get any output (press ctrl+c to quit)
check to make sure that your buttons are wired correctly, then make sure that the correct pins are mapped in your retrogame.c file (and that you have run 'make' if you made any changes to retrogame.c)
When use the Ipac-2 my joystick, firebutton 3 and 1p-start works.
But firebutton 1, 2 and 4 and coin doesn't work :-( I test all with connect the Ipac-2 to my PC and use some Ultimarc software. Seems like I have to remap some keys in PiPLAY. Any know where and how I do that?
Yes, the joystick, firebutton 3 and 1p-start works both in the piplay menu and in the emulators.
Firebutton 1, 2 and 4 doesn't work anywhere, only if doubble check it in windows with the Ultimarc software. It's like piplay can't find lcrtrl, lshift and so on. Button 3 works because it's SPACE and not left something.
ahh. that's probably your problem. so, first off, you can reconfigure your ipac to send different keystrokes. You use the winipac config tool. (instructions here)
What emulators are you trying to use? There may be an error in the formatter (each emulator requires slightly different semantics for left/right formatting)
If you use that winipac tool, then it reprograms your ipac to send different keyboard strokes. After that, you just need to press 'tab' and reconfigure the emulators.