-
Notifications
You must be signed in to change notification settings - Fork 2.9k
WiimoteReal: Send reports with proper timing for theoretically better speaker data. #13884
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
Conversation
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM. Untested.
|
Tried this commit but the problem I was having is still there. This is a comparisson Realtek 2024 drivers (every sound pretty good): https://www.mediafire.com/file/g1z4qkfvb52hzfv/Dolphin_Emulated_TR_Realtek_2024_driver.aac/file Realtek 2025 (every sound starts fine but ends horribly): https://www.mediafire.com/file/0h7o7ib0k0cl9uc/Dolphin_Emulated_TR_Realtek_2025_driver.aac/file And wiimote response seem to be blocked during the distorted audio. I could just blame realtek drivers. But I use a program to test wiimote speaker audio and seems unaffected. Program uses ADPCM at 6000hz. |
Thanks for testing. I need to fix this. |
|
Thanks. I can provide additional info if needed. Next to this would be nice to do some refactory or rework to IOWin.cpp. Really old code left there. Some deprecated Windows 7 workarounds among other methods to detect connections or disconnections that seems odd or just temporal workarounds that has been there forever. I can help with testing. We can properly detect when a wiimote disconnect by not receiving report data (accel data, IR data, button data, etc). And make BT stack aware it´s disconnected. There is little to no code about that. And we can detect when a wiimote is trying to connect too. Actual code just simply delete from system and re sync. |
bc40d94 to
7b53760
Compare
This should be resolved now. |
|
Tested new code. Looks fine to me. Didnt notice any regression. And issues seems to be fixed. |
… speaker data.
7b53760 to
ed93e94
Compare
|
The new change need additional testing? Could compile again if necessary but doesn't seem so. |
Not any major new changes. |
|
Great. It was just a minor change so l bet it will be fine. My PC takes a while to compile dolphin. Mostly I delete this before compiling (in iowin.cpp) // Removes remembered non-connected devices } return false; It keep deleting all my non connected wiimotes from my system. I use them for other stuff and because of that I have to re sync them all the time. I just cheat changing this So the sentence now makes no sense and stop messing with my Wiimotes. I think we have better ways to detect disconnections/connections/tryingtoconnect now instead of that workaround. Count me in for some Windows Wiimote code testing :) |
|
@Trihy |
Why specifically do you need the devices installed when they aren't connected? With I am looking for alternative methods to connect remotes, but Microsoft's documentation isn't the best. Is there some open source application you know of that is able to pair remotes more properly? |
|
Hi. If you re sync them every time, it will get another Windows ID. So many software wont recognize the previous configuration. And also for one button reconnect. Since I deleted that part of the code, I connect my wiimotes with a single button press (after syncing with sync button). But I sync them with other software, since Im not sure if dolphin does permanent pairing using the BT dongle mac backwards as pairing key ( I mean this "If connecting by holding down the 1+2 buttons, the PIN is the bluetooth address of the wiimote backwards, if connecting by pressing the "sync" button on the back of the wiimote, then the PIN is the bluetooth address of the host backwards.") This software once synced with sync button, will re connect with one button press every single time. You can turn wiimote off, take batteries out, restart the system, etc and single button press will reconnect. https://github.com/Trihy/Touchmote/tree/ryochan7_lightgun Sync and connect routines are under WiiCPP folder. And It´s based on WiiPair. I was trying to understand how it works to help dolphin, but can´t understand what it does once a remote stop sending reports, to make Windows aware it´s disconnected. I noticed sometimes when you turn a wiimote off on dolphin, Windows still think It´s connected (you can go to BT devices and say it´s connected) and takes some time to realize it´s disconnected. With this software it´s instantly and 100% successs every time. |
|
To make it clear, last time I synced my wiimotes with Sync button was like a year ago. They just connect with a single button press. And I use them daily. Oh BTW, all I commented is valid for most BT dongles and built in ones. There is an exception for TPLINK UB500 since it has a bug in their drivers. In case you are testing with that one, additional info I have to add. |
|
Look at this flawless experience reconnecting wiimotes. Link removed. Already been worked on. Windows 11 built in realtek BT. Using touchmote (WiiPair based) Just turn them off with wiimote power button and then just pressed any button. In this case was the dpad. I can repeat this 10 times and wont miss a single beat reconnecting them. We can figure it out how to make dolphin equal great for emulated mode. Really great to use the wiimotes that way. Wii console experience. |
|
I have pairing working locally now in Dolphin, but semi-unrelated |
|
Great. I been dealing with wiimotes since the old days of toshiba stack. Looks like win10 and 11 can handle them correctly. Dolphin was a little behind. Lets make things easier again for end user. |
PR #13387 causes the emulator to race through to the next presentation which can cause written Wii remote reports to have improper timing.
With this PR, writes are now performed at the proper times on a thread separate from reads.
I've done some minor code clean up, but WiimoteReal is really in need of a big overhaul.
Theoretically this would improve speaker data.
In practice it doesn't seem to help much.
This should at least eliminate any regressions introduced by #13387 (if they were even noticeable).