backtopbacktopbacktop



 

Updates

uLaunchELF v4.42b

Open PS2 Loader v0.8

SMS Media Player v2.9 R4

Free McBoot 1.8b

ESR beta r9b

Open Ps2 Loader Guides & Tutorials

Free MCBOOT Guides & Tutorials
Wiimote/Mii Data

Contents


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.

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

This is a short (but working) version of the CRC calculation algorithm, written in Java (should be easy to adapt for other programming languages):

/**
* Calculate a modified CRC16-CCITT checksum of a byte array, as used for
* checking the validity of a Mii data block stored on a Wiimote.
*
* @param bytes the byte array to calculate the checksum for
* @return the checksum (in the lower 16 bits)
*/
static int crc (byte[] bytes) {
int crc = 0x0000;
for (int byteIndex = 0; byteIndex < bytes.length; byteIndex++) {
for (int bitIndex = 7; bitIndex >= 0; bitIndex--) {
crc = (((crc << 1) | ((bytes[byteIndex] >> bitIndex) & 0x1)) ^
(((crc & 0x8000) != 0) ? 0x1021 : 0));
}
}
for (int counter = 16; counter > 0; counter--) {
crc = ((crc << 1) ^ (((crc & 0x8000) != 0) ? 0x1021 : 0));
}
return (crc & 0xFFFF);
}

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. Miis with Japanese Unicode characters in their names work (and are displayed correctly) on US Wii hardware.

Data Validation in the Mii Channel:

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.

Hair type, eyebrow type, eye type, lip type and nose type use a pre-determined set of valid entries which are not sequential with the order in which they are displayed. They do, however, use the expected range of values from 0 to n - 1.

Eyebrow rotation and eye rotation both have differing default values based upon the type selected.

Each Mii is 0x4a bytes:

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. Seems to increment with time.
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 & 0x21
u16 faceShape:3; // 0 - 7
u16 skinColor:3; // 0 - 5
u16 facialFeature:4; // 0 - 11
u16 unknown:3;
u16 mingleOff:1; // 0 = Mingle, 1 = Don't Mingle
u16 unknown:2;

// addr: 0x22 & 0x23
u16 hairType:7; // 0 - 71, Value is non-sequential with regard to page, row and column
u16 hairColor:3; // 0 - 7
u16 hairPart:1; // 0 = Normal, 1 = Reversed
u16 unknown:5;

// addr: 0x24 & 0x25 & 0x26 & 0x27
u32 eyebrowType:5; // 0 - 23, Value is non-sequential with regard to page, row and column
u32 unknown:1;
u32 eyebrowRotation:4; // 0 - 11, Default value varies based on eyebrow type
u32 unknown:6;
u32 eyebrowColor:3; // 0 - 7
u32 eyebrowSize:4; // 0 - 8, Default = 4
u32 eyebrowVertPos:5; // 3 - 18, Default = 10
u32 eyebrowHorizSpacing:4; // 0 - 12, Default = 2

// addr: 0x28 & 0x29 & 0x2A & 0x2B
u32 eyeType:6; // 0 - 47, Value is non-sequential with regard to page, row and column
u32 unknown:2;
u32 eyeRotation:3; // 0 - 7, Default value varies based on eye type
u32 eyeVertPos:5; // 0 - 18, Default = 12
u32 eyeColor:3; // 0 - 5
u32 unknown:1;
u32 eyeSize:3; // 0 - 7, Default = 4
u32 eyeHorizSpacing:4; // 0 - 12, Default = 2
u32 unknown:5;

// addr: 0x2C & 0x2D
u16 noseType:4; // 0 - 11, Value is non-sequential with regard to row and column
u16 noseSize:4; // 0 - 8, Default = 4
u16 noseVertPos:5; // 0 - 18, Default = 9
u16 unknown:3;

// addr: 0x2E & 2F
u16 lipType:5; // 0 - 23, Value is non-sequential with regard to page, row and column
u16 lipColor:2; // 0 - 2
u16 lipSize:4; // 0 - 8, Default = 4
u16 lipVertPos:5; // 0 - 18, Default = 13

// addr: 0x30 & 0x31
u16 glassesType:4; // 0 - 8
u16 glassesColor:3; // 0 - 5
u16 unknown:1;
u16 glassesSize:3; // 0 - 7, Default = 4
u16 glassesVertPos:5; // 0 - 20, Default = 10

// addr: 0x32 & 33
u16 mustacheType:2; // 0 - 3
u16 beardType:2; // 0 - 3
u16 facialHairColor:3; // 0 - 7
u16 mustacheSize:4; // 0 - 8, Default = 4
u16 mustacheVertPos:4; // 0 - 16, Default = 10

// addr: 0x34 & 0x35
u16 moleOn:1; // 0 = No Mole, 1 = Has Mole
u16 moleSize:4; // 0 - 8, Default = 4
u16 moleVertPos:5; // 0 - 30, Default = 20
u16 moleHorizPos:5; // 0 - 16, Default = 2
u16 unknown:1;

// addr: 0x36
u16 creatorName[MII_CREATOR_NAME_LENGTH];
} MII_DATA_STRUCT;

Hair Type Value Translation

Page	Row	Column	Value
1 1 1 33
1 1 2 40
1 1 3 51
1 2 1 44
1 2 2 39
1 2 3 70
1 3 1 45
1 3 2 49
1 3 3 59
1 4 1 56
1 4 2 68
1 4 3 31
2 1 1 32
2 1 2 47
2 1 3 37
2 2 1 48
2 2 2 66
2 2 3 52
2 3 1 58
2 3 2 50
2 3 3 55
2 4 1 64
2 4 2 60
2 4 3 62
3 1 1 43
3 1 2 38
3 1 3 42
3 2 1 23
3 2 2 67
3 2 3 54
3 3 1 36
3 3 2 41
3 3 3 65
3 4 1 30
3 4 2 57
3 4 3 34
4 1 1 12
4 1 2 13
4 1 3 69
4 2 1 26
4 2 2 4
4 2 3 25
4 3 1 1
4 3 2 19
4 3 3 5
4 4 1 8
4 4 2 27
4 4 3 7
5 1 1 14
5 1 2 3
5 1 3 22
5 2 1 10
5 2 2 6
5 2 3 20
5 3 1 11
5 3 2 63
5 3 3 17
5 4 1 35
5 4 2 21
5 4 3 0
6 1 1 61
6 1 2 16
6 1 3 46
6 2 1 9
6 2 2 18
6 2 3 2
6 3 1 28
6 3 2 53
6 3 3 71
6 4 1 24
6 4 2 15
6 4 3 29

Eyebrow Type Value Translation

Page	Row	Column	Value	Default Rotation
1 1 1 6 6
1 1 2 0 6
1 1 3 12 5
1 2 1 1 6
1 2 2 9 7
1 2 3 19 6
1 3 1 7 7
1 3 2 21 6
1 3 3 8 4
1 4 1 17 7
1 4 2 5 7
1 4 3 4 6
2 1 1 11 8
2 1 2 10 6
2 1 3 2 5
2 2 1 3 7
2 2 2 14 6
2 2 3 20 5
2 3 1 15 6
2 3 2 13 5
2 3 3 22 7
2 4 1 18 6
2 4 2 16 7
2 4 3 23 5

Eye Type Value Translation

Page	Row	Column	Value	Default Rotation
1 1 1 2 4
1 1 2 4 3
1 1 3 0 3
1 2 1 8 3
1 2 2 39 3
1 2 3 17 4
1 3 1 1 4
1 3 2 26 3
1 3 3 16 4
1 4 1 15 4
1 4 2 27 4
1 4 3 20 4
2 1 1 33 3
2 1 2 11 4
2 1 3 19 3
2 2 1 32 4
2 2 2 9 4
2 2 3 17 4
2 3 1 23 3
2 3 2 34 3
2 3 3 21 3
2 4 1 25 4
2 4 2 40 3
2 4 3 35 3
3 1 1 5 4
3 1 2 41 4
3 1 3 13 3
3 2 1 36 4
3 2 2 37 4
3 2 3 6 4
3 3 1 24 3
3 3 2 30 4
3 3 3 31 4
3 4 1 18 3
3 4 2 28 4
3 4 3 46 3
4 1 1 7 4
4 1 2 44 3
4 1 3 38 3
4 2 1 42 4
4 2 2 45 3
4 2 3 29 3
4 3 1 3 4
4 3 2 43 3
4 3 3 22 4
4 4 1 10 4
4 4 2 14 3
4 4 3 47 3

Lip Type Value Translation

Page	Row	Column	Value
1 1 1 23
1 1 2 1
1 1 3 19
1 2 1 21
1 2 2 22
1 2 3 5
1 3 1 0
1 3 2 8
1 3 3 10
1 4 1 16
1 4 2 6
1 4 3 13
2 1 1 7
2 1 2 9
2 1 3 2
2 2 1 17
2 2 2 3
2 2 3 4
2 3 1 15
2 3 2 11
2 3 3 20
2 4 1 18
2 4 2 14
2 4 3 12

Nose Type Value Translation

Row	Column	Value
1 1 1
1 2 10
1 3 2
2 1 3
2 2 6
2 3 0
3 1 5
3 2 4
3 3 8
4 1 9
4 2 7
4 3 11

Utilities and Libraries

  • WDML - WDML is a library for Wiimote data transfer and management. It provides functionality not only for low level HID access to the Wiimote, but also for more advanced data transfer methods (including data integrity validation) and supplemental functionality such as Mii data CRC calculation.
  • MiiTransfer - MiiTransfer is a command line utility implemented using WDML. It allows for the transfer of Mii data to and from the Wiimote. Writing a Mii slot to the Wiimote will update the CRC for the Mii data (allowing it to be read in the Mii channel) and will ensure that the Mii slot being written to is not flagged as an invisible Mii Parade slot.
  • Mii Mega-Mall - The Mii Mega-Mall provides a single access-point, with a unified, consistent interface for sharing and retrieving Mii over the Internet. Everything that you need to download Mii's from the net and upload them to your Wiimote via Bluetooth is included.

See Also




Untitled Document
Powered by vBadvanced CMPS v3.2.3

All times are GMT -7. The time now is 04:41 PM.
Powered by vBulletin Version 3.8.5
Copyright 2000 - 2011, Jelsoft Enterprises Ltd.


Valid CSS!

backtopbacktopbacktop

Applications - Forums - List - Skins - Arcade

Disclaimer - FAQ - Donate

Page generated in 0.08379 seconds.
Copyright © 2004 - 2017 SKSApps.com
All rights reserved.
No affiliation with Sony Computer Entertainment or Nintendo Company, Ltd.