Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputCommon: Add support for Wii Remotes in ControllerInterface #8575

Open
wants to merge 9 commits into
base: master
from

Conversation

@jordan-woyak
Copy link
Member

jordan-woyak commented Jan 23, 2020

AKA "Hybrid Wiimote 2.0".
Based on PR #8610 for gyroscope calibration.

Why?

  • "Real" Wii Remote support in NetPlay
  • Non-hacky "Hybrid Wiimote" (Mix of real and emulated Wii Remote data)
  • Emulating GameCube controllers with Wii Remotes
  • Simulating a sensor bar with MotionPlus data

An additional setting, "Connect Wii Remotes for Emulated Controllers", is added to the "Controllers" dialog.
I also fixed up all the widget disabling/enabling when passthrough/emu BT is changed and core state changes.
https://i.imgur.com/hq81jFW.png
I'm open to suggestions on the UI wording and the ini name, "WiimoteControllerInterface".

When enabled, after real Wii Remote slots are filled, additional remotes are sent to ControllerInterface where inputs can be mapped 1:1 or completely reconfigured.
Wii Remotes are moved to/from ControllerInterface/pool as settings change.

Nunchuk and Classic Controller extensions function with or without simultaneous M+.
Calibration data is read for all extensions and all inputs are supported. (raw accel data is provided for Nunchuk)
Eliminated redundant bithacks in our TAS code for get/setting of Nunchuk/Classic Controller values.

I've found M+ calibration data is almost useless beyond providing the "handedness" of the sensors so real-time calibration must be done when data is stable. (Usually requires placing the remote on a table for a few seconds).

Raw accelerometer and gyroscope inputs are provided for IMU mappings.
When enabling IMU "pointer" emulation this allows simulating a sensor bar as long as MotionPlus is present.
Many games will no longer need a sensor bar. One game I can think of that won't behave well is, Metroid: Other M.
Demonstration: https://giant.gfycat.com/JampackedDiscreteImago.webm
(Ignore the weird gyro mappings, they were before real-time calibration)

The Wii Remote orientation is calculated from M+ data and corrected with accelerometer and IR data when present. Yaw/Roll/Pitch inputs are provided from this.

Pass-through of M+ presence, current extension, and battery level is possible with PR #8417.
Demonstration: https://giant.gfycat.com/OrangeDemandingCanadagoose.webm

Variable strength rumble is simulated with pulses.

I'm open to suggestions on naming of inputs.

I've tested with many official Wii Remotes and two generic ones.

To be fixed at a later date:

  • All inputs for all extensions are always listed even when not connected.
    • ControllerInterface will need changes to allow dynamically removing inputs
  • Include Emulated Wii Remote input profiles for Real Wii Remotes to give users a starting point

This fixes: https://bugs.dolphin-emu.org/issues/11642

@jordan-woyak jordan-woyak force-pushed the jordan-woyak:ciface-wiimotes branch 10 times, most recently from 4512212 to 043b9a6 Jan 23, 2020
@jordan-woyak jordan-woyak force-pushed the jordan-woyak:ciface-wiimotes branch 3 times, most recently from aa60b39 to 44bb413 Feb 9, 2020
@jordan-woyak jordan-woyak force-pushed the jordan-woyak:ciface-wiimotes branch 3 times, most recently from ea055d4 to 90989b9 Feb 13, 2020
@jordan-woyak jordan-woyak force-pushed the jordan-woyak:ciface-wiimotes branch from 90989b9 to d7e2ed9 Feb 17, 2020
…f functionality provided by ControllerEmu.
@jordan-woyak jordan-woyak force-pushed the jordan-woyak:ciface-wiimotes branch from d7e2ed9 to 70ac9ad Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.