Hacking Homebrew wiicalib: calibrate your Classic Controller (Pro)

  • Thread starter Thread starter mudrik
  • Start date Start date
  • Views Views 413
  • Replies Replies 3
  • Likes Likes 5

mudrik

Well-Known Member
Newcomer
Joined
Nov 18, 2022
Messages
66
Reaction score
120
Trophies
1
Age
33
XP
699
Country
Turkey
Hi all!
I just released a super alpha (and buggy) version of a tool which can be used to calibrate the sticks of WIi classic controllers (including the Pro models) and store the calibration data into the controller's EEPROM. Sounds good? Well, unfortunately it's not as useful as it sounds, because according to my tests the calibration is only used by homebrew programs. :-(
As far as I can tell (but I tested only two games, PES2013 and Super Smash Bros Brawl), original Wii software completely ignores the calibration data, and only infers the stick rest position at the moment that the controller is first connected; the range of the stick is not calibrated in any way. Of course, it may be that some games do use the calibration data, but I have no idea how to figure out which do. That's also why I'm a bit demotivated and I'm releasing the program here, as an unpolished version. If you find some use for it let me know, I'll try to dedicate some more time to it if needed.

You can get it from here: https://github.com/mardy/wiicalib/releases/tag/0.1

Usage:
- Connect a Classic Controller to the wiimote
- Start the application
- Press 1 + 2 on the wiimote
- Once the wiimote connects, you can press A to see the existing 16 bytes of the calibration area (on Pro controllers this is usually all zeroes)
- Press B to initiate the calibration and disconnect/reconnect the controller from the wiimote
- Move the sticks around in circles a few times, you'll see the numbers on the screen showing the maximum and minimum extents registered
- Press X to store the calibration data into the controller
- Since the previous step can randomly fail, press A after it claims to be completed to see the 16 bytes: if the last two bytes are "0x00 0x00", it means the writing failed, so redo the write (press X again, then A) untill you see that at least one of the two bytes is not zero.
- Disconnect and reconnect the controller to the wiimote, and test the sticks: ideally now their extreme positions will be 0 and 255 (or rather close to these). Done!

All I can say is that the calibration has a noticeable effect on homebrew: I started up WiiFlow and connected two controllers, one calibrated, the other not calibrated, and the cursor of calibrated one moves much faster. :-)
 
It's writable?! I mean, it would have to be written somehow at the factory, but I'm surprised this works through a Wii Remote.

Yes, it's writable. You can also use the wmgui program from https://github.com/Wii-Linux/cwiid to write to the expansion's memory. The problem is that for some reason writes to the expansion's memory seem to be able to write 7 bytes at most, so if you need to write more bytes, you have to repeat the operation at a different offset a few times.

And I forgot to say that a Chinese replica of a Classic Controller Pro that I got from aliexpress does not have any memory at all, so you need to have an original controller to test this.

Update: I just found this improved linux driver, that claims to be able to write to the eeprom too (I haven't tested it yet, though): https://github.com/dkosmari/hid-wiimote-plus
 
Last edited by mudrik,
  • Like
Reactions: Disorarara
Hi all!
I just released a super alpha (and buggy) version of a tool which can be used to calibrate the sticks of WIi classic controllers (including the Pro models) and store the calibration data into the controller's EEPROM. Sounds good? Well, unfortunately it's not as useful as it sounds, because according to my tests the calibration is only used by homebrew programs. :-(
As far as I can tell (but I tested only two games, PES2013 and Super Smash Bros Brawl), original Wii software completely ignores the calibration data, and only infers the stick rest position at the moment that the controller is first connected; the range of the stick is not calibrated in any way. Of course, it may be that some games do use the calibration data, but I have no idea how to figure out which do. That's also why I'm a bit demotivated and I'm releasing the program here, as an unpolished version. If you find some use for it let me know, I'll try to dedicate some more time to it if needed.

You can get it from here: https://github.com/mardy/wiicalib/releases/tag/0.1

Usage:
- Connect a Classic Controller to the wiimote
- Start the application
- Press 1 + 2 on the wiimote
- Once the wiimote connects, you can press A to see the existing 16 bytes of the calibration area (on Pro controllers this is usually all zeroes)
- Press B to initiate the calibration and disconnect/reconnect the controller from the wiimote
- Move the sticks around in circles a few times, you'll see the numbers on the screen showing the maximum and minimum extents registered
- Press X to store the calibration data into the controller
- Since the previous step can randomly fail, press A after it claims to be completed to see the 16 bytes: if the last two bytes are "0x00 0x00", it means the writing failed, so redo the write (press X again, then A) untill you see that at least one of the two bytes is not zero.
- Disconnect and reconnect the controller to the wiimote, and test the sticks: ideally now their extreme positions will be 0 and 255 (or rather close to these). Done!

All I can say is that the calibration has a noticeable effect on homebrew: I started up WiiFlow and connected two controllers, one calibrated, the other not calibrated, and the cursor of calibrated one moves much faster. :-)

Even if it's only homebrew that's still quite a nice quality of life improvement! There are quite a few homebrew ports of games and emulators that would benefit quite nicely from better calibrated sticks, particularly PS1 games with analog controls on.
 
  • Like
Reactions: mudrik and JorgeV

Site & Scene News

Popular threads in this forum