If you are up for it grab the code above. Put the 4-play in single player mode, and flash it.
It maybe wise to try all the below without the code above and then with. That will tell me more.
Things to tryhttp://boat.lachsfeld.at/ffjoystick4java/
Does this work on the pi? Do the controls respond.
Does dolphin run on the pi? If so does it show a 4-play, any input?
Run jstest (you may need to sudo apt get joystick ) first
see if joysticks response when moving them
Press Ctrl-C to exit.
Are there any j files in /dev/input/
If they are working but not in the emu try this
./retroarch-joyconfig -o ~/.retroarch.cfg
./retroarch-joyconfig -o /.retroarch.cfg
See if that helped.