-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Conversation
4512212
to
043b9a6
Compare
aa60b39
to
44bb413
Compare
ea055d4
to
90989b9
Compare
… inputs and calibration data to calculate normalized input values.
…tionPlus extensions to get/set data without duplicate bithacks everywhere.
…veDevice can be used within UpdateInput.
90989b9
to
d7e2ed9
Compare
…option to connect additional Wii Remotes.
…f functionality provided by ControllerEmu.
d7e2ed9
to
70ac9ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code seems fine at a glance, but untested.
If I use the Connect Wii Remotes for Emulated Controllers setting, it won't have the WiiMote Rumble and Speaker. Can you add the Rumble and Speaker setting on the next Dev version? I'm using a Wii Remote Plus |
Could be possible that after this commit, continuous scan is always on? Besides disabling on settings, seems like is always on. |
AKA "Hybrid Wiimote 2.0".
Based on PR #8610 for gyroscope calibration.
Why?
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:
This fixes: https://bugs.dolphin-emu.org/issues/11642