Configure Keyboard For Dolphin Emulator

Sep 25, 2020 To configure your keyboard or gamepad for GameCube games, here’s what you need to do: 1) Go to ‘Options’ and select ‘Controller Settings’ on Dolphin. 2) Select ‘GameCube Controllers’. 3) Choose ‘Configure’ and set it to ‘Port 1’ 4) You’ll now see the configuration screen for your keyboard or gamepad, as the picture above. How to Configure the Gamepad? Setting up gamepads shouldn’t cause any problems. To control GameCube games, we use either the Dolphin KB/X360pad plugin if we are working with a keyboard, or nJoy v 0.4 by Falcon4ever if we are going to play with a joystick. This is where the question of compatibility with the Dolphin emulator often arises. I was trying to make this guide as simple as possible, I hope it helps! Sorry for the poor audio quality. If you have any further questions you can ask me at.

Left mouse click - morpho ball. 1 - a simple attack - such as a blaster or bombs in the MS. The right mouse in the first person - aiming at the target, the left mouse - fire at the target. To reload missiles / heal - hold down H, then left mouse button. So far like this. Gloom beacon.

____________________________________________________________________

Disclaimers:

I did not create the AutoHotkey Script. That was created by /u/squible on reddit. You can read his post here and view his GitHub pagehere.The rest of the guide and notes is my original content, synthesized from various websites and instructions in order to create a streamlined & easy to follow installation process.

The instructions contained within this guide were used on a Windows 10 computer. This method will not work on non-Windows machines; however it may be achievable through other means.

This guide includes an explanation of what a Smashbox is for those out of the loop. If you just want instructions, scroll down to the 'Make-Your-Own-Smashbox Guide' section. Screenshots of each step are included.

Whether or not you think the Smashbox should be banned or legalized, the information within this guide is easy to understand and follow. If more people can experience first hand what playing with a system like the Smashbox feels like, we will see less speculation on what ifs when discussing the Smashbox's legality and practicality. Right now only 6 Smashboxes are available, and only a select few people are able to learn first hand how the Smashbox interacts with the game; however, this guide will give everyone with dolphin and a keyboard a chance to educate themselves and make informed decisions when forming opinions on the Smashbox's place.

____________________________________________________________________

Configure Keyboard For Dolphin Emulator

What is a Smashbox?

Smashbox is a third-party controller GameCube controller for Super Smash Bros. that is currently in development by Hitbox Dustin. Hitbox Arcade is a company that has been prevalent in the FGC community for years now. Hitbox specializes in creating arcade style 'fight-sticks' without the actual stick through an overhaul of the controller layout.

  • Here is the introductory teaser video of the Smashbox released July 7, 2016: https://www.youtube.com/watch?v=UM-NKXS1m2I
  • Here is an image of the current alpha build of the controller: Image

Why is this being created?

The GameCube Controller, which I will refer to as GCC, is far from being the perfect human-game interface device in terms of precision, consistency, and ergonomics. Due to the analog nature of the control stick and variances during the controller manufacturing process, every single mass produced GCC is slightly different straight out of the box. This variance has led to the rise of players outsourcing controllers to have them custom tuned and modified so that precision, consistency, and accuracy of the controller is ensured.

Here is a list of some of the various issues/problems with mass-produced and uncorrected GCCs and their use:

  1. The analog stick may not be centered. This causes unintended drift and can even result in the analog stick being prevented from reaching all stick values depending on the gate
  2. The analog stick may experience 'snapback'. Here is a link to Kadano's explanation on the causes and implications resulting from this phenomenon
  3. Controller actions such as 'Smash Turns' / 'Dashbacks' are a game of controller luck and RNG due to Melee game code and analog stick function faults.
  4. Long-term and improper use of the GCC has led to hand & wrist pain/injury for a significant portion of the Melee community. Redbull eSports Article | TafoTalk ft. Dr. Caitlin McGee on Hand Health | ESPN eSports Article ft. Dr. Caitlin McGee
  5. The design of the shoulder buttons (L & R) has changed throughout the multiple production runs of the GCC since the GCN's release in 2001. This has caused newer models to experience things such as 'sticky triggers' across various controller models.
  6. Long-term use and wear of the analog stick slowly alters its position, ability to return back to 'center', ability to 'Smash Turn', ability to 'Shield Drop', and ability to 'Perfect Ledgedash'

In his video on the legality of the Smashbox, Hitbox Dustin says that with the Smashbox he aims to solve these problems with the GCC through the implementation of a new controller layout that is both an innovative alternative to current smashers and a familiar alternative to current FGC members who have used fight sticks for years and are looking to venture into the Melee community.

How can I get one?

Hitbox Dustin's announcement has sparked lots of conversation within the smash community as many people have become very interested in the potential of this controller. The current existing models of the smash box are alpha-prototypes that Dustin has made as a working proof of concept. Only 6 exist right now, and are being used by professional smash community members, most notably Gravy, to test it and evaluate its effectiveness and viability.

Hitbox Dustin has stated that his goal is to get enough support from the community so that he can confidently do a Kickstarter program and mass produce the Smashbox for the average person to buy. Sadly, this is a long way away, with the earliest consumer models most likely not being released until late 2017 (my assumption); however, it is possible to recreate the Smashbox at home for no cost to you using Dolphin Emulator and your keyboard.

____________________________________________________________________

Make-Your-Own-Smashbox Guide

What you will need:

It is possible to recreate a Smashbox on your keyboard for no cost using the following:

Configure Keyboard For Dolphin Emulator
  1. Windows 7/8/8.1/10
    1. This has been tested on and works on Windows 10. I can not guarantee it will work with other versions.
  2. Keyboard with at least 6-key N-key rollover
  3. Dolphin Emulator
    1. This guide uses the Faster Melee build of Dolphin (Ishiiruka v4.3)

Installation & Setup:

  1. Download the official Smashladder Faster Melee build found here and install it to wherever you like.
    1. Make sure to use Ishiiruka v4.3. (Faster Melee)
    2. In Dolphin 5.0, the values read from the analog stick are slightly different from the ones found in the FM v4.3 build. Do not use it.
  2. Download the AutoHotkey installer found here and run it.
    1. Use the default/basic/express/recommended settings.
    2. Make note of where you install it.
  3. Download the vJoy installer found here and run it.
    1. Use the default/basic/express/recommended settings
  4. Now run the 'Configure vJoy' program. You can search in the Windows Start Menu for this. Pic 1 or Pic 2 (if you use Classic Start)
    1. Set the number of buttons to 16 and click 'Apply'. Pic
  5. Navigate to the GitHub page found here.
    1. Click the green 'Clone or Download' button and select 'Download .ZIP' Pic
  6. Extract the newly downloaded 'AHK-CyJoyInterface-master.zip' folder
    1. Within this folder, look for a file named 'CyJoyInterface.ahk'.
    2. Right-click and Copy this file.
    3. NOTE: If you do not have 'Show File name extensions' enabled in Windows explorer, the file will simply be 'CvJoyInterface'. Pic
  7. Navigate to the location where you installed AutoHotkey.
    1. For me this was C:Program FilesAutoHotkey
  8. Look to see if there is a folder named 'Lib'.
    1. If there is not, simply create a new folder with this name. Pic
    2. Open the newly created 'Lib' folder
    3. Paste the CvJoyInterface.ahk file we copied in step 6b. Pic
  9. Navigate to the GitHub page found here.
    1. Click the green 'Clone or Download' button and select 'Download .ZIP' Pic
  10. Extract the newly downloaded 'smashbox-AHK-master.zip' folder
    1. Open the extracted folder
    2. look for a file named 'smashbox.ini'.
    3. Right-click and Copy this file.
      1. If you have extensions hidden, it is the file with the gear as an icon. Pic
    4. Move the 'smashbox-gui.ahk' and'Hotkeys.ini' files to someplace you can easily access, such as your Documents folder or pin it to your Windows Start Menu
      1. You will have to run this to activate your Smashbox. Pic
  11. Navigate to the location where you installed the Dolphin Emulator folder and open it
    1. Navigate to dolphin-folder-nameUserConfigProfilesGCPad
    2. Note: If you haven't created any custom profiles before, you will likely have to create the 'Profile' folder and then create the 'GCPad' folder inside of the 'Profile' folder. Pic
    3. Paste the 'smashbox.ini' file copied from Step 10c.
  12. Run dolphin - Here is a screenshot detailing all of the following steps below
    1. Open the 'Controllers' configuration menu
    2. Set Port 1 to 'Standard Controller' and hit the 'Configure' button to the right
    3. Under Profile, click the drop down menu button and select 'smashbox'
    4. Click the Load button to the right of that menu
    5. Under Device, click the drop down menu button and select vJoy device
      1. Note: the devices shown may vary because dolphin will show all available input devices. Make sure you select the device that has 'vJoy' in it's name and is DInput
    6. Click OK button
    7. Click second OK button

Congratulations, you've finished the installation process.

How to Run your Smashbox:

Now that everything is set up, all you have to do is run it!

  1. Run AutoHotkey. It should be in your programs on your Windows Start Menu
    1. To make things easier you can set up AHK to run at computer startup
      1. The smashbox wont turn on until you activate the specific script so AHK can be on at all times
  2. Open Dolphin Emulator
  3. Run the 'smashbox-gui.ahk' script by double clicking it.
    1. This is the file from Step 14b in the installation section
    2. Once this is run, the keyboard keys bound to the Smashbox will be turned into virtual controller inputs
  4. Start playing Melee on your Smashbox keyboard!
    1. NOTE: If you want to take a break from the Smashbox temporarily or need to type something, hit the 'Pause/Break' key on your keyboard. This will Suspend the script so that it is temporarily disabled so you can use your keyboard normally. To Resume the script, hit the 'Pause/Break' key again
      1. If you are on a 60% / 10-key-less / laptop keyboard and don't have a 'Pause / Break' key, right click on the AutoHotkey icon in your system tray and click the 'Suspend Hotkeys' option. This is exactly the same as the 'Pause / Break' shortcut. Pic

Controls:

Below is an image of the default control scheme that is reflected onto the Smashbox format.

If you wish to change the controls, follow the instructions below:

  1. Double-click the 'smashbox-gui.ahk' script to start it
  2. Located either in your system tray or taskbar, right click on the 'AutoHotkey' Icon
  3. Click 'Edit Controls' Pic
    1. This will bring up a menu so that you can easily rebind the buttons to be more ergonomic, depending on your keyboard Pic
  4. Change controls to your liking

____________________________________________________________________

General Notes:

Tournament Legality:

The following does not necessarily represent my view or opinions. I am simply stating facts that I have gathered from various sources. More information about the various arguments will be added and edited in as I get more free time.

Is it Legal?

The Smashbox is currently a hot-topic debate in the community, and currently there is no universal decision on whether it is legal or not. Because the Smashbox is a 3rd-party controller that draws design philosophies from FGC fight-sticks and Hitbox's no stick/all-button design, it must use modifier buttons for the directional input buttons so that more angles and 'tilted' inputs can be achieved. These modifier buttons act like shift keys so that when the player presses a combination of the modifier keys with the directional input keys, a single specific angle is input. The analog to digital input conversion used in the Smashbox's design along with the difference in difficulty in pressing buttons in the new layout compared to moving a joystick has caused the community to be split on their opinions of the Smashbox's legalization or prohibition. The Smashbox's tournament legality currently depends on what each individual TO decides to allow. If you want to know if it is legal at an event you are attending, contact your TO.

Creator's Response to debate of Tournament Legality

In his recent video response to the debate titled '#freethehitbox,' Hitbox Dustin explains how the current design was decided upon and draws the analogy that the directional modifiers are simply a button version of the analog gate controller modifications provided by controller modders such as Kadano. He emphasizes that the controller does not have any macros as the Smashbox respects the 1 button press = 1 action/output philosophy. His stance is that the decision regarding the legality of the Smashbox has no influence on the legality of controller mods because the Smashbox is a controller that you'd buy in a store, not a mod. Hitbox Dustin's video is linked above in the paragraph and below along with all other videos that discuss the Smashbox.

Smashbox and Changing Melee's Difficulty

Although the Smashbox does not have any macros , many people see the directional button modifiers as an unfair advantage because it arbitrarily changes the physical barrier to the game. The current 'physical barrier to play' is a precedent set by the universal use of vanilla 1st-party GCCs to play Melee's since the game's release. Opponents to the Smashbox's legalization cite that changing the difficulty of important actions/tech such as SDI, shield drops, pivot smashes, dash backs/smash turns, and etc. fundamentally change the difficulty of the game, giving unfair advantages to those who own Hitbox's newest controller. This reasoning is basis for some people's argument that only vanilla GCCs should be allowed because limiting input to GCCs would force a standard of accessibility to the game that offers no advantage to specific players due to choice of input method.

The FGC, Smash 64, Brawl, Project M, and Smash 4 on Controllers

In the FGC, several input methods are widely accepted and tournament legal across the entire realm of traditional fighting games. Retro gamepads such as the all-digital PlayStation 1 controller see usage and tournament wins just like the PlayStation 4 and Xbox 1 controllers that ship with the consoles of the newest fighting games. he FGC allows not only the controllers that were used for previous versions of their fighting games but also 3rd-party input devices that span a wide number of shapes, sizes, and input types. Examples of these include Fightsticks, Arcade Pads, Fightstick/Gamepad Hybrids, and even various Hitboxes 1, 2. Each of these input devices have had users that win tournaments from the smallest of locals and online play to the world-renowned Evolution Tournament Series

The FGC is not alone in the adoption of a variety of controller types. The Smash 64 community has had to deal with controller controversy and change since the end of 1st Party N64 controller production. Similar to the problem Melee is facing now, the analog stick of the N64 controller is the root of several problems. Over time as the analog stick and bowl of the N64 controllers experienced use, the apparatus would slowly wear itself away, eventually becoming useless when directional inputs would completely failed to register. The poor stick lifespan after consistent use plagued pro smashers and casual retro gamers alike, causing eBay prices for replacement 1st-party sticks & bowls to soar in price and scarcity, companies to sell inferior replica replacements on Amazon, and even a Kickstarter for a company to sell 1 to 1 replicas of the 1st-party apparatus. Although all of these attempts to save first party controllers sprung up, several threads of people complaining still appeared because even the Kickstarter replacements didn't fix the inherent problem of the controller. In today's 64 community and tournaments, controllers of all type are accepted and used, from keyboards, to Xbox controllers using adapters, and third party controllers combining GCC sticks with N64 buttons made by Hori. Even though all of these controllers are used, the 64 scene has not seen a massive overhaul in rankings, and 1st-party N64 controller users still outperform other controller users in terms of technical skill such as SDI in a game where SDI is even more critical due to lack of mechanics such as wall techs. Even right now the number 1 SSB64 player, SuPeRbOmMfAn, uses a first party controller himself.


Whether or not you think the Smashbox should be banned or legalized, the information within this guide is easy to understand and follow. I think that if more people can experience first hand what playing with a system like the Smashbox feels like, we will see less speculation on what ifs. Right now only 6 Smashboxes are available, but this guide will give everyone with dolphin and a keyboard a chance.

Discussion Resources:

The following aggregation of community driven discussion on the topic of the Smashbox is non-discriminatory. I will not exclude or include an article or discussion piece based on the level of player or community figurehead. Any pieces I find will be linked here and the creator of the topic will be noted. I will not post tweets or screenshots of Twitter unless the tweet itself contains a link to a discussion piece.

Videos

  • Hitbox Dustin: Smash Box SSBM - Melee Teaser Trailer
  • Hitbox Dustin: #freethehitbox Creator's Response
  • Hitbox Dustin: Smash Box FAQ - Why no stick?
  • Hitbox Gravy: Smashbox Legality
  • TheCrimsonBlur: Out of Focus: Should The SmashBox Be Legal? Controller Legality with Blur!
  • Texas Melee: Gravy Hitbox Demonstration at Battlegrounds 3
  • The Black Hombre: An Objective Position on the Legality of the Smashbox
  • The Black Hombre: Objective Position on Mod / Controller Legality (Part 2)

Reddit Threads

  • Team HitBox AMA: https://www.reddit.com/r/smashbros/comments/5hl1lb/we_are_team_hitbox_makers_of_the_upcoming/
  • /r/SSBM SmashBox Megathread: https://www.reddit.com/r/SSBM/comments/5h5hu1/smashbox_mega_discussion_thread/
  • /u/BigWordsDumbBirds: https://www.reddit.com/r/SSBM/comments/5gcdjg/can_we_compile_a_list_of_community_figures/
  • /u/4lulzzzzzzz: https://www.reddit.com/r/SSBM/comments/5g4s9w/a_solid_argument_against_the_legality_of_the/
  • /u/yungboot: https://www.reddit.com/r/smashbros/comments/5g4z6r/melee_should_the_smashbox_be_legal_controller/
  • /u/Iaregravy: https://www.reddit.com/r/smashbros/comments/5gmwn6/hitboxdustin_releases_a_video_about_smashbox/
  • /u/JohnXuandou: https://www.reddit.com/r/smashbros/comments/5gyx80/another_one_of_these_freethehitbox_by_fgc/
  • /u/BBarbs: https://www.reddit.com/r/SSBM/comments/5h231v/potential_rules_and_regulations_that_allow/
  • /u/-Leafious-: https://www.reddit.com/r/smashbros/comments/5hkqzc/smashbox_new_data_shows_that_sdi_is_broken_on_the/
  • /u/GIMR: https://www.reddit.com/r/smashbros/comments/5h9qus/a_focus_on_the_unfair_advantage_argument_of_those/
  • /u/mrbitter: https://www.reddit.com/r/smashbros/comments/5h91re/the_most_important_controller_argument_of_all/

Web & News Articles

  • ESPN eSports: Changing the game: Will Smash Box redefine Melee's limits? - By Imad Khan
  • Kotaku: A Smash Bros. Arcade Stick, Only Without The Stick - By Mike Fahey
  • Eventhubs: Easier wave dashes, simple multi-Shines, and more: A Hitbox controller for Super Smash Bros. Melee is being developed - By Steven 'Dreamking23' Chavez
  • Yahoo Esports: Should the Smash Box controller be banned from Smash Bros. Melee? - By Daniel “Tafokints” Lee

Formal Decisions

  • 12/5/16 - PolarityGG: 'Hitbox controllers are legal at all future Polarity events.' (Twitter)

____________________________________________________________________

As discussion on the topic of the Smashbox continues, the number of sources will grow. If you would like a source added to this post, just comment a link to the article, thread, discussion, stream, or video.

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.

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!

For

Without a gyroscope, the Wii Remote could only detect half the possible axis of movement. Andrew loog oldham stoned pdf to jpg. 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.

How To Configure Controls For Dolphin Emulator

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.

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.

Keyboard Settings For Dolphin Emulator

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.

Keyboard

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.