Please see linuxmotehook2 for successor to this project.
Being unable to use WiiMote as motion source under Linux with cemu, I decided to move on and write motion provider by myself, so here we have it.
- WiiRemote (MotionPlus is VERY recommended)
- Lua 5.3
- Lua libraries (they are included in bundle or alternatively can be installed with luarocks manually):
-
lgi
for Lua 5.3 (preferably from git master): Licensed under MIT
-
lua-xwiimote
for Lua 5.3: Licensed under MIT
-
crc32
for Lua 5.3: Licensed under MIT
-
luajson
for Lua 5.3: Licensed under MIT (not included into bundle as can be installed as Ubuntu package)
-
LPeg
for Lua 5.3 (optional): Licensed under MIT
- I think you got this, but Linux machine with recent kernel which can be paired with WiiMote
To use bundle, following packages should be installed on Ubuntu (checked with minimal installation):
lua5.3
libxwiimote2
lua-json
- Install requiments listed above
- Download this project
- Copy
config.template.json
toconfig.json
and edit it if you wish to (read GitHub Wiki for details on this) - Connect your WiiMotes with MotionPlus one-by-one and calibrate each using
autocalibrate.lua
, writing results toCalibration
in config (for your WiiMote MAC of course) - Run
main.lua
in terminal - Get PadTest and test all of your WiiMotes with MotionPlus, inverting some or all axles if required (try changin values 5, 6 and 7 in calibration fields to
-1
) - Use Cemu with Cemuhook as you would with any other motion provider!
WiiMotes can be connected and disconnected both before starting or while working.
- Finally working WiiMoteHook but for Linux!
- Highly configurable nature allowing to map buttons, accelerometer and gyro axles at your will.
- Ability to calibrate axis values to prevent oversensitivity (real life example: stop chaotic jumping in New SMB U).
- Usable as button source as well, including joysticks.
- Support for few WiiMotes (require tesing).
- Standalone bundle which can be run with minimal setup.
- Atuocalibration script which help to stop constant slow rotation.
- I have only one WiiMote with built-in MotionPlus, so some aspects of program may not work as expected. If they do, file an issue, please!
- Nunchuck is not supported, but is planned to. Due to limits of xwiimote version in Ubuntu repository, however, this feature is delayed.
- WiiMote may fail to disconnect correctly sometimes and you have to restart program if this happens.
- Built-in MotionPlus have different axis directions between models, so PadTest must be used to fix directions. Canonical ones (separate MPlus reports) are unknown to me, so ones used correspond to built-in MPlus I own. They are really wanted tho, so if you have separate MPlus, make sure to report which axles you had to reverse!
- Autocalibration scipt have a lot of potential improvements, from adding proper support for few WiiMotes plugged in to making it GUI.
- PadTest -- program used to test motion sources. Leaving gyro noise aside, works flawlessly.
- Cemu(hook) itself -- tested with few games, works fine.
- Citra -- tested with Kirby: Planet Robobot, may loose orientation a bit but is still very playable (much better than right mouse button).
- Dolphin -- tested with few games. Buttons are functioning flawlessly and motion is working ok, but it is recommended to use built-in means
of connecting WiiMote unless required otherwise.
Dolphin
profile is made specifically for this emulator.