just fyi, I think I figured out how to set up the Bluetooth controller properly from the start so that it defaults to p1, granted I am using an nes30 pro so if there are firmware/hardware differences with the ps3 controller this may not work but its worth a try.
install a clean image
boot for the first time. plug the controller in with a wired connection to PORT 4 (bottom right USB)
***DO NOT plug in a keyboard
emulationstation should detect one gamepad. go ahead and configure it first (yes it is still wired in)
next go to Bluetooth settings and register it
4.a while wired in, select the register option
4.b unplug the controllers wired connection from the controller side (not necessarily from the USB side)
4.c make the controller discoverable
4.d rpi should find the device
4.e plug the controller back in and complete the registration process (set udev rules, boot options, etc.)
quit and go back to emulationstation (controller still wired)
press start, navigate to configure input and select it - the screen should say that it is detecting TWO controllers
UNPLUG CONTROLLER. now press a button for emulationstation to recognize the controller in Bluetooth mode. configure it!
unplug the USB side and reboot the rpi
reboot your controller and you should be connected in Bluetooth to port0/P1.
at this point you should be able to connect a keyboard as well but USE PORT 4. I also don't bother with configuring it as an emulationstation controller... I ONLY use it to do the typing required in the back end or when searching for roms with the scraper.
the advantage of this method is that your controller shortcuts and all p1 functionality is retained EVEN IN THE MUPEN64 emulator! Using the joypad_index remapping method above works find for libretro cores but I found that playing hires n64 games I didn't have any shortcuts or even an exit for mupen64. With this method you should be good to go.
one other note: if you connect your controller to other devices like me (I travel, so I connect my nes30 pro to my laptop quite a bit) when you reconnect it to your pi, I've found that it is easiest to simply remove the device, then re-register it. you don't need to recreate the udev rule or set boot options... you just remove the device then add it back and you're good to go.
lastly, I've tested pretty successfully with adding other controllers as P2 and it works flawlessly once you get your p1 Bluetooth controller set up.
hope this helps!