Mii Maker: Difference between revisions
m More concise writing, link to new Mii Database page |
m Fix dead link |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 11: | Line 11: | ||
3DS Mii QR is a standard 57x57 pixel Level 10 High ECC QR code with 'Mii' logo in center (refer to [http://www.denso-wave.com/qrcode Denso-Wave Inc] web site for QR Code format specifications). It contains 0x70-bytes of binary data. 3DS seems to have a fully implemented QR-code decoder, as it can interpret such Mii binary data being encoded even in the smallest possible for that data size Level 6 Low ECC QR code. | 3DS Mii QR is a standard 57x57 pixel Level 10 High ECC QR code with 'Mii' logo in center (refer to [http://www.denso-wave.com/qrcode Denso-Wave Inc] web site for QR Code format specifications). It contains 0x70-bytes of binary data. 3DS seems to have a fully implemented QR-code decoder, as it can interpret such Mii binary data being encoded even in the smallest possible for that data size Level 6 Low ECC QR code. | ||
The data itself is encrypted with AES-CCM, xorpads can be determined from known plaintext here. The Mii Maker application uses the [[NS]] APT Wrap/Unwrap commands to encrypt/decrypt this Mii data. For the NS [[APT:Unwrap|Unwrap]] command, the Mii Maker application uses | The data itself is encrypted with AES-CCM, xorpads can be determined from known plaintext here. The Mii Maker application uses the [[NS]] APT Wrap/Unwrap commands to encrypt/decrypt this Mii data. For the NS [[APT:Unwrap|Unwrap]] command, the Mii Maker application uses nonceoffset=12, noncesize=10, and inputbuffer-size=0x60. Note that the actual nonce size is 8 bytes due to Wrap/Unwrap implementation, and the nonce data should be moved 12 bytes afterwards after decryption. The rest of the data at 0x8-0x5F is encrypted, and should be split into two parts after decryption, with the nonce data in the middle. (See [[APT:Wrap|Wrap]] and [[APT:Unwrap|Unwrap]] for more information) | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 21: | Line 21: | ||
| 0x0 | | 0x0 | ||
| 0x4 | | 0x4 | ||
| Mii ID (big-endian 32-bit unsigned integer)<br/>The most significant 3 bits determine whether the Mii is Special, Foreign, or Normal [http://www.davidhawley.co.uk/special-miis-gold-pants-and-creating.aspx]<br/>time_offset = (mii_id & 0x0FFFFFFF) * 2;<br/>time_offset is the time the Mii was created, represented as the number of seconds since 01/01/2010 00:00:00 | | Mii ID (big-endian 32-bit unsigned integer)<br/>The most significant 3 bits determine whether the Mii is Special, Foreign, or Normal [https://web.archive.org/web/20071011001718/http://www.davidhawley.co.uk/special-miis-gold-pants-and-creating.aspx]<br/>time_offset = (mii_id & 0x0FFFFFFF) * 2;<br/>time_offset is the time the Mii was created, represented as the number of seconds since 01/01/2010 00:00:00 | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
Line 28: | Line 28: | ||
|- | |- | ||
| 0x8 | | 0x8 | ||
| | | 0x4 | ||
| | | [[Mii#Mii_ID|Mii ID]], the encrypted data begins here. | ||
|- | |||
| 0xC | |||
| 0x8 | |||
| System ID (this ID is produced by the output from [https://www.3dbrew.org/wiki/Cfg:GenHashConsoleUnique GenHashConsoleUnique(0x0)]) | |||
|- | |- | ||
| | | 0x14 | ||
| | | 0x2 | ||
| | | Low 2 octets of MAC address | ||
|- | |- | ||
| | | 0x16 | ||
| | | 0x2 | ||
| | | padding (0000) | ||
|- | |- | ||
| 0x18 | | 0x18 | ||
Line 109: | Line 113: | ||
| 0x5E | | 0x5E | ||
| 0x2 | | 0x2 | ||
| | | CRC16 over the previous 0x5E | ||
|- | |- | ||
| 0x60 | | 0x60 | ||
Line 121: | Line 125: | ||
Created, received, or even met-in-multiplayer Miis are saved in [[Mii|CFL_DB.dat]]. | Created, received, or even met-in-multiplayer Miis are saved in [[Mii|CFL_DB.dat]]. | ||
== Savedata == | |||
=== editSaveData.bin === | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Length | |||
! | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| "TIDE" header (EDIT byteswapped) | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| zero | |||
|- | |||
| 0xC | |||
| 0x4 (?) | |||
| 01000000 (constant?) | |||
|- | |||
| 0x100 | |||
| 0x4 | |||
| Number of scanned Special Mii QRs | |||
|- | |||
| 0x104 | |||
| - | |||
| Some data identifying each scanned Special Mii QRs, for the purpose of not making them scannable again. 8 or 12 byte each? | |||
|- | |||
| 0x2904 | |||
| 0x4 | |||
| Checksum? | |||
|} | |||