Line 28: |
Line 28: |
| | 0x10C | | | 0x10C |
| | 0x1 | | | 0x1 |
− | | Title KEK Index (high nibble) and KEK Index (low nibble) | + | | TitleKeyDec Index (high nibble) and KEK Index (low nibble) |
| |- | | |- |
| | 0x10D | | | 0x10D |
| | 0x1 | | | 0x1 |
− | | Gamecard Size (0xFA = 1GB, 0xF8 = 2GB, 0xF0 = 4GB, 0xE0 = 8GB, 0xE1 = 16GB, 0xE2 = 32GB) | + | | [[#Gamecard Size|Gamecard Size]] |
| |- | | |- |
| | 0x10E | | | 0x10E |
Line 40: |
Line 40: |
| | 0x10F | | | 0x10F |
| | 0x1 | | | 0x1 |
− | | Gamecard Flags (bit0 = AutoBoot, bit1 = HistoryErase) | + | | [[#Gamecard Flags|Gamecard Flags]] |
| |- | | |- |
| | 0x110 | | | 0x110 |
| | 0x8 | | | 0x8 |
− | | Package Id (used for challenge–response authentication) | + | | Package ID (used for challenge–response authentication) |
| |- | | |- |
| | 0x118 | | | 0x118 |
Line 72: |
Line 72: |
| | 0x180 | | | 0x180 |
| | 0x4 | | | 0x4 |
− | | Secure Mode Flag (always 1, which means Secure Mode is available) | + | | Security Mode (0x01 = T1, 0x02 = T2) |
| |- | | |- |
| | 0x184 | | | 0x184 |
| | 0x4 | | | 0x4 |
− | | Title Key Flag (always 2) | + | | T1 Key Index (always 2) |
| |- | | |- |
| | 0x188 | | | 0x188 |
| | 0x4 | | | 0x4 |
− | | Key Flag (always 0) | + | | Key Index (always 0) |
| |- | | |- |
| | 0x18C | | | 0x18C |
Line 89: |
Line 89: |
| | 0x70 | | | 0x70 |
| | [[#Gamecard Info|Gamecard Info]] (AES-128-CBC encrypted) | | | [[#Gamecard Info|Gamecard Info]] (AES-128-CBC encrypted) |
| + | |} |
| + | |
| + | == Gamecard Size == |
| + | [[Filesystem_services|FS]] retrieves this data as [[Filesystem_services#GameCardSize|GameCardSize]]. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Value |
| + | ! Description |
| + | |- |
| + | | 0xFA |
| + | | 1GB |
| + | |- |
| + | | 0xF8 |
| + | | 2GB |
| + | |- |
| + | | 0xF0 |
| + | | 4GB |
| + | |- |
| + | | 0xE0 |
| + | | 8GB |
| + | |- |
| + | | 0xE1 |
| + | | 16GB |
| + | |- |
| + | | 0xE2 |
| + | | 32GB |
| + | |} |
| + | |
| + | == Gamecard Flags == |
| + | [[Filesystem_services|FS]] retrieves this data as [[Filesystem_services#GameCardAttribute|GameCardAttribute]]. |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | AutoBoot |
| + | |- |
| + | | 1 |
| + | | HistoryErase |
| + | |- |
| + | | 2 |
| + | | [4.0.0+] RepairTool |
| + | |- |
| + | | 3 |
| + | | [9.0.0+] DifferentRegionCupToTerraDevice |
| + | |- |
| + | | 4 |
| + | | [9.0.0+] DifferentRegionCupToGlobalDevice |
| |} | | |} |
| | | |
Line 102: |
Line 153: |
| | 0x0 | | | 0x0 |
| | 0x8 | | | 0x8 |
− | | Firmware Version (0x01 for old Gamecards, 0x02 for new Gamecards with the "logo" partition) | + | | Firmware Version (0x00 = Development, 0x01 = Retail, [4.0.0+] 0x02 = Retail) |
| |- | | |- |
| | 0x8 | | | 0x8 |
| | 0x4 | | | 0x4 |
− | | Access Control Flags (0x00A10011 for 25MHz access or 0x00A10010 for 50MHz access) | + | | Access Control (0x00A10011 = 25MHz access, 0x00A10010 = 50MHz access) |
| |- | | |- |
| | 0xC | | | 0xC |
| | 0x4 | | | 0x4 |
− | | Read Wait Time (always 0x1388) | + | | Read Time Wait1 (always 0x1388) |
| |- | | |- |
| | 0x10 | | | 0x10 |
| | 0x4 | | | 0x4 |
− | | Read Wait Time2 (always 0) | + | | Read Time Wait2 (always 0) |
| |- | | |- |
| | 0x14 | | | 0x14 |
| | 0x4 | | | 0x4 |
− | | Write Wait Time (always 0) | + | | Write Time Wait1 (always 0) |
| |- | | |- |
| | 0x18 | | | 0x18 |
| | 0x4 | | | 0x4 |
− | | Write Wait Time2 (always 0) | + | | Write Time Wait2 (always 0) |
| |- | | |- |
| | 0x1C | | | 0x1C |
Line 133: |
Line 184: |
| |- | | |- |
| | 0x24 | | | 0x24 |
− | | 0x4 | + | | 0x1 |
| + | | [9.0.0+] Compatibility Type (0x00 = Normal, 0x01 = Terra) |
| + | |- |
| + | | 0x25 |
| + | | 0x3 |
| | Empty | | | Empty |
| |- | | |- |
Line 142: |
Line 197: |
| | 0x30 | | | 0x30 |
| | 0x8 | | | 0x8 |
− | | CUP Id (always 0x0100000000000816, which is the title-listing data archive's title ID) | + | | CUP ID (always 0x0100000000000816, which is the title-listing data archive's title ID) |
| |- | | |- |
| | 0x38 | | | 0x38 |
Line 152: |
Line 207: |
| This is the Gamecard's unique certificate and is located at offset 0x7000. | | This is the Gamecard's unique certificate and is located at offset 0x7000. |
| | | |
− | [[Filesystem_services|FS]] IDeviceOperator cmd 206 "GetGameCardDeviceCertificate" retrieves this data. | + | [[Filesystem_services|FS]] retrieves this data with [[Filesystem_services#GetGameCardDeviceCertificate|GetGameCardDeviceCertificate]]. |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 167: |
Line 222: |
| | 0x4 | | | 0x4 |
| | Magicnum "CERT" | | | Magicnum "CERT" |
| + | |- |
| + | | 0x104 |
| + | | 0x4 |
| + | | Empty |
| + | |- |
| + | | 0x108 |
| + | | 0x1 |
| + | | KEK Index |
| + | |- |
| + | | 0x109 |
| + | | 0x7 |
| + | | Empty |
| |- | | |- |
| | 0x110 | | | 0x110 |
| | 0x10 | | | 0x10 |
− | | ? | + | | Device ID |
| |- | | |- |
| | 0x120 | | | 0x120 |
− | | 0xA | + | | 0x10 |
− | | ? | + | | Unknown |
| |- | | |- |
− | | 0x12A | + | | 0x130 |
− | | 0xD6 | + | | 0xD0 |
− | | Encrypted data. Some kind of key? | + | | Encrypted data |
| |} | | |} |
| | | |
− | The data between the Gamecard Certificate and the start of the HFS0 region is all 0xFF. | + | The data between the Gamecard Certificate and the start of the HFS0 region is all 0xFF, except for one BOTW cart that has been found, inwhich it is 0x00. |
| | | |
| = Initial Data = | | = Initial Data = |
Line 196: |
Line 263: |
| | 0x0 | | | 0x0 |
| | 0x8 | | | 0x8 |
− | | Package Id from [[#Gamecard Header|Gamecard Header]] at offset 0x110 | + | | Package ID from [[#Gamecard Header|Gamecard Header]] at offset 0x110 |
| |- | | |- |
| | 0x8 | | | 0x8 |