Mii data
This is an old revision of this page, as edited by WDML (talk | contribs) at 03:25, 11 December 2006. It may differ significantly from the current revision. |
Mii Data
The Mii Channel and some games such as Wii Sports store Mii data in the Wiimote internal memory.
Data from Miis in the Mii Parade is stored in the Wiimote, even though those Miis are not shown in the Wiimote Mii view. If all the slots are filled up and there is no space for more Miis, presumably this doesn't happen.
Overall format
The Mii data is stored on the Wiimote in two blocks. Each block is composed of 750 bytes of Mii data, followed by a 2 byte CRC. If the data in the first block does not match the CRC for that block, the second block is used instead. At that point, if the CRC of the second block does not match its data, no Mii data will be available.
The blocks are 752 bytes in length (0x2f0 bytes), and are stored consecutively starting at address 0x0fca in the Wiimote memory.
Example dumps
[1] - Mii data. First Mii is a generic default Mii with the name "test1". The following three Miis are not visible in the Mii Channel and are from the Mii Parade.
[2] - Mii data. First Mii is called "AJ" and has been customized. Nine other Miis (from the Parade) follow.
Block format
At the beginning of each block, there is a 4-byte value ('RNCD') which may be a Mii software version number, as it is the same across multiple Wiis and multiple Wiimotes. After these 4 bytes, there are 2 bytes which determine which slots are Mii parade slots. Left shift 0x0001 by the slot number to set it as Mii parade (hidden when viewed on the Wiimote). If a slot is empty, or filled by a non-parade Mii, its parade slot bit will be set to 0.
The last two bytes of the block are a CRC-16 CCITT of the previous 750 bytes (polynomial 0x1021, starting value 0x0000). C code to update CRC
Unknown Data:
* Effect of changing the first 4 bytes of the Mii block. * What the 7 leading bits in the Mii parade bytes are used for.
Mii format
Strings are apparently stored in Unicode format (UTF-16), big-endian. Each Mii is 0x4a bytes:
Data Validation on the Wii:
Setting invalid facial features, or colors over the limit (with the exception of Favorite color) in any fields appears to invalidate that Mii, and it does not show up when the Wiimote slots are viewed on the Wii (though all other Miis on the Wiimote do show up).
Weight and height seem to be clamped to 0x7F. Setting these bytes of 0xFF does not result in a super tall or fat Mii, but one exactly the same as if 0x7F were set. When the Mii is edited on the Wii then saved back to the controller, these bytes are back to 0x7F.
Mii data structure (work in progress):
typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; #define MII_NAME_LENGTH 10 #define MII_CREATOR_NAME_LENGTH 10 #define MII_HEIGHT_MIN 0x00 #define MII_HEIGHT_MAX 0x7F #define MII_WEIGHT_MIN 0x00 #define MII_WEIGHT_MAX 0x7F typedef struct { // addr: 0x00 & 0x01 u16 invalid:1; u16 isGirl:1; u16 month:4; u16 day:5; u16 favColor:4; // 0 - 11 (changing to 1111, along with setting the preceeding bit // results in a grey shirt, some values over 11 will crash the Wii // when trying to change the favorite color). u16 unknown:1; // addr: 0x02 through 0x15 u16 name[MII_NAME_LENGTH]; // addr: 0x16 u8 height; // addr: 0x17 u8 weight; // addr: 0x18 - 0x1B u8 miiID1; // Unique Mii identifier u8 miiID2; u8 miiID3; u8 miiID4; // addr: 0x1C & 0x1D & 0x1E & 0x1F u8 systemID0; // Checksum8 of first 3 bytes of mac addr u8 systemID1; // mac addr 3rd-to-last byte u8 systemID2; // mac addr 2nd-to-last byte u8 systemID3; // mac addr last byte // addr: 0x20 u16 faceshape:3; u16 skinColor:3; // 0 - 5 u16 unknown:?; u16 facialFeature:4; // 0 - 11 // addr: 0x22 & 0x23 u16 unknown:7; // Hair type falls in here u16 hairColor:3; u16 hairPart:1; // addr: 0x24 & 0x25 u16 unknown:?; // Eyebrow type falls in here u16 eyebrowrotation:?; u16 unknown:?; // addr: 0x26 & 0x27 u16 eyebrowColor:3; u16 eyebrowSize:5; // min 0, max 16 (depends on eyebrow type?) u16 eyebrowVOffset:?; u16 eyebrowSpacing:?; // addr: 0x28 & 0x29 u16 unknown:8; // Eye type falls in here u16 eyeRotation:3; u16 unknown:1; u16 eyeHeight:4; // 12 == mid, 0 == highest // addr: 0x2A & 0x2B u16 eyeColor:3; u16 unknown:13; // addr: 0x2C & 0x2D u16 noseType:4; // 0 - 11 u16 noseSize:4; // 0 - 8 u16 noseHeight:4; // 0 - 9? u16 unknown:3; // addr: 0x2E & 2F u16 lipType:5; u16 unknown:11; // addr: 0x30 u8 unknown:1; u8 glassesType:3; u8 glassesColor:3; u8 unknown:1; // addr: 0x31 & 32 u16 glassesSize:3; u16 unknown:1; u16 glassesHeight:4; u16 mustacheType:2; u16 beardType:2; u16 facialHairColor:3; u16 unknown:2; // addr: 0x33 u8 mustacheSize:3; // 0 (max) - ? (min) u8 unknown:1; u8 mustacheHeight:4; // 0 (high) - 16 (low) // addr: 0x34 & 0x35 u16 moleOn:1; u16 moleSize:3; // ? - 8 u16 moleHeight:5; // 0 - u16 unknown:4; u16 moleHorizontal:3; // 0 (left) - ? (right) // addr: 0x36 u16 creatorName[MII_CREATOR_NAME_LENGTH]; } MII_DATA_STRUCT;
See Also
- Wiimote
- WDML - (Coming Soon) Library and end-user tools for management of Wiimote save data (including Mii data).