It's Mii!

After I created my Mii, I wanted to get it on my Mac so I can use it as an avatar in other forums. I found that there are several Mii copy & edit utilities for Windows but none for Mac OS X, so I decided to hack Mii support into WiiRemote Framework. For anyone unfamiliar with the Wii, the only way to currently obtain the Mii is by saving it to the remote and extracting it from the remote.

The Wii Remote is actually a smart Bluetooth device, so it can be used with any computer than supports Bluetooth. It isn’t simply a controller; it has an onboard processor and memory. Lots of information is available at WiiBrew Wiki.

It turns out that Mii data isn’t actually stored as a graphic. Instead it’s a 74 byte structure describing all of the features & attributes of the Mii (hair color, facial features, etc). There are sites like Mii Plaza which lets you upoad & share binary Mii files, so I’ll just be saving it in a compatible format rather than displaying & editing the Mii.

Like most Bluetooth HID devices, rather than reading the data directly from the Wii remote, you send a data request, and the data is returned in a L2CAP channel message. Since it can only send a maximum of 16 bytes in a message, the Mii data is sent in several messages, which I need to assemble. Since the L2CAP channel is used for other data as well, we need to look at the memory offset to determine that we’re receiving Mii data.

Right now I just hacked an extra button into DarwiinRemote to obtain the first Mii. I plan to make a more flexible stand-alone Mii utility.

Technorati Tags:
, ,

Leave a Comment