Configure Keyboard For Dolphin Emulator

Your eyes are not deceiving you, MotionPlus emulation is finally here. In a dramatic return to the project after a long hiatus, Billiard returned to the project with the goal of cleaning up emulated Wii Remotes and implementing emulated MotionPlus correctly once and for all. These efforts have greatly improved Dolphin's ability to create motions that games can recognize without the need for real Wii Remotes. The key behind these improvements was thinking about motions differently, by treating an emulated Wii Remote as a virtual object acting out these motions, Dolphin now handles a lot of the extraneous motions that swinging, tilting, and pointing a Wii Remote does that aren't immediately obvious. Mix that with reverse engineering efforts and cracking the MotionPlus's extra encryption and you can finally configure and play your favorite MotionPlus games with ease.

Download: Forum: http://www.shootersforever.com/forumsmessageboards/viewtopic.php?t=7554. To open and manage the controller settings for Dolphin, from the Dolphin's main window, navigate to Options - Controller Settings, or simply click the 'Controllers' button. The main controller configuration window will appear, as seen in the screenshot below. In the Gamecube Controllers config area, you can configure or disable the emulated.

Nintendo's Motion Controlled Phenomenon

The Wii console isn't defined by graphics, it isn't defined by a powerful processor, impressive online, or anything like that. The Wii will be remembered for its innovative controller: the Wii Remote. When it arrived onto the scene with Wii Sports as a pack-in title, the Nintendo Wii reached audiences with its simple motion controls that anyone could wield. Along with a launch title for the hardcore crowd, The Legend of Zelda: Twilight Princess, the Wii set off at a torrid pace.

Unfortunately, many third party developers struggled to match the excellent motion controls featured in Wii Sports and Wii Play. It may be hard to believe, but the Wii Remote can't actually track its position through 3D space. Packing only an infrared camera and an accelerometer, the Wii Remote was only able to read translational motion. The Wii Remote had no way to sense rotation!

Without a gyroscope, the Wii Remote could only detect half the possible axis of movement. Yet even with this limitation, Nintendo developers used every trick in the book to get what they could to read motions in these games. For example, New Super Mario Bros. Wii can read tilt through detecting the force of gravity to figure out its orientation. Metroid Prime 3 used the position and distance between the two infrared lights of the sensor bar to enable complex twisting and pulling actions. Throughout the library of early Wii games there are tons of small examples like this littered about with developers pushing the limits of the Wii remote. However, even with all of these clever work arounds, actions like swinging a sword in Twilight Princess never felt like much more than hitting a button.

The Birth of Modern Motion Controls

Developers at Nintendo knew that if they were ever going to be able to deliver on the promise that the Wii Remote showed in its early days, that another leap in technology was needed. Behind the scenes, they began development on a new Zelda title upon the completion of Twilight Princess. With the lackluster Motion controls being one of the chief complaints, it seemed as though developers wanted to address that problem in a big way. Unfortunately, the standard Wii Remote wasn't capable of much more.. yet. At E3 in 2008, that all changed with the announcement of the Wii MotionPlus adapter. This adapter featured a 3-axis gyroscope (gyro) that finally allowed the controller to measure rotational motion in addition to the translational motion from the existing accelerometers. With full six degrees of freedom, the MotionPlus allowed Wii Remotes to perform full 3D tracking just like VR controllers do today!

Just a year later, Nintendo announced their newest edition to the Zelda series, The Legend of Zelda: Skyward Sword as a MotionPlus exclusive. For non-Nintendo developers, the announcement of the MotionPlus and MotionPlus games were not such a thrilling time. Many developers were blindsided by the announcement and didn't have time to add support.

Regardless of third party sentiments, the Wii MotionPlus adapter laid the groundwork for modern motion controls on Nintendo consoles. While MotionPlus had a lot of sensor limitations that will be touched on later, it still represented a huge leap in motion tracking over the base Wii Remote. The MotionPlus's launch title Wii Sports Resort improved upon the original in just about every single way when it came to controls. The minigames could read more subtle movements, more complex movements, and had a greater degree of control versus the simple games present in the first game. For people that loved Wii Sports, Resort was a must own title.

Skyward Sword on the other hand, was delayed several times and didn't release until 2011. And even after its release, it was met with a rather lukewarm response. While there are plenty of arguments that can be had about game design and whether or not being designed around motion controls hurt it or helped it, there is something that must be said. Skyward Swordis a technical achievement on early motion controllers. In order to get the level of motion recognition that they did, developers had to take advantage of every single trick they could and silently recalibrate the Wii Remote since you were expected to be swinging it a lot!

And this brings out one of the problems to emulating Skyward Sword. It's indelibly tied to MotionPlus technology. This isn't a game where we can sneak shake onto a button and savor the experience, Dolphin needed to be able to create complex motions and report the correct data in order for a game like this to be playable. Any MotionPlus implementation that didn't allow for playing the crowned jewel of the MotionPlus library would be a huge disappointment.

Ghosts of the Past

With a mainline Zelda title gated behind MotionPlus, emulating the feature was something wanted by both users and developers. So how exactly did Dolphin end up making it all the way to 2019 with no MotionPlus emulation whatsoever? There's actually a myriad of reasons that have shaped how things have developed. The most important thing to note is that there have been attempts at MotionPlus at the past and a lot of development time has been spent over the years trying to tackle it. In fact, there's an old fork that has let users play MotionPlus titles since the Dolphin 3.0 days! Unfortunately, anyone who wondered why it was never merged into master would very quickly see why after they actually tried to use it. It was a user interface nightmare that required extremely careful configuration, constant profile swapping, and maticulous retooling of motions to even get past the menus in a game like Skyward Sword. Imagine being greeted by this every time you needed to configure or adjust controls.

Thankfully, Dolphin could bypass the need for emulated MotionPlus because users could connect Real Wii Remotes over bluetooth. Until emulated MotionPlus was truly in a place where a majority of developers we happy, users could still play the game with real controllers! Unfortunately, MotionPlus emulation stalled and this became the only way to play these games. In fact, the addition of Bluetooth Passthrough became a way to play MotionPlus titles in Dolphin without the limitations put on by Bluetooth drivers. For perfect connection and audio, you could even hook up a real Wii Bluetooth adapter to your computer!.

This seemed like a happy enough solution, especially considering just how integral motion controls were in games like Skyward Sword and Wii Sports Resort. That isn't to say there isn't a need for emulated MotionPlus. Not everyone can use motion controls, whether it's due to disability or access to Wii Remotes. We take for granted just how common Wii Remotes still are in many areas thanks to the Wii U also using Wii Remotes as a secondary input device, but their availability isn't guaranteed forever.

So even if MotionPlus emulation can't give the same experience as using real controllers, there are still plenty of people that benefit from having access to the game through an emulated control scheme. It says a lot that some users have been willing to suffer through the flaws of the old fork just to play through some of the MotionPlus exclusive games. In order to get MotionPlus emulation into mainline builds, it would need to be rebuilt from the ground up. The first problem that needed to be solved was the fact that the MotionPlus adapter couldn't consistently connect in Dolphin.

Cracking The Code

Billiard has been building up for a run at MotionPlus emulation for quite some time. Part of this has been making Dolphin smarter with motion emulation in general so that MotionPlus wouldn't be as big of a leap. His efforts, along with those of iwubcode, have improved motion recognition across over 30 titles. While Billiard was able to get MotionPlus somewhat working right away, he had no idea how to solve the problem of getting the attachment recognized 100% of the time.

Why exactly has connecting the MotionPlus adapter been such a pain? Well, it turns out that MotionPlus adapters have an additional cryptographic challenge compared to other accessories. The solution employed by the old fork was to replay data from a successful connection, but this would fail exactly 50% of the time. It turns out there was a second challenge that could be chosen at random after connection was started, meaning that replaying connection data would never consistently work. In order to get MotionPlus adapters connecting consistently, the cryptography needed to be solved. Once the challenge was put out, several developers answered the call.

Long time developer flacs quickly identified that MotionPlus was using the Rabin cryptosystem, which is similar to a typical RSA challenge. The game will first ask the MotionPlus adapter for a random 512 bit number. While normally sending the same number and following through with the connection procedure would work, MotionPlus connections change it up by having two challenges.

The idea of the Rabin cryptosystem is that you can generate a secure connection with just a public key. For some reason, Nintendo decided to use a 512-bit number, which was more than possible to brute force. Perhaps when they were developing the add-on 512-bit seemed safe enough, but, even in 2009 512 bit numbers were already considered possible to crack in RSA crypto challenges.

Several developers, including flacs, degasus, and Billiard came up with a solution and CrystalGamma donated their CPU time toward crunching the actual numbers. Several days later, the important factors that made up the private key were finally cracked.

After factoring was complete, degasus provided a simplified solution that allowed Dolphin to solve the second challenge in a more simplified way based on the result for the first challenge. This value was known as Quadratic Residue sqrt(v). If this sounds complicated, here's a simplified equation showing how sqrt(v) allows us to solve challenge 2 once we have the solution to challenge 1.

Dolphin

While all of these numbers may mean nothing to the average user, what they mean is that Dolphin can successfully pass any encryption challenge when emulating a MotionPlus adapter.

Calibration and Motion

Unlike modern motion controllers, like Nintendo's Joycons, MotionPlus technology used rather imprecise gyroscopes that lose track of the Wii Remote's precise orientation after strenuous motions like swings. MotionPlus titles, such as Wii Sports Resort and Skyward Sword fought this by constantly using the sensor bar to recalibrate the Wii Remote on the fly. In yet another shortcoming of the old MotionPlus fork, it didn't even attempt to understand what the calibration data did and again just fed games recorded data from hardware. As a proof of concept, it saved a lot of time, but to create a perfect emulated environment, Dolphin needed to be able to generate proper calibration data.

Anyone who has played a MotionPlus title will be extremely familiar with these types of screens.

In a bit of good fortune, while developers were analyzing the calibration data, the NSA released a reverse engineering tool called 'Ghidra'. This tool helped Billiard more easily examine the calibration data and see how the games were using it. With Ghidra, it only took a few days to determine what all of the data meant, and give Dolphin the ability to generate perfect calibration data. This is particularly important as users may not have the ability to correct for small imperfections when configuring a Wii Remote to a keyboard or analog stick. As a bonus, it also lets players cheese bowling by just mapping the up and down axis so they can do a perfectly straight throw every time!

Making All Right Move..ments

Now that emulated MotionPlus was calibrated correctly, Dolphin needed to actually make sure the motions it was making made sense. The Wii Remote has a collection of sensors that work together to try and make sure games are able to accurately follow how the Wii Remote is moving. As such, many games will take avantage of multiple sensors in order to handle the same actions. In Rodea: The Sky Soldier, the game will actually check for multiple movements for single actions. If it sees infrared data change in certain ways, it'll assume with the Wii Remote is shaking. As such, even in Dolphin, users playing on mouse and keyboard could get by without needing any extra buttons for handling motion emulation.

While that particular case worked in Dolphin's favor with its flawed motion emulation, there were a lot more cases that actually went the opposite way. Simply feeding a game straight movements into an accelerometer without adjusting other data will cause misread movements or unwanted actions. For example, No More Heroes 2 expects there to be an arcing movement on upward swings and won't react correctly if it just reads the Wii Remote moving upward with no other adjustments.

Dolphin hasn't been very smart with this over the years. It wasn't until fairly recently that it cared at all, when iwubcode started looking into why certain games couldn't read movements from emulated Wii Remotes. Some of them were silly; back in Dolphin 5.0, if you configured a swing up, Dolphin would tell the game the Wii Remote is going straight up. That may sound fine in theory, but a swing involves a lot more than up and down movement. Games that checked for logical motion data would end up breaking because Dolphin wasn't taking into account how an arm would move a Wii Remote.

In order to solve a problem like this and make motions like a real Wii Remote, a creative solution was needed. Some work on this had already begun, iwubcode had already started to improve motions to be more logical for non MotionPlus games. This assisted with Disaster: Day of Crisis and No More Heroes motion woes, but a more extravant solution would need to be done for a game so heavily designed around accurate motion like The Legend of Zelda: Skyward Sword. Simply forcing users to configure a monstrosity of a page with dozens upon dozens of options isn't reasonable, Dolphin needed a way to make things easier.

That's why in the latest development builds you won't see any extra configurations for Wii MotionPlus. Everything is built upon the current configuration system and simply adds gyroscope reporting on top of it. This is possible thanks to Billiard's innovation of actually applying motions to a Virtual Wii Remote! By applying actions like swinging and tilting to a physical object, and having it move realistically within virtual space, we can reflect changes across all motion data without needing the mess of complicated controls present in the older fork.

To show how powerful the Virtual Wii Remote can be, look at a game like Super Mario Galaxy. You can actually do the spin action in this game without configuring any motions except the pointer. This is because the Virtual Wii Remote moves to reflect the changes in infrared data. If you're violently moving the pointer left and right, the virtual Wii Remote will be returning enough accelerometer force for the game to detect a shake! While it's easy enough to configure a shake in Super Mario Galaxy, this kind of behavior becomes essential in The Legend of Zelda: Skyward Sword.

Skyward Sword is designed around the Wii Remote and MotionPlus and uses every bit of data to help accurately and consistently read motions from the player. If a motion doesn't make logical sense to Skyward Sword, it won't work correctly. This is the very behavior that made the old MotionPlus fork so difficult to configure, you couldn't just feed it in a raw movement and expect it to work. An upward swing will affect infrared, accelerometer, and gyro data, and configuring each one individually just isn't workable. The Virtual Wii Remote takes into account the physics of the Wii Remote and allows these complex movements to work and it's accurate enough that we actually used real movements to help debug misread motions toward the end of development.

Waiting For Perfection

After a long wait from the original prototypes that gave users such hope, MotionPlus emulation is finally here. Most games should be playable thanks to all of the careful changes done to Wii Remote emulation in general. Despite all of this, it can't be stressed enough that these MotionPlus games heavily rely on motions for their gameplay.The Legend of Zelda: Skyward Sword and Wii Sports Resort are very different experiences when played on a standard controller or mouse and keyboard. Some parts of the game that were torturous on console can be much easier, and you're much less likely to be suffering from Wii elbow after a play session. On the other hand, some complex motions just don't map well and may require some tweaking if you want to play a particular minigame or get past a challenging motion puzzle.

So while the ability to play these games has been preserved, some of their experience has been lost in translation. But that doesn't mean this will always be the case - many modern controllers actually contain gyroscopes capable of emulating MotionPlus with near 1:1 accuracy! The main problem is that accessing these gyroscopes often takes specialized drivers or other programs running in the background, which has delayed efforts in supporting raw gyroscope input. The current plan is to use OpenXR, which has finally arrived after what seems like an eternity. One particular benefit of OpenXR is that it'll give us an open way of accessing Virtual Reality controllers.. and their extremely accurate built-in motion tracking! Paired up with Dolphin, this could provide a permanent way for users to enjoy these games however they want, without the need for aging, proprietary hardware.

With that, we hope everyone enjoys trying out MotionPlus emulation and we'll be back at the end of the month with the long awaited return of the Progress Reports.

This page explains how to configure controllers in Dolphin, assuming the controller is connected and working with your system. If you need help, or want game-specific configurations, see the forums.

  • 2GameCube Controller
  • 3Wii Remote
    • 3.1Real Wii Remote

Dolphin Controller Configuration

To open and manage the controller settings for Dolphin, from the Dolphin's main window, navigate to Options -> Controller Settings, or simply click the 'Controllers' button. The main controller configuration window will appear, as seen in the screenshot below.


In the Gamecube Controllers config area, you can configure or disable the emulated GameCube controller ports. The emulated GameCube controllers themselves are referred to as 'Standard Controller' in the dropdown menu. The controller order on the PC does not have to equal to GameCube controller port order. They will be handled entirely in the GameCube Controller Configuration window. It is within each port's own 'Configure' button.


In the Wii Controllers config area, you have the option to use real or emulated Wii Remotes, as well as choosing to passthrough a Bluetooth Adapter (see Bluetooth Passthrough) or emulating the Wii's adapter. You can also assign the Wii Remote to connect it as an emulated controller by selecting 'Connect Wii Remotes for Emulated Controllers'. Select 'Real Wii Remote' in the dropdown for a Wii Remote slot to use a real-world Wii Remote connected to your PC via bluetooth for that slot. Dolphin supports up to four Wii Remotes at once, along with any peripherals you have attached to them. Although the Balance Board cannot be emulated, Dolphin allows the use of a real-world Balance Board by selecting 'Real Balance Board'. Enable Speaker Data controls whether the Wii Remote speaker can produce sound. When using a real Wii Remote, the audio will come out of the Wii Remotes' speakers; with emulated Wii Remotes, it will come out of the system speakers. Some games, like Metroid Prime 3, have lag issues when Enable Speaker Data is enabled on some systems.


In the Common config area, you can choose options that would both affect Gamecube and Wii controllers. Background Input lets you use the controller or keyboard even if Dolphin isn't in focus. Alternate Input Sources allows the use of capturing motion data from other hardware inputs into Dolphin. See DSU Client for more details.


After you select what you want to use, check in the section(s) below for additional configuration.

GameCube Controller

Real GameCube Controller (GameCube Adapter)

To use the actual GameCube Controllers using an Official GameCube Controller Adapter for Wii U (and its clones), see How to use the Official GameCube Controller Adapter for Wii U in Dolphin. It does not require any button configuration. That does not apply to the adapters that behave as generic controllers and need to be configured (see below).

Emulated GameCube Controller

After setting any one of the emulated GameCube ports, proceed to the 'Configure' button for each. One left unconfigured will be considered dummy 'plugged in' during the game emulation.

Choose any device that is connected to your PC in the Device dropdown, and set the buttons and axes to your liking.

How To Configure Keyboard For Dolphin Emulator Mac

  • Left click a slot to detect input, then press a button/key or axes on your selected device to save it to that slot.
  • Middle click a slot to clear it of inputs.
  • Right click a slot to show more input options. See Input Syntax for documentation and examples.

If you controller supports it, Rumble will allow your controller to experience the GameCube controller's rumble functionality. Within the rumble configuration window, click on the motor pattern you wish to use (sine, cosine, etc), and press 'Select' to apply it. If you wish to add a second pattern, click another pattern and press '| OR'. Hit 'OK' to accept the changes and exit the window.

Control Stick Calibration limits the radius of the joystick input. This is used to map the dimensions of the input source.

How To Set Up Keyboard For Dolphin Emulator

Always Connected forces the emulated controller to stay connected to the emulated Gamecube.

Office 2016 for mac requirements. Profile allows you to save/load input configs.

After setting up everything that you want, click 'OK' and the changes will save.

NOTE: If the controller is significantly off center in Dolphin but nowhere else, check all controller axis to see if one has a '+-' on it . This is not supposed to happen and is the source of your bug.

Wii Remote

Real Wii Remote

To connect a Wii Remote, press 'Refresh' then press the 1 + 2 buttons on your Wii Remote simultaneously (Sync button for -TR models). Continuous Scanning allows you to connect a Wii Remote without having to open the Wii Remote window and press refresh every time. As long as a game is running or the Wii Remote configuration window is up, just press 1 + 2 or the sync button on your Wii Remote simultaneously and it will connect.

After several minutes of inactivity, Wii titles will attempt to disconnect the Wii Remote. The Wii Remote will remain on and connected to Dolphin, but the game will believe it is disconnected. To 'reconnect' the Wii Remote, go to Tools -> Connect Wii Remotes -> Connect Wii Remote # or use a hotkey corresponding to it (example - the Windows default for Wii Remote 1 is Alt-F5), or simply press a button on the Wii Remote.

Dolphin does not automatically turn off Wii Remotes as the Wii will (except on Linux). Remember to turn off controllers on your own to save battery power, simply by holding the power button on Wii Remote for a second as you would to turn off the Wii. It will also tell Dolphin that it's disconnected instead of stopping the game emulation.

Emulator

Couldn't Connect

Wii Remotes use the Bluetooth interface, make sure your PC supports Bluetooth. Do not pair the Wii Remote to your computer through its native Bluetooth settings. The operating system may interfere with Dolphin's ability to connect with the Wii Remote. In addition, Wii Remote connectivity will only work if one of the Wii Remote slots is set to Real Wii Remote and it's not claimed by another Wii Remote.

If the remote does not seem to want to connect, make sure that any real Wiis in proximity are switched off for the duration of the pairing process.

RVL-CNT-01-TR Wii Remote Pluses may need extra configuration for older versions of Windows, see the Wii Remote Plus (RVL-CNT-01-TR) Connection Guide.

Emulated Wii Remote

The configuration window for emulated Wii Remote works in the same way as the GameCube controller settings.


Choose any device that is connected to your PC in the Device dropdown, and set the buttons and axes to your liking.

  • Left click a slot to detect input, then press a button/key or axes on your selected device to save it to that slot.
  • Middle click a slot to clear it of inputs.
  • Right click a slot to show more input options. See Input Syntax for documentation and examples.


Extension Allows you to add an emulated Nunchuk, Guitar, or other Wii Remote peripheral. Select the extension you want to emulate in the dropdown, and press configure to open a window with slots just like the Emulated Wii Remote window. Select buttons and axes as you wish, and press OK to save. If you wish to attach a MotionPlus to the emulated Wii Remote, select 'Attach MotionPlus'.

If you controller supports it, Rumble will allow your controller to experience the Wii Remote's rumble functionality. Within the rumble configuration window, click on the motor pattern you wish to use (sine, cosine, etc), and press 'Select' to apply it. If you wish to add a second pattern, click another pattern and press '| OR'. Hit 'OK' to accept the changes and exit the window.

Speaker Pan allows you to shift the emulated Wii Remote audio to the left or the right on your system speakers, if Enable Speaker Data is checked. -100% is left, 0 is centered, and +100% is right.

Battery allows you to change the battery level of the emulated Wii Remote.

Upright Wii Remote alters the base swinging and tilting orientation of the emulated Wii Remote to the upright position.

Sideways Wii Remote changes the emulated Wii Remote controls to allow you to play games as though the Wii Remote is sideways, without actually changing your controls. It is useful for games such as New Super Mario Bros. Wii that are designed for it.

Profile allows you to save/load input configs.

After setting up everything that you want, click 'OK' and the changes will save.


General Settings

These settings apply to both Emulated and Real Wii Remotes.

Sensor Bar Position, IR Sensitivity, Speaker Volume, and Wii Remote Motor are duplicates of Wii settings. They do exactly what they say they do, and work exactly like the same settings on the Wii itself.

Hotkey Settings

Dolphin has preloaded user-configurable hotkeys only found under Options > Hotkey Settings. This has great use for Hotkey and Tool-Assisted Speedrun users, and it is required for Free Look (if enabled under Utility section in Options > Graphics Settings > 'Advanced' tab) and a way to exit Fullscreen.


Choose any device that is connected to your PC in the Device dropdown, and set the buttons and axes to your liking.

  • Left click a slot to detect input, then press a button/key or axes on your selected device to save it to that slot.
  • Middle click a slot to clear it of inputs.
  • Right click a slot to show more input options. See Input Syntax for documentation and examples.


There is no way to map hotkeys on the native controllers.

Retrieved from 'https://wiki.dolphin-emu.org/index.php?title=Configuring_Controllers&oldid=173054'