Ticket #106 (new defect)

Opened 3 years ago

Last modified 3 years ago

Third party classic controller not detected and axis data are a little off.

Reported by: thomas Owned by: dsmith
Priority: major Milestone: Version 0.6.00
Component: libcwiid Version: 0.6.00
Keywords: classic controller Cc:

Description

I bought a third party classic controller from dealextreme.com which works fine on my Wii, but it is detected as "Unknown extension" by libcwiid. It has id 0x2D instead of 0x01.

I made a patch for libcwiid from cwiid-0.6.00 which takes care of the problem.

Attachments

cwiid-0.6.00-classic_fake.patch Download (1.0 KB) - added by thomas 3 years ago.
Third party classic controller patch for libcwiid-0.6.00
cwiid-0.6.00-classic_fake-with_dirty_axis_tweaks.patch Download (2.1 KB) - added by thomas 3 years ago.
Third party classic controller patch for original libcwiid-0.6.00 with dirty axis tweaks added.

Change History

Changed 3 years ago by thomas

Third party classic controller patch for libcwiid-0.6.00

in reply to: ↑ description ; follow-up: ↓ 2   Changed 3 years ago by thomas

  • summary changed from Third party classic controller not detected to Third party classic controller not detected and axis data are a little off.

I also noticed that the axis data are a little off. I don't know if it is because of this being a cheap third party controller, or if there are some other reason.

The left analog stick should report x and y axis data from 0 to 63, while the right should report from 0 to 31.

My left analog stick reported y axis just fine, but the x axis ranged from 7 to 63, preventing me from running at full speed to the left at certain games. Also, the right stick x axis was off center, to the right, so certain games thought that I was always holding the right stick a little bit to the right, as well as it reported 1-31 instead of 0-31.

In addition, the left shoulder button reported 0-27 instead of 0-31.

I wrote some dirty hacks to get around this problem.

I would only recommend applying this second patch if you have the exact same problem (test it with wmdemo), as this patch would probably mess up the data if your problem should differ from mine.

Changed 3 years ago by thomas

Third party classic controller patch for original libcwiid-0.6.00 with dirty axis tweaks added.

in reply to: ↑ 1   Changed 3 years ago by thomas

I forgot to mention that my left stick rests at position 30,30, and my right stick rests at 19,15. My second patch tweaks so they rest at 30,30 and 15,15, while reporting 0-63,0-63 and 0-31,0-31. The patch with the axis tweaks would only be usefull if this is the same for you too.

I also noticed that the analog stick on my original nintendo nunchuck is reporting really narrow data, making me walk slowly in all games.

I inserted the following in libcwiid/process.c at line 199, which made it much better.

nunchuk_mesg->stick[CWIID_X] = (nunchuk_mesg->stick[CWIID_X] - 34) * 1.2879;
nunchuk_mesg->stick[CWIID_Y] = (nunchuk_mesg->stick[CWIID_Y] - 31) * 1.3281;

I'm starting to worry why it is like that in the first place... (PS: Sorry for not creating a .patch for the wiimote data above:)

Note: See TracTickets for help on using tickets.