Jump to content


  • Please log in to reply

Latest emulator and libogc with 3rd party classic controller

(Go to first unread post)
math_bonn Post #31 Posted 09 May 2010 - 10:28 PM

    Newbie


  • Group: Newcomers
  • Posts: 7
  • Member No.: 253,020
  • Joined: 07-May 10
  • Location: Canada

  •  

For me, the boot.elf from jcarloz didn't work...



matguitarist Post #32 Posted 10 May 2010 - 01:16 AM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 458
  • Member No.: 138,755
  • Joined: 14-October 08
  • Location: Canada

  •  

Do you have a deal extreme controller ??

Did you run the program to find your ID ?


math_bonn Post #33 Posted 10 May 2010 - 02:27 AM

    Newbie


  • Group: Newcomers
  • Posts: 7
  • Member No.: 253,020
  • Joined: 07-May 10
  • Location: Canada

  •  

The link is dead for the wii-controller-test.zip...


bluebowser31 Post #34 Posted 10 May 2010 - 03:43 AM

    GBAtemp Regular

  • PipPipPip

  • Group: Members
  • Posts: 248
  • Member No.: 251,845
  • Joined: 22-April 10

  •  

hope all this stuff is worth it, cus i downloaded all of it, and dont know what half of it is xD


matguitarist Post #35 Posted 10 May 2010 - 04:09 AM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 458
  • Member No.: 138,755
  • Joined: 14-October 08
  • Location: Canada

  •  

LOL

snes9xgx ... what could it be ???
Fceugx = nes
Vbagx = game boy
Wii64 ... i really don't know wink.gif
pcsx = playstation 1
genplus = genesis
smsplus = sega master system
desmumewii = Nintendo DS

Wiimc = Wii Media Center







matguitarist Post #36 Posted 10 May 2010 - 04:15 AM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 458
  • Member No.: 138,755
  • Joined: 14-October 08
  • Location: Canada

  •  

QUOTE(math_bonn @ May 9 2010, 09:27 PM) <{POST_SNAPBACK}>
The link is dead for the wii-controller-test.zip...



Wii Classic controller Test ID
Tell Mii My ID smile.gif

Edited by matguitarist, 11 May 2010 - 05:02 PM.


OuKKaN Post #37 Posted 10 May 2010 - 04:17 PM

    Member

  • Pip

  • Group: Newcomers
  • Posts: 19
  • Member No.: 251,391
  • Joined: 16-April 10

  •  

A few weeks ago i compiled a hello world to get the id via a modification in the io.c, and i always got as the ID the number 0, at first i thought i compiled it wrong, but now i use yours and it still gives me ID=0. The controller works perfectly in VC and WIIWARE. Anyone have a clue?

PS: Sorry for my english.


matguitarist Post #38 Posted 10 May 2010 - 05:31 PM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 458
  • Member No.: 138,755
  • Joined: 14-October 08
  • Location: Canada

  •  

Did you try jcarloz one compiled for a deal extreme ( link )

I really don't understand why you always get 0 for ID ... i'll continu looking for a fix.


OuKKaN Post #39 Posted 10 May 2010 - 06:24 PM

    Member

  • Pip

  • Group: Newcomers
  • Posts: 19
  • Member No.: 251,391
  • Joined: 16-April 10

  •  

QUOTE(matguitarist @ May 10 2010, 05:31 PM) <{POST_SNAPBACK}>
Did you try jcarloz one compiled for a deal extreme ( link )

I really don't understand why you always get 0 for ID ... i'll continu looking for a fix.


Yes i've tried that one, but with no results. The controller i have is an imitation of the classic controller pro, specifically this one http://www.dealextreme.com/details.dx/sku.32488

Thanks for your help.


matguitarist Post #40 Posted 10 May 2010 - 06:34 PM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 458
  • Member No.: 138,755
  • Joined: 14-October 08
  • Location: Canada

  •  

Have you try asking deal extreme for the ID of your controller maybe they could told us ....


OuKKaN Post #41 Posted 10 May 2010 - 09:28 PM

    Member

  • Pip

  • Group: Newcomers
  • Posts: 19
  • Member No.: 251,391
  • Joined: 16-April 10

  •  

QUOTE(matguitarist @ May 10 2010, 06:34 PM) <{POST_SNAPBACK}>
Have you try asking deal extreme for the ID of your controller maybe they could told us ....


I'm going to ask them, i have nothing to lose. Thanks


math_bonn Post #42 Posted 11 May 2010 - 02:53 AM

    Newbie


  • Group: Newcomers
  • Posts: 7
  • Member No.: 253,020
  • Joined: 07-May 10
  • Location: Canada

  •  

Thank you matguitarist, i used the test program and my id is: 93949400

i bought this controller from dealextreme:
http://www.dealextreme.com/details.dx/sku.28931

do you think there's a way of using it???

Thanks!


OuKKaN Post #43 Posted 11 May 2010 - 04:16 AM

    Member

  • Pip

  • Group: Newcomers
  • Posts: 19
  • Member No.: 251,391
  • Joined: 16-April 10

  •  

QUOTE(math_bonn @ May 11 2010, 02:53 AM) <{POST_SNAPBACK}>
Thank you matguitarist, i used the test program and my id is: 93949400

i bought this controller from dealextreme:
http://www.dealextreme.com/details.dx/sku.28931

do you think there's a way of using it???

Thanks!


If you have the id you centanly can use it, in the file wiiuse_internal.h modify #define EXP_ID_CODE_CLASSIC_CONTROLLER 0x93949400.
Then edit the file classic.c and delete the WIIUSE_DEBUG("Classic.. to return 0; part.
Finally compile libogc and then compile the homebrew you want to use.
(Information obtained from a post by ic3guy in another forum)

EDIT: I compiled the snes9xgx emulator with your classic controller id, it "should" work (i wrote should between quotes 'cause i'm an extreme amateur at this stuff), so let me know if it solved your problem.

MEDIAFIRE: http://www.mediafire.com/?ujnujyd1zjw
MEGAUPLOAD: http://www.megaupload.com/?d=02ZR3YZB
Good luck.

Edited by OuKKaN, 11 May 2010 - 07:09 AM.


Jacobeian Post #44 Posted 11 May 2010 - 07:37 AM

    GBAtemp Advance Maniac


  • Group: Members
  • Posts: 1,669
  • Member No.: 125,246
  • Joined: 15-May 08

  •  

I don't get it: wouldn't it be simpler to always initialize the classic controller by default when the ID is unrecognized ? This would prevent updating libogc each time a new ID is found, especially when manufacturers can use whatever ID they want.

in wiiuse/io.c

instead of:

CODE
            switch(id) {
                case EXP_ID_CODE_NUNCHUK:
                    if(!nunchuk_handshake(wm,&wm->exp.nunchuk,data,len)) return;
                    break;
                case EXP_ID_CODE_CLASSIC_CONTROLLER:
                case EXP_ID_CODE_CLASSIC_CONTROLLER_NYKOWING:
                case EXP_ID_CODE_CLASSIC_CONTROLLER_NYKOWING2:
                case EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC:
                case EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC2:
                case EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC3:
                    if(!classic_ctrl_handshake(wm,&wm->exp.classic,data,len)) return;
                    break;
                case EXP_ID_CODE_GUITAR:
                    if(!guitar_hero_3_handshake(wm,&wm->exp.gh3,data,len)) return;
                    break;
                case EXP_ID_CODE_WIIBOARD:
                    if(!wii_board_handshake(wm,&wm->exp.wb,data,len)) return;
                    break;
                default:
                    WIIMOTE_DISABLE_STATE(wm,WIIMOTE_STATE_EXP_HANDSHAKE);
                    WIIMOTE_ENABLE_STATE(wm,WIIMOTE_STATE_EXP_FAILED);
                    __lwp_wkspace_free(data);
                    wiiuse_status(wm,NULL);
                    return;
            }


use


CODE
            switch(id) {
                case EXP_ID_CODE_NUNCHUK:
                    if(!nunchuk_handshake(wm,&wm->exp.nunchuk,data,len)) return;
                    break;
                case EXP_ID_CODE_GUITAR:
                    if(!guitar_hero_3_handshake(wm,&wm->exp.gh3,data,len)) return;
                    break;
                case EXP_ID_CODE_WIIBOARD:
                    if(!wii_board_handshake(wm,&wm->exp.wb,data,len)) return;
                    break;
                default:
                    if(!classic_ctrl_handshake(wm,&wm->exp.classic,data,len))
                    {
                        WIIMOTE_DISABLE_STATE(wm,WIIMOTE_STATE_EXP_HANDSHAKE);
                        WIIMOTE_ENABLE_STATE(wm,WIIMOTE_STATE_EXP_FAILED);
                        __lwp_wkspace_free(data);
                        wiiuse_status(wm,NULL);
                        return;
                    }
                    break;
            }


?

PS: it also seems to me that "__lwp_wkspace_free" should also be use whenever the handshake functions (nunchuk, guitar, wiiboard) return an error otherwise it return from the function without freeing previously allocated memory.

Edited by Jacobeian, 11 May 2010 - 07:42 AM.


matguitarist Post #45 Posted 12 May 2010 - 12:53 PM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 458
  • Member No.: 138,755
  • Joined: 14-October 08
  • Location: Canada

  •  

I think you idea is good but it'll always use classis controlller if nothing is detect ... you can't use 3rd party nunchuk

Try this OuKKaN










Users browsing this topic

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users