HID Wiimote 0.3.0.2

Recently some users were asking about compatibility and related issues. However it took some time until one was finally dropping a name and i figured all issue were about the same game. Just to make things quick in the future, if you have any game/tool/program that HID Wiimote does not work with, state its name along with the issue in detail. That way i can specifically look into it. If the particular piece of software is either still in active development or open source, there is a good chance i am able to fix it.

So this update is mainly for Clone Hero and Rewired, along with a minor fix for some rare Nunchuk regression. The update is available on the HID Wiimote page.

Extension Subtypes

Extensions for the Wii Remotes are using a six byte long identifier in a format of 0xXXXX A420 ZZZZ. The ZZZZ part is the extension type, as in class of extension. It is different for all the various extensions (Nunchuk, Classic Controller (Pro), Balance Board, Guitar Hero Accessory). The XXXX part is for most extensions just 0x0000 and does not need any special attention. However the Classic Controller and Classic Controller Pro are using the same extension type identifier (the ZZZZ part) and differ in their XXXX part. Classic Controller are using 0x0000, whereas the Classic Controller Pro reports 0x0100. So the XXXX can be viewed as subtype identifier, to distinguish between the normal and Pro variant. Another example are the Guitar Hero accessories, as they’re all using the same extension type identifier of 0x0103. Their subtype is different though (Guitars 0x0000, Drum Sets 0x0100 and Turn Tables 0x0300).

With 0.3.0.0 i changed the extension identification process. For the bumper and trigger mapping the driver needs distinguish between the Classic Controller and Pro variant. The non-Pro variant  has some analog triggers and therefore needs some special handling. So the identification process was changed to check against a composite identifier composed of the extension type and subtype parts. However one user reported a regression, that his Nunchuck doesn’t work anymore (it works in pre 0.3.0.0 and other Nunchucks work fine in 0.3.0.0+). It seems some other extensions are also using the subtype identifier for purposes that are unknown. In order to fix the regression, the identification process was reverted back. An explicit subtype check is only used for the Classic Controller (Pro) extension type.

Product and Serial String

As mentioned users were reporting that the driver wasn’t working with the game Clone Hero. I tried it myself and indeed for some reason it wasn’t working at all. You can tell by its directory layout that it is obviously made with Unity. In the past i already tested compatibility with Unity and verified it. So that was weird. After looking through the game folder i found some DLLs named Rewired. Rewired is a third-party Unity package for extensive input support. It adds various controllers, native APIs and their support, as well as button remapping tools.

Rewired provides a Trial. After downloading and doing some tests, its DirectInput mode was working fine. However RawInput was not at all, as in the controller didn’t even show up. A simple RawInput implementation was working fine though. I contacted the developer of Rewired about any special handling or filtering done by the package. They did some tests themselves and reported back quite quickly, so props for them.

The Windows HID API provides methods to retrieve a Product, Manufacturer and Serial string from the device. Apparently the default HidBth minidriver simply reports back the Bluetooth address as serial number. This can then be used to retrieve additional information about the actual Bluetooth device node. Rewired relies on that particular behavior and therefore was ignoring the controllers. The implementation of those strings were on the feature list for HID Wiimote. Though somewhere down the list at “Implement when necessary”. That case was apparently now. After adding support for the Product and Serial strings HID Wiimote is now compatible with Clone Hero, Rewired and any other that relies on that behavior.

Changes

  • Change checking Extension subtype
  • Add Product and Serial string support
  • Add minor delay to update process for UX
  • Change wording from “Switch” to “Swap”

Leave a Reply

Your email address will not be published. Required fields are marked *