Dolphin, the GameCube and Wii emulator - Forums

Full Version: DolphinBar + Wiimote does not work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
(08-17-2016, 02:59 AM)JulianLoehr Wrote: [ -> ]Ah ok. It is also possible (providing a buffer that is large enough) that one read yields multiple reports. Then the read bytes are a multiple of the largest report. I think it is by design as the documentation suggest to then use some more HIDAPI-Calls to extract the actual data from the reports. Those calls do take the Report Descriptor into account and therefore are only using the valid bytes.
So for that to work (processing multiple reports with one ReadFile-Call) it is necessary that all reads yield the same length (or a multiple of that).

Interesting, I didn't know that Windows would "merge" reports like that. Looking at the max size (23 bytes), it seems possible that multiple reports get merged. So it could be something Dolphin is doing wrong…? (I'm not very familiar with the Windows code)

(08-17-2016, 04:02 AM)Caturix Wrote: [ -> ]However, do you think a real Wiimote will solve this?

Not sure what you mean by "real Wiimote"… Anyway, I realised that just linking to a PR wasn't very helpful; so if you don't mind installing a Linux distribution and you want to try, you can build it with:
Code:
git clone https://github.com/dolphin-emu/dolphin
cd dolphin
git fetch origin pull/4090/head:hidapi
git checkout hidapi
then follow the normal build instructions for Linux.
(08-17-2016, 04:17 AM)leolam Wrote: [ -> ]Not sure what you mean by "real Wiimote"… Anyway, I realised that just linking to a PR wasn't very helpful; so if you don't mind installing a Linux distribution and you want to try, you can build it with:

Code:
git clone https://github.com/dolphin-emu/dolphin
cd dolphin
git fetch origin pull/4090/head:hidapi
git checkout hidapi
then follow the normal build instructions for Linux.

Ah i meant a Wiimote by Nintendo, not 3rd party controller that i got right now.
Currently i dont have any Linux on my PC, and i would prefer to solve the problem on windows isntead of install a Linux just for Dolphin.
Well, after seeing Julian's messages, I'm not entirely sure an official Wiimote would solve your issue. Another thread has a report of official Wiimotes not working either, so…

But at least with an official Wiimote, you're sure that the issue isn't with the Wiimote.
(08-17-2016, 04:17 AM)leolam Wrote: [ -> ]Interesting, I didn't know that Windows would "merge" reports like that. Looking at the max size (23 bytes), it seems possible that multiple reports get merged. So it could be something Dolphin is doing wrong…? (I'm not very familiar with the Windows code)

It is not merging them, but appending them. So providing a 23 bytes buffer will only reada single report. Though when that report is only 6 bytes big, it will copy that 6 bytes, fill/leave the remaining 17 bytes as they are and report back 22 bytes read.
So here is the PR/Build with a possible fix: https://buildbot.dolphin-emu.org/builders/pr-win-x64/builds/2449 (Direct DL-Link: http://dl.dolphin-emu.org/prs/pr-4128-dolphin-latest-x64.7z).
I like to add that is by pure guess as i can't reproduce it and it might not work.
(08-18-2016, 09:52 AM)JulianLoehr Wrote: [ -> ]So here is the PR/Build with a possible fix: https://buildbot.dolphin-emu.org/builders/pr-win-x64/builds/2449 (Direct DL-Link: http://dl.dolphin-emu.org/prs/pr-4128-dolphin-latest-x64.7z).
I like to add that is by pure guess as i can't reproduce it and it might not work.

In a first try i seem to get the same fault with it, but got to leave to work now. However, thanks for the try.
(08-17-2016, 08:02 AM)JulianLoehr Wrote: [ -> ]It is not merging them, but appending them. So providing a 23 bytes buffer will only reada single report. Though when that report is only 6 bytes big, it will copy that 6 bytes, fill/leave the remaining 17 bytes as they are and report back 22 bytes read.

Wow, that sounds like a recipe for failure. I'm surprised it actually works most of the time…
(08-18-2016, 07:32 PM)leolam Wrote: [ -> ]Wow, that sounds like a recipe for failure. I'm surprised it actually works most of the time…

Well at some point you are in the need to know the report descriptor and therefore know by the report ID what kind of report it is and how many bytes are actual valid.
(08-18-2016, 03:51 PM)Caturix Wrote: [ -> ]In a first try i seem to get the same fault with it, but got to leave to work now. However, thanks for the try.

Oh forgot to mention can you enable the Log and check that for any lines other than "Error on WriteFile" (Set Log Verbosity to "Warning" and only check the "Wiimote" Log Type).
(08-18-2016, 10:16 PM)JulianLoehr Wrote: [ -> ]Oh forgot to mention can you enable the Log and check that for any lines other than "Error on WriteFile" (Set Log Verbosity to "Warning" and only check the "Wiimote" Log Type).

Pm.
Pages: 1 2 3 4 5 6 7