Homebrew Latest emulator and libogc with 3rd party classic controller

OuKKaN

Member
Newcomer
Joined
Apr 16, 2010
Messages
19
Trophies
0
XP
29
Country
Cote d'Ivoire
math_bonn said:
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.
 

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
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.
 

OuKKaN

Member
Newcomer
Joined
Apr 16, 2010
Messages
19
Trophies
0
XP
29
Country
Cote d'Ivoire
matguitarist said:
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

OMG!!!!! IT WORKED!!!!!

I can't thank you enough, i was so excited when i pressed a button and got a response from the emulator. Again THANK YOU VERY MUCH!!!!

PS: Can you please tell me how you did it? What ID did you add to the code?.
 

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
matguitarist said:
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

well, such 3rd party nunchuk would not have worked before anyway (if the id is not recognized, expansion is disabled) so you don't lose anything.
It's just that it seems there is more unknown classic controller out there than anything else so it's a good guess that if the ID is unknown, it's a 3rd-party classic controller
 

matguitarist

Well-Known Member
OP
Member
Joined
Oct 14, 2008
Messages
458
Trophies
0
Location
Canada
XP
147
Country
Canada
Thank's Jacobeian the solution was so simple .... lol

It's a lot less work to do than add every ID
smile.gif


Great to see it work OuKKaN !

i'll update all the emulator soon with this fix

Libogc link has been updated for those who want it
 

OuKKaN

Member
Newcomer
Joined
Apr 16, 2010
Messages
19
Trophies
0
XP
29
Country
Cote d'Ivoire
Thanks matguitarist and Jacobeian, the snes9xgx worked esplendid (except the analog sticks don't work but i really don't care cause NES, SNES and VBA don't use analog), i tried to compile VBAGX and it workd but when i try to enter the menu by pressing home it crashes and says reloading in 8 seconds. I will try to compile it again with the libogc matguitarist provided. I'm pretty sure i did something wrong because the snes emulator matguitarist compiled worked fine without crashes.

EDIT: Yes it was my mistake because the vbagx compiled using the libogc matguitarrist provided worked great just like the snes one.
 

matguitarist

Well-Known Member
OP
Member
Joined
Oct 14, 2008
Messages
458
Trophies
0
Location
Canada
XP
147
Country
Canada
I have almost finish updating emulator with the fix ! If anyone got a problem please report it.

I compiled all emu with the libogc i send you OUKKaN it's the more up-to-date portlibs included you'll find
smile.gif
you're suppose to compile almost any homebrew with this one. If anybody have more lib to include just tell me i'll add to my libogc.
 

kehkou

does what Nintendon't
Member
Joined
Dec 19, 2009
Messages
798
Trophies
1
Location
The Duke City
XP
1,094
Country
United States
@OuKKaN:
glad to hear you got your controller working. a friend of mine had a similar issue; nothing he tried on forums
(like the henkp fix, tantric fix and such). it was a clone of the classic he got online, right down to the Wii logo.
ive heard alot about people with 3rd-party classic controllers and official Pro's having trouble getting the joysticks to function. im guessing its a common issue with wiiuse/libOGC and the 3rd-party fixes (but not with the original classic).
 

matguitarist

Well-Known Member
OP
Member
Joined
Oct 14, 2008
Messages
458
Trophies
0
Location
Canada
XP
147
Country
Canada
Emulator are now update with the new fix

Kehkou, just use the new one it's fix for any classic controller

ID is no more need just use my libogc to compile any homebrew and it will work
 

OuKKaN

Member
Newcomer
Joined
Apr 16, 2010
Messages
19
Trophies
0
XP
29
Country
Cote d'Ivoire
kehkou said:
@OuKKaN:
glad to hear you got your controller working. a friend of mine had a similar issue; nothing he tried on forums
(like the henkp fix, tantric fix and such). it was a clone of the classic he got online, right down to the Wii logo.
ive heard alot about people with 3rd-party classic controllers and official Pro's having trouble getting the joysticks to function. im guessing its a common issue with wiiuse/libOGC and the 3rd-party fixes (but not with the original classic).

Yes but the fix matguitarist and Jacobeian did work for all classic controller, It's an universal fix.
 

kehkou

does what Nintendon't
Member
Joined
Dec 19, 2009
Messages
798
Trophies
1
Location
The Duke City
XP
1,094
Country
United States
yes. the controller works with all the digital buttons but get no response from the Joysticks. its not a problem with the older console emu's, but on wii64, you can see why they are essential.
 

OuKKaN

Member
Newcomer
Joined
Apr 16, 2010
Messages
19
Trophies
0
XP
29
Country
Cote d'Ivoire
math_bonn said:
Can someone explain to me how to compile an emulator please? Or give me a tutorial...

Thank you!

I'll try to make myself understandable (hablo español)
1.- Download devkitpro and make sure in the installation menu you select devkitPPC.
2.- Go to the folder you choose to install devkitpro and paste the folders libogc and portlibs from the file matguitarrist provided in the first post of this thread http://www.megaupload.com/?d=03TMXAO5
3.-Download and install TortoiseSVN http://www.megaupload.com/?d=B380JZ2U

Lets use Snes9xgx as an example to compile.

Create a folder and name it whatever you want then right click on it and from the contextual menu select TortoiseSVN --> Create repository here
then again right click on it and choose SVN Checkout... It will open a screen then you have to write the url of the repository, for snes9xgx it's "http://snes9x-gx.googlecode.com/svn/trunk/" (again without the quotes), and click OK, it will download the source.

When the download process is complete browse the content and copy the folder called snes9x-gx, create the following folder c:\project\ and in that folder paste the previously copied folder.

Now run devkitpro/programmers notepad from the start menu, and click on File --> Open, then go to c:\project\snes9x-gx\ and choose Makefile

Then choose Tools from the menu bar, and click Make, when the process is complete go to C:\project\snes9x-gx\executables and copy the .dol to your SD or USB depending of what you use to run homebrew in the following path X:\apps\snes9x-gx\, (remember to rename it to boot.dol), if you want to make it look better copy the files "icon.png" and "meta.xml" from C:\project\snes9x-gx\hbc\ to the X:\apps\snes9x-gx\ folder.


If anyone understood me please write it better and without using the same words again and again.

PS: Probably one more steps are unnecesary but that is how i compile my emulators and they work.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-