I played with two joystick projects aimed at STM32 ARM platform.
https://github.com/pellepl/arcadehid
https://github.com/FreeJoy-Team/FreeJoy
Both are very sophisticated and with small code modifications you can connect virtually everything to your arcade machine. Programmed STM32 board can be connected to RPi as well. Can anyone share some details about his experiences?