Homebrew Latest emulator and libogc with 3rd party classic controller

Shadowcaster

Member
Newcomer
Joined
May 2, 2014
Messages
13
Trophies
0
Age
54
XP
131
Country
Got new original wii remotes plus (with motion plus), and they are not recognized with fixed emulators from first post. Got latest libogc from git, compiled, recompiled emulators - now wimmotes plus are recognized, but my third-party controllers pro are glithcing again - wii cursor shuttering. Classic controlers id is 0x0, noname.
Can someone please give a source for current libogc fix, i'll patch current svn and recompile.
Thanks in advance.
 

Shadowcaster

Member
Newcomer
Joined
May 2, 2014
Messages
13
Trophies
0
Age
54
XP
131
Country
For those who seek answers B-)

LibOGC
For third-party classic controllers from dealextreme with id 0x0 to work flawlessly with homebrew you need to make small change in libogc and recompile libogc (make, make install), make and make install libfat, than proceed to recompilation of whatever needed.
change near line 85 of libogc/wiiuse/classic.c
from:
Code:
        if (data[offset + 16] == 0xFF) {
            /* get the calibration data again */
            WIIUSE_DEBUG("Classic controller handshake appears invalid, trying again.");
            wiiuse_read_data(wm, data, WM_EXP_MEM_CALIBR, EXP_HANDSHAKE_LEN, wiiuse_handshake_expansion);
        } else
to:
Code:
        if (data[offset + 16] == 0xFF) {
            /* get the calibration data again */
            /* WIIUSE_DEBUG("Classic controller handshake appears invalid, trying again."); */
            /* wiiuse_read_data(wm, data, WM_EXP_MEM_CALIBR, EXP_HANDSHAKE_LEN, wiiuse_handshake_expansion); */
        } else

For genensis plus gx you need to comment out analog stick code, or cursor will always be moving sideways.
make same change genplus-gx-read-only/gx/gx_input.c in 2 places, near lines 483 and 526:
from:
Code:
    case WPAD_EXP_CLASSIC:
      js = right ? &data->exp.classic.rjs : &data->exp.classic.ljs;
      break;
to:
Code:
    /* case WPAD_EXP_CLASSIC:
      js = right ? &data->exp.classic.rjs : &data->exp.classic.ljs;
      break;  */
 

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
hi, i had some time to study the code of libwiiuse recently and I think the following code in classics.c should be:

Code:
		if (data[offset + 16] == 0xFF) {
			/* get the calibration data again */
			WIIUSE_DEBUG("Classic controller handshake appears invalid, trying again.");
			wiiuse_read_data(wm, data, WM_EXP_MEM_CALIBR, EXP_HANDSHAKE_LEN, wiiuse_handshake_expansion);
                        return 0;

instead of

Code:
		if (data[offset + 16] == 0xFF) {
			/* get the calibration data again */
			WIIUSE_DEBUG("Classic controller handshake appears invalid, trying again.");
			wiiuse_read_data(wm, data, WM_EXP_MEM_CALIBR, EXP_HANDSHAKE_LEN, wiiuse_handshake_expansion);

otherwise data is disallocated before the read has finished (cf. wiiuse_handshake_expansion in io.c which is calling classic_ctrl_handshake) which could cause some issue

i still do not have any 3rd party controller to test it but could you do it and see if it changes anything ?

also it could be that those 3rd party controllers do not have calibration data so they always return 0xff when reading this area, which ends up making the library reading the expansion area continuously and might prevent to properly read buttons data from the controller.
in that case, the proper solution would be to either do not attempt to read again the calibration data (like what your patch is doing) or have a max number of read attempts before aborting

obviously, when 0xff is read, min/max/center values should not be initialized with the data read but with default values instead (0/32/64 or 0/16/32), this is the reason why the direction got stuck to left in some emulators, because they use invalid calibration data
 

Walker D

I have a hat
Member
Joined
Nov 15, 2009
Messages
1,334
Trophies
0
Location
My home
XP
748
Country
Brazil
Someone knows if the reason for third-party classic controllers not work with wii homebrews is similar to why third-party classic controllers are not recognized by GlovePIE ? (it's a pc software for connecting and configuring wii controllers to the pc)

Would be cool if I could use my controller on GlovePIE...
 

shadow1w2

Still here.
Member
Joined
Mar 16, 2004
Messages
1,713
Trophies
2
XP
1,804
Country
United States
I wonder if this will fix the troubles I have using my Hori arcade stick.
Ever since the classic controller pro updates came out it defaulted to up right on all the analod axis outputs which the arcade stick doesn't have.

This fix might be a bit old though but first I've heard of it.

Also Glovepie wise, it has been discontinued I think.
Try using WiiMouse it has a script system too but is WiiMote only and no midi support etc.
Still gets the job done and has good compatibility.
 
  • Like
Reactions: Walker D

Shadowcaster

Member
Newcomer
Joined
May 2, 2014
Messages
13
Trophies
0
Age
54
XP
131
Country
...

i still do not have any 3rd party controller to test it but could you do it and see if it changes anything ?

also it could be that those 3rd party controllers do not have calibration data so they always return 0xff when reading this area, which ends up making the library reading the expansion area continuously and might prevent to properly read buttons data from the controller.
in that case, the proper solution would be to either do not attempt to read again the calibration data (like what your patch is doing) or have a max number of read attempts before aborting

obviously, when 0xff is read, min/max/center values should not be initialized with the data read but with default values instead (0/32/64 or 0/16/32), this is the reason why the direction got stuck to left in some emulators, because they use invalid calibration data
Do you know any app that can I can compile and do simple controller test? TellMiMyId don't work with motion plus controllers, and there is no software I found to just test all buttons and axis on controller. Perfect one will be that shows id, calibration data values and current position values.
 

Walker D

I have a hat
Member
Joined
Nov 15, 2009
Messages
1,334
Trophies
0
Location
My home
XP
748
Country
Brazil
Also Glovepie wise, it has been discontinued I think.
Try using WiiMouse it has a script system too but is WiiMote only and no midi support etc.
Still gets the job done and has good compatibility.
Thanks but I needed it for the Classic Controller ...and since I already have the scrips for GloverPie done, there's no need to get WiiMouse just for using wiimotes (for now at least)

Edit:
actually, I'll try this ..hope it works

Edit2:
aaannd, it worked! ^_^ I'm happy to know that after the apparent death of GlovePie, I still can have fun configuring wii controllers on my PC. Cool
 

shadow1w2

Still here.
Member
Joined
Mar 16, 2004
Messages
1,713
Trophies
2
XP
1,804
Country
United States
Thanks but I needed it for the Classic Controller ...and since I already have the scrips for GloverPie done, there's no need to get WiiMouse just for using wiimotes (for now at least)

Edit:
actually, I'll try this ..hope it works

Edit2:
aaannd, it worked! ^_^ I'm happy to know that after the apparent death of GlovePie, I still can have fun configuring wii controllers on my PC. Cool

Ya glad we have some alternatives out there.
Wish Glovepie went open source, oh well.
Also WiiMouse works with the classic controller.
Not so much the WiiU pro controller

That program seems nice though I'll give it a try too.
Though once it has Xbox360 or any joystick support (hopefully like MotionJoy has I hate the ones that don't turn off)
Would love to emulate IR pointing as a joystick again.
PPJoy and another virtual joystick driver never seems to work for me anymore so would love to do that again.
Using pointing as a mouse sorta works though just not quite as reliable.

Anyway glad you found something that works.
 

Walker D

I have a hat
Member
Joined
Nov 15, 2009
Messages
1,334
Trophies
0
Location
My home
XP
748
Country
Brazil
That program seems nice though I'll give it a try too.
Though once it has Xbox360 or any joystick support (hopefully like MotionJoy has I hate the ones that don't turn off)
Would love to emulate IR pointing as a joystick again.
PPJoy and another virtual joystick driver never seems to work for me anymore so would love to do that again.
Using pointing as a mouse sorta works though just not quite as reliable.

Anyway glad you found something that works.
Don't know if WiiMouse would have the same compatibility problem with my 3rd party controller that I found in GlovePie. now that you said that it accepts Classic Controller too. But for now, I think I'll stay with WiinUPro, since the developer seems more active.

Actually, if you have suggestions that could enhance the WiinUPro's features, go to the thread that I linked before and post about it. The guy working on it will certainly appreciate it. He's working on Xinput support now.. (they had problems with vJoy - X360CE compatibility ...maybe MotioninJoy would be useful to them? ..never used it so I can't tell..)

He also uses vJoy, so you probably woldn't need PPjoy anymore.
 

shadow1w2

Still here.
Member
Joined
Mar 16, 2004
Messages
1,713
Trophies
2
XP
1,804
Country
United States
Thanks but I needed it for the Classic Controller ...and since I already have the scrips for GloverPie done, there's no need to get WiiMouse just for using wiimotes (for now at least)

Edit:
actually, I'll try this ..hope it works

Edit2:
aaannd, it worked! ^_^ I'm happy to know that after the apparent death of GlovePie, I still can have fun configuring wii controllers on my PC. Cool

Ya glad we have some alternatives out there.
Wish Glovepie went open source, oh well.
Also WiiMouse works with the classic controller.
Not so much the WiiU pro controller

That program seems nice though I'll give it a try too.
Though once it has Xbox360 or any joystick support (hopefully like MotionJoy has I hate the ones that don't turn off)
Would love to emulate IR pointing as a joystick again.
PPJoy and another virtual joystick driver never seems to work for me anymore so would love to do that again.
Using pointing as a mouse sorta works though just not quite as reliable.

Anyway glad you found something that works.
 

halen

Well-Known Member
Member
Joined
Oct 19, 2010
Messages
135
Trophies
0
XP
200
Country
Brazil
Help me!!! I try to use Wiisx with my 4tb HDD but is not working. I used SD Card and USB Pen Drive and i dont have problems but with my HDD is not working.

wIISX.jpg
 

burnburnrocket

Member
Newcomer
Joined
Aug 31, 2014
Messages
7
Trophies
0
Age
39
XP
66
Country
United States
The Madcatz WiiU Tekken Stick reports itself as a controller classic, but is broken in all the same ways listed here. I tested with the genplus zip and things seem to be working great with the existing patched.

Any chance of getting an updated Genplus GX? Ekeke is on version 1.7.4 now. I also wanted to see if it'd be possible for to get a Retroarch build too, if someone's willing. *crosses fingers for fightstick + Marvel vs Capcom* :)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    Had a ton of bugs and often crashed. It even didn't support DOS compatibility with older games. :feelsbadman:
  • SylverReZ @ SylverReZ:
    I only grew up with Windows XP because I was lucky.
  • RedColoredStars @ RedColoredStars:
    I downloaded XP on dialup when it came out. Overnights for like a week. cuz I couldn't tie up the phone line during the day. It was so awesome and worked so great going from ME to XP.
  • K3Nv2 @ K3Nv2:
    Vga pins were a dick
  • K3Nv2 @ K3Nv2:
    I kind of want down a large pizza at 10am then crash out
  • ZeroT21 @ ZeroT21:
    Having pizza all day? done it
  • K3Nv2 @ K3Nv2:
    Nah pizza hut open at 10:30
  • ZeroT21 @ ZeroT21:
    just buy a stack of pizza and keep the rest you don't need yet frozen
  • K3Nv2 @ K3Nv2:
    Or buy frozen pizza
  • ZeroT21 @ ZeroT21:
    I buy the regular kind, not the frozen stuff
  • ZeroT21 @ ZeroT21:
    supermarket pizza is ass
  • K3Nv2 @ K3Nv2:
    x65 would just yell at me
  • ZeroT21 @ ZeroT21:
    sounds ok, he didn't pull a gun out ,so...
  • K3Nv2 @ K3Nv2:
    $12 large any style pizza deal
  • K3Nv2 @ K3Nv2:
    Each bite is a $1 well spent
  • SylverReZ @ SylverReZ:
    @ZeroT21, Agreed. I hate oven pizza, only from pizza place.
    +1
  • K3Nv2 @ K3Nv2:
    Nah I can still go for totinos
  • RedColoredStars @ RedColoredStars:
    i like totinos party pizzas. lol.
  • RedColoredStars @ RedColoredStars:
    the cracker-like crust is great on those
  • RedColoredStars @ RedColoredStars:
    My neighbor and I are going to make this next month....
  • SylverReZ @ SylverReZ:
    Tiger crust is great.
  • K3Nv2 @ K3Nv2:
    I'm beefing with a neighbor currently each time I ask him for help with something he makes bs excuses then ignores my calls text but seems to randomly speak when I'm done with the project after doing things to help him
  • RedColoredStars @ RedColoredStars:
    DiGiorno Crispy Pan Pizza tasted pretty dang close to Pizza hut pan pizza, but Im not sure if theyve been discontinued or not. Havent seen them locally for a couple of months now.
  • RedColoredStars @ RedColoredStars:
    The croissant crust is still available though, but not quite as good imo.
    RedColoredStars @ RedColoredStars: The croissant crust is still available though, but not quite as good imo.