Here’s how to map a N64 controller correctly to Batocera. Since I’ve seen very few posts regarding how to map a USB N64 to Batocera (or just about any emulator OS that uses ES and RetroArch), I’ve thought to dive into the matter firsthand after I had recently finish assembling my Odroid-XU4 N64 Classic Mini.
This primarily for people running standalone N64 cores; Mupen64PLus: Glide64MK2 and Rice. These are emulator Plugins that are running directly off Mupen64, NOT RetroArch. You lose features like the RA menu and can’t use features such as Batocera overlays, shaders, Netplay, RetroAchievements, and other miscellaneous features that are traditionally available to RetroArch. HOWEVER, the upsides to using these emulators is better performance-wise and stability. Parallel and MupenPlus-Next I’ve found to be very lackluster in performance and playability on most N64 titles. MupenPlus-Next I’ve found to have the worst performance on almost most N64 games I’ve tried on it. So the options here are very limited in perspective. And ultimately you end up sacrificing a lot in order to play N64 games.
Do I choose performance over optimization?
What emulator benefits me more as a player, more options to play the game or more singular emulation?
What’s the best emulator to use?
The biggest drawback you lose from using standalone Mupen64 cores is losing the option to map N64 controller inputs to how you want to map it. And it’s much harder to play N64 games when you bought a USB N64 controller SPECIFICALLY to play N64 games and the controls don’t even work right.
To summarize it:
You lose pretty much the option to remap N64 controllers to standalone Mupen64 cores
Batocera inputs are hardwired and you can’t change it to suit the emulator you are using
Even if you map an N64 controller “properly”, navigating EmulationStation is very confusing and perplexing, and STILL not all Button inputs are mapped properly
So the best way to solve this problem? Edit the input.xml file in Mupen’s directory.
Mupen follows the control scheme to an original N64 controller. and this information is stored in a .xml that basically turns Batocera inputs into an input that Mupen registers as the appropriate input to that the button is mapped to (say for example A button on Batocera is registered as A button in Super Mario 64 which in turn, makes Mario jump). Most USB N64 controllers don’t follow this or at least translate well to that. If you ever used USB Joysticks and buttons before than you probably are aware that the buttons are usually keyboard inputs. USB N64 controllers work similarly in that regard, but due to Batocera following the layout of a SNES controller, you probably see why this is a huge deterrent to USB N64 controllers. due to the controllers odd shape and control layout and how it’s generally held to be played. So here, we change the input.xml file so that we can map all the button inputs to a specific layout so Mupen translates these inputs to exactly the layout of a N64 controller.
First, you must find the input.xml in your mupen64 directory.
Userdata/system/configs/mupen64/
(There are 2 files here. mupen64plus.cfg and input.xml. This is what we are looking for)
Open the file and it should look like this:
<inputList>
<input name="AnalogDeadzone" value="0,0" />
<input name="AnalogPeak" value="32768,32768" />
<input name="l3" value="Mempak switch" />
<input name="r3" value="Rumblepak switch" />
<input name="a" value="C Button R" />
<input name="b" value="A Button" />
<input name="x" value="C Button U" />
<input name="y" value="B Button" />
<input name="start" value="Start" />
<input name="select" value="" />
<input name="pageup" value="L Trig" />
<input name="pagedown" value="R Trig" />
<input name="l2" value="Z Trig" />
<input name="r2" value="" />
<input name="up" value="DPad U" />
<input name="down" value="DPad D" />
<input name="right" value="DPad R" />
<input name="left" value="DPad L" />
<input name="joystick1up" value="Y Axis" />
<input name="joystick1down" value="Y Axis" />
<input name="joystick1left" value="X Axis" />
<input name="joystick1right" value="X Axis" />
<input name="joystick2up" value="C Button U" />
<input name="joystick2down" value="C Button D" />
<input name="joystick2left" value="C Button L" />
<input name="joystick2right" value="C Button R" />
</inputList>
By default this is how the Batocera has Mupen64 inputs labeled. It’s moreso catered to more modern 360 and Classic controllers that have more buttons and left and right joysticks. There is no way to change this directly in ES and this is usually the input.xml file that is generated on every install on Batocera. Here we are going to change it to follow this input;
<inputList> <input name="AnalogDeadzone" value="0,0" /> <input name="AnalogPeak" value="32768,32768" /> <input name="l3" value="Mempack switch" /> <input name="r3" value="Rumblepak switch" /> <input name="a" value="C Button D" /> <input name="b" value="A Button" /> <input name="x" value="C Button L" /> <input name="y" value="B Button" /> <input name="start" value="Start" /> <input name="select" value="L Trig" /> <input name="pageup" value="C Button R" /> <input name="pagedown" value="R Trig" /> <input name="l2" value="Z Trig" /> <input name="r2" value="C Button U" /> <input name="up" value="DPad U" /> <input name="down" value="DPad D" /> <input name="right" value="DPad R" /> <input name="left" value="DPad L" /> <input name="joystick1up" value="Y Axis" /> <input name="joystick1down" value="Y Axis" /> <input name="joystick1left" value="X Axis" /> <input name="joystick1right" value="X Axis" /> <input name="joystick2up" value="C Button U" /> <input name="joystick2down" value="C Button D" /> <input name="joystick2left" value="C Button L" /> <input name="joystick2right" value="C Button R" /> </inputList>
You can type this out yourself OR you can copy and paste this into your input.xml file. Once you’ve done that, save it and close out of it. Load into Batocera and go into the Menu and Controller & Bluetooth Settings. Than go to map a controller on Controller Mapping. From there, have your N64 controller plugged in and map the controls specifically to THIS layout:
D Pad Up - D Pad Up
D Pad Down - D Pad Down
D Pad Left - D Pad Left
D Pad Right - D Pad Right
L Stick Left - N64 Joystick Left
L Stick Up - N64 Joystick Up
R Stick Left - blank
R Stick Up - blank
Start - Start
Select - Left Bumper
A (Xbox B, PS Circle) - C Button Down
B (Xbox A, PS X) - A Button
X (Xbox Y, PS Triangle) - C Button Left
Y (Xbox X, PS Square) - B Button
L1 - C Button Right
L2 - Z Trigger
R1 - R Bumper
R2 - C Button Up
L3 - blank
R3 - blank
Hotkey - Left Bumper
After you’ve done that, save it and than test any N64 game. And now all the button inputs should now be working flawlessly. Use the Left Bumper to exit out the game and fast forward. Bonus to all this, you can use the controller for other game systems as well. If I made any mistakes in this post or if this isn’t working for you, let me know please ^^ I hope this helps anyone struggling with this!
EDIT: I made this post after I’ve finally solved this issue. I used this Reddit post as a guide to follow; I am in NO MEANS encouraging to slander this person or harass them. I’m only mentioning them and thanking them for helping me look into this problem prior and writing an input.xml file for N64 games.