It took me a while to figure out how to get my 4 wireless xbox 360 controllers configured to work in mame4all-pi, so I hope this helps someone else with the same setup.
1: plug in a USB keyboard, load up pimame and quit to the shell prompt
2: edit .profile and put a # in front of the sudo xboxdrv line
3: edit /etc/rc.local and put the following lines above the e x i t 0 line:
5: if the controllers aren't assigned via their leds, perform the standard handshaking technique for each one with the wireless receiver. Do not proceed until all the controllers are assigned.
6: load up a game in mame4all
7: press the tab key on your keyboard
8: select Input (general)
9: Press enter on 1 Player Start and press the Start button on controller #1 (repeat for 2-4 Player Start and the corresponding controller)
10: Press enter on Coin 1 and press the Guide button on controller #1 (repeat for Coin 2-4 and the corresponding controller)
11: Press enter on UI Cancel and press Esc on the keyboard, press enter again on it and press the back button on controller #1 (repeat for controllers 2-4 if you want them to be able to quit the game)
12: Press escape twice to quit back to the game
Now all your controllers should work!
I modified my profile to load directly into mame4all, but it would be great if anyone has suggestions for how to improve this so it will work for all the pimame emulators.
Just thought it was a nice write up I could chime in on the wired side. Also you can Mix and match with --WID0 and --ID1 or whatever you want your setup.
This works really well, but you lose control of the PiMAME menus with the controller. Do you know how to go about fixing that issue?
Also for some reason MAME4ALL keeps losing my controller configs but I think thats more of a permissions issue.
Edit: The MAME4All issue was indeed permission based, just have to set the permissions for the default.cfg (and probably all the specific game.cfgs) to be able to write to it.