3rd Party Wii Classic Controllers - Possible Fix
Many third-party controllers do not work with the NES Classic but work with the Wii Virtual Console
I believe that commenting out the check in clovercon.c will enable these controllers in clovercon.c these lines can be commented out
332 if (con_info_data[5] != 1) { 333 ERR("unsupported controller id %i", (int)con_info_data[5]); 334 ret = -EIO; 335 goto err; 336 }
There is a possibility that the following check will need to commented out as well and the default case moved up.
603 switch(id->driver_data) { 604 case CLASSIC_ID: 605 DBG("probing classic controller"); 606 break; 607 default: 608 ERR("unknown id: %lu\n", id->driver_data); 609 return -EINVAL;
to
604 switch (id->driver_data) { 605 case CLASSIC_ID: 606 default: 607 DBG("probing classic controller"); 608 break; 609 //default: 610 // ERR("unknown id: %lu\n", id->driver_data); 611 // return -EINVAL; 612 }
I do not have the environment set up to rebuild the clovercon.ko file but would be happy to test my theory if it could be build for me.
Thanks,
Which third parties don't work?
What about the premium Hori branded controllers?
I have two no-name Wii Classic Controllers that work with the Wii but not the NES classic. I'm fairly certain that it's the same issue that caused the recall of the original version of the EMiO Edge gamepad and Joystick. So, it's not an issue that there are not controllers out there that work, the ones that do cost $25-$30 and the ones that do not cost $5-$10 a piece, (Or free if you already had them for the Wii) From the code, it looks like the NES classic sends a command via I2C and expects a 1, if it doesn't get it, it doesn't even try to connect. My guess is the Wii and Wii U controllers never checked the bit, so third party controllers didn't know what the correct "passcode" was as it was not a requirement for working before the NES classic.
This code just checks that plugged in device is classic controller. Seems like it will not resolve problem. I'll do some tests with https://github.com/ClusterM/nes2wii soon.
I too got cheep controllers. I didn't know they wouldn't work considering they work on the Wii.
I still feel like the lines 332 - 336 will fix the issue. It's in the setup routine and keeps the NES from talking to the controller if it feels that it's an unsupported controller based on the identify information the controller provides. As these are copies of the correct controller, I feel that they would work by tricking the NES into accepting them as appropriate controllers. I'll try to set up a cross compiler in Linux to see if I can recompile the clovercon.ko driver.
Any testing?
I don't think we are getting any traction on this.
Have not tested yet, I was busy. Will test soon.
Please try this clovercon driver mod: http://clusterrr.com/temp/clovercon2.hmod If it will not work try this: http://clusterrr.com/temp/clovercon3.hmod
Sadly, neither 2 or 3 fixed the 3rd party controller issue.
ClusterM, Thank you for taking the time to compile those.
It's weird. I can't find any protection code. I need to find some non-original controller for testing.
I was doing a bit of reading on this lovely website http://wiibrew.org/wiki/Wiimote/Extension_Controllers and comparing it to what the clovercon driver is doing in the clovercon_setup on line 300.
First it writes 55 to address 0xf0 then it writes 00 to address 0xfb This is supposed to disable the encryption and send data without encryption, so that's good
Then the clovercon driver writes DATA_FORMAT (which is 3) to address 0xfe, which is part of the 6 byte controller identification block that is read at line 318 of the code.
Two possibilities come to mind, First, the cheap 3rd party controllers do not have read/write capabilities there, so the controller ignores the write to 0xfe and reports back whatever it originally had in that memory location. If this is the case, commenting out the error check found in in lines 327 through 330 ("failed to set data format") may allow the controller to be read by the NES.
Or Secondly, the NES is using the DATA_FORMAT variable to set the format to one not used by the Wii. If this is the case, the 3rd party controllers may not have that format in it's programming and all of the data being sent to the NES is in an incorrect format. If this is the case, there may not be a way to fix the 3rd party controllers.
Of course, I could just be wrong all together.
You are right. Seems like data format is the cause of the problem. I'll try to change data format to 1 and change polling function to parse this format. I'll share mod soon (today, I think).
Also it's possible that 3rd party controllers can't pass noice check. NESC reading 21 bytes instead of 8. All additional bytes must be zeros to pass check.
Please test this mods:
- Data format #1: http://clusterrr.com/temp/clovercon_data-format-1.hmod
- Data format auto detection: http://clusterrr.com/temp/clovercon_data-format-auto.hmod
- Data format auto detection + alternative noise detection: http://clusterrr.com/temp/clovercon_data-format-auto_alt-denoise.hmod
- Data format auto detection + disabled noise detection: http://clusterrr.com/temp/clovercon_data-format-auto_no-denoise.hmod
ClusterM, My hat's off to you sir, here are the results of my tests:
-
Data format 1 3rd party Wii Classic – Not working Nintendo NES Controller – Works NES 3rd Party controller (EMiO Gamepad Edge V2) – Previously works under standard but now always goes left
-
Data Format Auto 3rd party Wii Classic – Not working Nintendo NES Controller – Works NES 3rd Party controller (EMiO V2) – Works
-
Data Format Auto – alt denoise 3rd party Wii Classic – Works Nintendo NES Controller – Works NES 3rd Party controller (EMiO V2) – Works
-
Data Format Auto – no-denoise 3rd party Wii Classic – Works Nintendo NES Controller – Works NES 3rd Party controller (EMiO V2) – Works
Both the 3rd and the 4th function great with all the controllers that I have. Thank you!
As a side note, synchronizing the game ROMS blows away the updated clovercon hmod on the NES classic and I had to re-install the user hmod afterwards.
Yes! Thank you! You can replace clovercon.hmod into mods/hmods folder. Or just wait for new release, it will be in a few days.
so do we put these in the user_mod folder or hmod folder and rename the file ?
For permanent usage it's better to put it into hmods and rename.