devkitPro / libogc

C Library for Wii and Gamecube homebrew
https://devkitpro.org/viewforum.php?f=40
Other
289 stars 71 forks source link

Support for Wii Motion Plus Inside Expansions #181

Open Lex-ssf2 opened 1 month ago

Lex-ssf2 commented 1 month ago

I have 2 motion plus inside controllers, one a friend gift me and one that I bought, I can get access to all stats in the WPADData but everything related to the expansions doesnt work properly, I have to switch to my regular Wiimote without the motion plus inside and it does work, I checked this issue hoping I manage to make it work, but it doesn´t, yeah I do get the accel,orient and even the gforce but as soon as I try with the expansion (in this case nunchuk) it doesnt work until I switch between the motion plus inside to regular wiimote Yeah I kept the WPAD_SetMotionPlus(-1, 1) and still doesnt work

I kept everything except this part in second while if(err == WPAD_ERR_NONE) which looks like this

    if(err == WPAD_ERR_NONE) {
        wd = WPAD_Data(0);
        printf("\x1b[6;0H");
        printf("Nunchuk Y axis: %d\n",wd->exp.nunchuk.js.pos.x);
        printf("\x1b[7;0H");
        printf("Nunchuk X axis: %d\n",wd->exp.nunchuk.js.pos.y);
        printf("\x1b[8;0H");
        printf("PITCH: %d",wd->exp.mp.rx); // frozen at 0.00
        printf("\x1b[9;0H");
        printf("YAW: %d",wd->exp.mp.ry); // frozen at 0.00
        printf("\x1b[10;0H");
        printf("ROLL: %d",wd->exp.mp.rz); // frozen at 0.00
    }

I see that u guys uses wiiuse and in their repo they say that they support last gen wiimotes, so thats why im asking if is possible to get some work around the expansion cuz everything else works just fine

DacoTaco commented 1 month ago

the problem here, sadly, this and possibly #166 could be resolved if we update our wiiuse branch to the one upstream but it diviated so so long ago, before the upstream wiibrew repository existed and its hell to update and merge because i have no idea what is just old code changed over time, or wii related fixes to make it work on the wii.

i tried it, but didn't have time to continue this work ( https://github.com/DacoTaco/wiiuse/tree/wii ) :/

Lex-ssf2 commented 1 month ago

That´s a shame, also thx for answering, is there something I could possible help with? I´ve been coding in C before, so if I could help I don´t mind I also gets benefits from it

DacoTaco commented 1 month ago

the current job is to migrate the current wiiuse back to libogc, and then we need to look at all the differences and see which one should be thrown out or upstreamed back to wiiuse. after that, fixing things should be way easier and we can contribute back into wiiuse, because there should be a few things we have that need to be fixed upstream.

Lex-ssf2 commented 1 month ago

I see, If u want we could talk in discord my acc is . I really would like to help this project and I´m also interested about how everything related to the library works