| « Math Notation Is Terrible | International Corpus of English » |
It looks like my Smartjoy PS2 adapter prevents my computer from sleeping now that I am using Leopard. That’s annoying. I thought Macs were supposed to Just Work. Oh well, I guess I still have my old Logitech wireless gamepad, but its buttons are mushy and it uses batteries and there’s an annoying dongle.
Maybe I should look into using my otherwise-wasted Wii Classic Controller (what can I say, I bought it cause of SNES nostalgia). DarwiinRemote claims to provide a bluetooth driver for the Wiimote, although looking at the source, conflicting evidence exists on whether the analogue sticks are supported.
In WiiRemote.h:
typedef UInt16 WiiJoyStickType;
enum{
WiiNunchukJoyStick,
WiiClassicControllerLeftJoyStick, //not available
WiiClassicControllerRightJoyStick //not available
};
But in WiiRemote.m
} else if (expType == WiiClassicController) {
cButtonData = (unsigned short)([self decrypt:dp[startByte + 4]] << 8 ) + [self decrypt:dp[startByte + 5]];
cStickX1 = [self decrypt:dp[startByte]] & 0x3F;
cStickY1 = [self decrypt:dp[startByte +1]] & 0x3F;
: //code continues...
The code compiles and the remote works as long as the the front-end app is running. But since all it does is map button presses to keys, the driver detects the analog sticks just fine, but doesn’t provide their data in any useful way to applications. What needs to happen is for this to be a real driver that provides a joystick interface (as a HID?). The Bluetooth metadata already describes this as a joystick, but that doesn’t seem to mean anything to the rest of the OS.
I’ve got the code checked out, so I’ll see what I can see. Objective-C is stupid-looking but the code itself is pretty clear. C variants are pretty good for drivers, after all. 8>