I essence, I used Adafruit's retrogame for all 'native' GPIOs on the PI. For the rest of the inputs, I used an MCP23017 chip, and I wrote a module similar to retrogame that can read its inputs and transform that to key presses.
This is really interesting! Great work GGuyZ! I'm curious to know how much support for 2 players via joysticks is available with PiMAME right out of the box, as i've just recently ordered the parts (buttons and joysticks).
@bjo88 - Aesthetically speaking, I didn't want to have too many buttons, so I'm using free to play mode. You can easily add mappings for the coin1/2 buttons, just add two additional lines and assign them to two of the free GPIOs on the MCP23017.
KingScooty - AFAIK, there isn't one currently out of the box. You can use my code and just change the mappings, but you will also need to get an MCP23017, as the RPi doesn't have enough GPIOs for 2 players equipped with 6 buttons each. If you can settle for less, you can forgo the extra chip.
@GGuyZ sorry.. one more question.. for the MCP23017 IO pins, is it correct assumption, just like Adafruit GPIO setup, that I just need to pull down to GND for the joystick/button switch? Do I need additional external resistor to pull up when switch is open? Tks.
I cannot seem to get piarcade to work. My programming knowledge is minimal so I would appreciate if you could dumb this down. I assume the address for the 12c chip in the program is 0x20. I also realize that I need wiringpi installed and i2c enabled.. program installs fine but none of the keys work.. what am I missing?