Use an Arduino Leonardo or Pro Micro (or similar) to emulate an Ultimarc I-PAC/J-PAC (https://www.ultimarc.com/ipac1.html) like keyboard input for connecting arcade controls to a PC/Raspberry Pi/SBC etc. running M.A.M.E.
Note: This is not a complete emulation nor is it programable like the real thing. If you have the money, buy the real thing. If you want to tinker and have a spare suitable Arduino device sitting idle, or want the cheapest solution possible, then this might work for you.