A Weird Imagination

Emulating Xbox controllers using GameCube controllers

The problem#

I previously wrote about making different controllers act like Xbox 360 controllers. While it's a useful general-purpose solution, it's can be a bit clunky to have to explicitly set the mappings for each controller. More importantly, the remapping leaves the original controller entries in /dev/input/, although they don't do anything, and some games1 assume that the four players are controlled by the first four controllers. This is no longer true if js0 is the real first controller and js1 is the copy made by xboxdrv to look like an Xbox 360 controller. Or, worse, if js0-js3 are the four real controllers and js4-js7 are the ones we want the game to actually use.

The specific reason I'm remapping the controllers, is that the gamepads I'm actually using are GameCube controllers connected via the Nintendo GameCube controller Adapter for Wii U, which connects up to four GameCube controllers to a USB port. wii-u-gc-adapter makes them usable as controllers, but they appear different enough from Xbox 360 controllers that remapping them is necessary for most games.

The solution#

Just build and use the version of wii-u-gc-adapter in my feature/mimic-xpad branch and your GameCube controllers will show up as Xbox controllers.

The details#

Read more…

Emulating Xbox controllers on Linux

Posted in

The problem#

The Xbox 360 controller has become the defacto standard controller in PC gaming in recent years, likely due to both the popularity of the Xbox and the fact that the controller can easily be used with a computer. One downside of this is that some games assume you have one. If the game supports it and is running through Steam, then Steam's controller settings will let you use any controller, but that doesn't work for all games, and you might not be using Steam. The game that prompted this blog post actually does have Steam controller support promised in the future, but it's in early access and they are busy developing other parts of the game.1

xboxdrv#

The solution is xboxdrv, the userspace Xbox controller driver. In addition to supporting actual Xbox controllers, it can also simulate Xbox controllers based on inputs from other devices like a PlayStation controller or some less common controller.

Read more…