/title/00000001/00000002/data/nocopy/cdbwiiid.dat

From WiiBrew
Jump to navigation Jump to search

This file is handle by the CDB Library from the SDK.

The file seems to be never used and it always fails to create the file due to the nocopy folder being missing from /title/00000001/00000002/data.

How the file is generated

  • It gets the Wii's MAC address:
0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF
  • Appends three bytes at the end of the MAC Address (0x757979):
0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x75, 0x79, 0x79
  • Calculates the SHA1 of the MAC Address:
2669460FADA5ED77A476EA291AFBADD943432F64
  • Adds 20 bytes of padding.

The first 8 bytes represent your Wii's ID, and the other 12 bytes represent your HMAC Key.

00000000: 26 69 46 0F AD A5 ED 77 A4 76 EA 29 1A FB AD D9
00000010: 43 43 2F 64 00 00 00 00 00 00 00 00 00 00 00 00
00000020: 00 00 00 00 00 00 00 00

C Structure

struct CDBWiiId {
    union {
        u8 cdbWiiIdDat[20]; // 0x00
        struct {
            u8 wiiId[8];    // 0x00
            u8 hmacKey[12]; // 0x08
        };
    };
    u8 padding[20]; // 0x14
};