I hope we might be able to use this pine64 for hyperspin possibly
I know its a bit of an older thread but I have been playing around with Mame on the pine. I have the 2gb model and have been able to compile the latest version on ubuntu Linux. The problem though is the lack of display drivers. Everything seems to compile fine. When I'm next infront of my computer I'll post some links.
I am an amusement tech and I have also built a large number of Mame and multi game packs.
Most Mame systems have a key combo to add credits to the games. An example of this is p1 start and p1 button 1 to add credits to the game. This is usually done using hardware like a j-pac and Mame config files can support these combos directly without the need for the hardware. Also using Mame with a coin mech may go against some laws and stuff from the open and closed sourced parts of Mame. Best to set up only for use at home and no abilities for the system to be used for a profit.
As for getting the gpio ports to work in Mame. You can use a python script to convert the gpio ports to key mappings or joystick mappings. Problem with this is going to be latency as well as it will use up system resources that you want to keep for running Mame. Your better off using a j-pac or jvs converter if your modding an original system. Otherwise a basic keyboard or joystick encoder will work. I have seen a few cheap ones out there advitised for the rasbpi using retro pi. Nothing saying you cant mod one of these up to go to a jamma biscuit.