Basically everything else I’ve tried to do with Batocera has been pleasantly plug-n-play, but getting a real GameCube controller to work correctly has been a hassle. My intent is to build a Batocera box into an actual GameCube chassis so I really wanted to get this part right. All this information is already out there, but it’s buried in lengthy forum posts or the Discord. This is an attempt to get it all in one place, start to finish.
You need the Mayflash Adapter
The old Wii U adapter only works with a Wii U or a Switch, that is, it doesn’t do XInput translation. This is the one you need to use it with Batocera.
Accept no substitutes if you want the analog triggers working
The PowerA GameCube Style controller is just that: a GameCube style controller. Same goes for the Hori and PDP controllers. Don’t get me wrong, these controllers are not without merit: since they are really Switch controllers Batocera has direct support for them, and they have an extra Z button as well as the Switch meta buttons which are useful for hotkeys. But, they don’t have real analog triggers. If you want analog triggers—or if you just want something closer to an authentic GameCube experience—you need a real GameCube controller.
Mapping it in Batocera
How you map the controller in Batocera doesn’t actually matter too much because we’re going to override the mapping in Dolphin anyway. However, the way you map the controller in Batocera does determine how the controller will behave in the Batocera menus, or in other emulators.
You have two options here: map the controller spatially or map it by letter. If you map it spatially, you’re mapping it based on the position of the buttons rather than the letters of the buttons. Specifically, this mapping is:
- GameCube X to Batocera A
- GameCube A to Batocera B
- GameCube B to Batocera X
- GameCube Y to Batocera Y
This will work more-or-less correctly in other emulators, but the back button in Batocera will strangely be the “X” button of the GameCube controller, not the “B” button which is what feels natural on the GameCube controller.
On the other hand if you map it by letter, it will work “correctly” in the Batocera menus, but it’s going to be real out of whack if you ever try to use the GameCube controller in some other emulator. Personally, I’d rather have it work “right” in the Batocera menu and I have an 8bitDo SN30+ for other emulators, so I mapped it by letter.
There’s one last caveat if you want to map by letter: you need to map A to B and B to A because, by default, Batocera uses “Xbox-style” button mappings. Unless, of course, you have A/B flipped in Batocera, in which case the GameCube controller is already correct.
As for the Z button, the best approach is to leave L1 blank, map Z to R1, and then map the triggers to L2 and R2.
The Hotkey button: D-pad left
The GameCube controller has no select button, nor does it have R3/L3, so at first glance there aren’t any free buttons! The saving grace here is that Dolphin doesn’t support rewind so D-pad left is the one and only button on the controller that wouldn’t overload the hotkey toggle with a hotkey button. D-pad left it is, then.
Overriding the Batocera mapping with a Dolphin profile
This is the real trick. If you don’t do this, the triggers will be treated as digital inputs and the full trigger click won’t register at all.
Connect a keyboard and mouse to your Batocera box and hit F1 when you’re on the system browser. This will drop you into the file browser. Go to Applications (on the left) and launch Dolphin. Click “Controllers” in the Dolphin UI. Click the “Configure” button in the top right of controller settings. Configure your GameCube controller. This part is easy: we’re mapping a GameCube controller to a GameCube controller so everything lines up one-to-one.
This is the important part: give the profile a name in the top right, hit “Save,” and make a note of that name. We’re gonna need it in just a second. I used “RealGC,” you can use that too if that makes this easier to follow along. It doesn’t really matter.
Close the controller mapping window and the controller settings window. Now we’re back at the main Dolphin screen. Double-click anywhere in the big white window to open a file browser. Go up one level to userdata and then back down into roms, then gamecube. Hit “Choose.”
This will load all your GameCube ROM files into the main Dolphin window. You can actually launch any of the games from here and the controller will work fine, but that’s not why we use Batocera! Batocera loads your EmulationStation controller mapping into each emulator when you launch a game. Normally, this is good. This means you don’t have to define every controller for every emulator, which would be super tedious. But for GameCube, this is bad: EmulationStation has no concept of analog triggers and so they just plain don’t work. We need to override what EmulationStation tries to import with the correct mapping you made in Dolphin, which thankfully, Dolphin lets us do for any given game pretty easily.
Right-click on a game a click “Properties.” On the second set of tabs in the properties window, go to “Editor.” Down in the “User Config” section, enter this:
PadType0 = 6
PadProfile1 = RealGC
If you named your profile something else, use that instead of “RealGC” after “PadProfile1”. If you have multiple GameCube controllers, repeat lines 2 and 3 for additional PadProfile assignments:
PadType0 = 6
PadProfile1 = RealGC
PadType1 = 6
PadProfile2 = RealGC
PadType2 = 6
PadProfile3 = RealGC
PadType3 = 6
PadProfile4 = RealGC
That’s it! This game will now use real GameCube controllers. To test it, close game properties, close Dolphin from the File menu, and close the File browser from the File menu to get back to Batocera. Launch the game you assigned the controller profile to.
UPDATE: Batocera 31 (in beta as I write this) now has a “Use Pad Profiles” option under “Advanced System Options” for GameCube, so you don’t need to map the profile to games individually, you just need to define the profile.
Doing it for other games
So you may have noticed there’s one glaring problem with this approach: it’s per game. If you try different GameCube game, it will still be using the broken Batocera mapping. This is because Dolphin’s defaults are being overridden by Batocera’s mapping, and we’re overriding it back with this workaround. I don’t have an easy answer for this, but I do have a tip which might help.
If you’re like me you have your Batocera box hooked up to your TV in front of your couch, making extended keyboard/mouse use less than ideal. It may be easier for you to generate all these GameINI files in Dolphin on your computer and then just transfer them over to Batocera. In that case, Batocera stores Dolphin GameINI files here:
On your computer, Dolphin is storing GameINI files in your Documents folder, so fire up your SCP app of choice and sync these directories.
The seemingly-random filenames are Dolphin Game IDs. Someone who is better at Python than I am could find a way to script this, the hardest part would probably be scraping the Game IDs from somewhere. I decided it would be faster to just do it on my computer manually and sync them.
Bonus tip: install a dark theme in Dolphin
As of right now (Batocera 30), when you quit a GameCube game you get a flash of the blindingly bright main Dolphin UI. Install a dark theme to spare your retinas.
I use Kuroi. Download it, extract it, and put “Kuroi (Dark) by Ani.qss” here:
Then, launch Dolphin directly (from the Files app), and go to Options -> Config -> Interface. Check on “Use Custom User Style” and then open the “User Style” dropdown that appears and select Kuroi.