How to configure multiple xbox 360 wireless controllers for mame4all-pi
  • 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:

    xboxdrv --detach-kernel-driver --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent &
    sleep 1
    xboxdrv --detach-kernel-driver --trigger-as-button --wid 1 --led 3 --deadzone 4000 --silent &
    sleep 1
    xboxdrv --detach-kernel-driver --trigger-as-button --wid 2 --led 4 --deadzone 4000 --silent &
    sleep 1
    xboxdrv --detach-kernel-driver --trigger-as-button --wid 3 --led 5 --deadzone 4000 --silent &


    4: turn on all the controllers and reboot the pi

    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.

  • Great write out. Also for anyone who cares if your wired all you have to do is change the device ID buy --id0 ie:

    xboxdrv --detach-kernel-driver --trigger-as-button --id 0 --led 2 --deadzone 4000 --silent &

    JUST DELETE THE "W" in "--WIDx"

    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.

    Thank You,
    nmccarthy84
  • 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.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!