![]() |
Forum Index : Microcontroller and PC projects : Different Wii controllers
Author | Message | ||||
capsikin Guru ![]() Joined: 30/06/2020 Location: AustraliaPosts: 341 |
From the CMM2: V5.05.04RC1 thread: Is this still the case in the release version? If so, it would be good to mention in the manual. Something like: "The firmware checks for the existence of the Nunchuk on open and will throw error if not found." [continue] "If a classic controller is plugged in instead, an error will not be thrown, instead you can check the ID code with NUNCHUK(T, channel)" (and similarly for the classic controller if a nunchuk is plugged in instead) Code examples Autodetection between the two would be a good code example, for anyone who's making code examples (and maybe has both controllers). NES classic/SNES classic controllers The controllers for the NES Classic Edition and Super NES Classic Edition also use i2c and the same physical interface. http://wiibrew.org/wiki/Wiimote/Extension_Controllers#List_of_extension_controllers suggests that the SNES classic/mini controller at least, may be similar to the classic controller, but with a different ID code same as the classic controller pro. It would be interesting to see if you can use the classic controller code with these. |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
I think he classic and nunchuk use the same initialization code. MMBasic has to remember which controller you opened as because there are different values available. It is simple to test for yourself. This is with a Classic controller connected to the front port: WII CLASSIC OPEN ' PRINT "opened" PRINT HEX$(CLASSIC(T, 3)) WII CLASSIC CLOSE PRINT "closed" WII NUNCHUK OPEN ' PRINT "opened" PRINT HEX$(CLASSIC(T, 3)) WII NUNCHUK CLOSE opened A4200101 closed opened [12] Error: Not open So, yes you do have to check to see if you have plugged in what is expected. If you change the second part of the above code WII NUNCHUK OPEN ' PRINT "opened" PRINT HEX$(nunchuk(T, 3)) WII NUNCHUK CLOSE The HEX$(nunchuk(T, 3)) will return the Classic ID without any errors so you can easily program against users doing the wrong thing. Open as Nunchuk and test for Nunchuk ID. If not, either close and reopen as Classic or simply tell the user to "get it fixed". If the SNES classic/mini controller replies with the same data as the Classic does, the ID code shouldn't matter. I have created a PS/2 mouse to Classic converter and used the Classic ID so software doesn't get upset. I made sure (or at least tried to) that what I send is valid for the Classic. Jim VK7JH MMedit |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |