Homebrew Latest emulator and libogc with 3rd party classic controller

  • Thread starter Thread starter matguitarist
  • Start date Start date
  • Views Views 226,392
  • Replies Replies 788
  • Likes Likes 2
Help me please! My classic control its not working in the snesx9 gx. I try to make this patch but my english is not so good. Give me the link of the sne9x gx pached please!
 
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.
 
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;  */
 
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
 
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...
 
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
...

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.
 
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
 
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.
 
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.
 
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.
 
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
 
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