Line 1: |
Line 1: |
| This is the metadata file that ends in <code>".cnmt{.nca}"</code> or <code>"meta0.ncd"</code>. This seems to replace the TMD format. | | This is the metadata file that ends in <code>".cnmt{.nca}"</code> or <code>"meta0.ncd"</code>. This seems to replace the TMD format. |
| | | |
− | There's at least 9 different filenames used for ".cnmt":
| + | The official name for CNMT is "PackagedContentMeta". |
− | * "Application_{lower-case hex titleID}.cnmt"
| |
− | * "Patch_{lower-case hex titleID}.cnmt"
| |
− | * "AddOnContent_{lower-case hex titleID}.cnmt"
| |
− | * "SystemUpdate_{hex titleID}.cnmt"
| |
− | * "SystemData_{lower-case hex titleID}.cnmt"
| |
− | * "SystemProgram_{lower-case hex titleID}.cnmt"
| |
− | * "BootImagePackage_{lower-case hex titleID}.cnmt"
| |
− | * "BootImagePackageSafe_{lower-case hex titleID}.cnmt"
| |
− | * "Delta_{lower-case hex titleID}.cnmt"
| |
| | | |
| == Header == | | == Header == |
Line 21: |
Line 12: |
| | 0x0 | | | 0x0 |
| | 0x8 | | | 0x8 |
− | | Title ID | + | | Program ID |
| |- | | |- |
| | 0x8 | | | 0x8 |
| | 0x4 | | | 0x4 |
− | | Title Version | + | | Version |
| |- | | |- |
| | 0xC | | | 0xC |
| | 0x1 | | | 0x1 |
− | | [[NCM_services#Title_Types|Meta Type]] | + | | [[NCM_services#Title_Types|Content Meta Type]] |
| |- | | |- |
| | 0xD | | | 0xD |
| | 0x1 | | | 0x1 |
− | | Unused | + | | Reserved |
| |- | | |- |
| | 0xE | | | 0xE |
Line 49: |
Line 40: |
| | 0x14 | | | 0x14 |
| | 0x1 | | | 0x1 |
− | | Attributes (0=None, 1=IncludesExFatDriver, 2=Rebootless) | + | | Content Meta Attributes (0=None, 1=IncludesExFatDriver, 2=Rebootless) |
| |- | | |- |
| | 0x15 | | | 0x15 |
| | 0x3 | | | 0x3 |
− | | Unused | + | | Reserved |
| |- | | |- |
| | 0x18 | | | 0x18 |
Line 61: |
Line 52: |
| | 0x1C | | | 0x1C |
| | 0x4 | | | 0x4 |
− | | Unused | + | | Reserved |
| |} | | |} |
| | | |
Line 93: |
Line 84: |
| | 0xC | | | 0xC |
| | 0x4 | | | 0x4 |
− | | Unused | + | | Required Application Version |
| |} | | |} |
| | | |
Line 117: |
Line 108: |
| | 0x10 | | | 0x10 |
| | 0x8 | | | 0x8 |
− | | Unused | + | | Reserved |
| |} | | |} |
| | | |
Line 137: |
Line 128: |
| | 0xC | | | 0xC |
| | 0x4 | | | 0x4 |
− | | Unused | + | | Reserved |
| |} | | |} |
| | | |
Line 157: |
Line 148: |
| | 0xC | | | 0xC |
| | 0x4 | | | 0x4 |
− | | Unused | + | | Reserved |
| |} | | |} |
| | | |
− | == Content Records == | + | == Packaged Content Info == |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 186: |
Line 177: |
| | 0x37 | | | 0x37 |
| | 0x1 | | | 0x1 |
− | | Id Offset | + | | ID Offset |
| |} | | |} |
| | | |
− | == Content Meta Records == | + | == Content Meta Info == |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 199: |
Line 190: |
| | 0x0 | | | 0x0 |
| | 0x8 | | | 0x8 |
− | | Title ID | + | | Program ID |
| |- | | |- |
| | 0x8 | | | 0x8 |
Line 207: |
Line 198: |
| | 0xC | | | 0xC |
| | 0x1 | | | 0x1 |
− | | [[NCM_services#Title_Types|Meta Type]] | + | | [[NCM_services#Title_Types|Content Meta Type]] |
| |- | | |- |
| | 0xD | | | 0xD |
| | 0x1 | | | 0x1 |
− | | Attributes (0=None, 1=IncludesExFatDriver, 2=Rebootless) | + | | Content Meta Attributes (0=None, 1=IncludesExFatDriver, 2=Rebootless) |
| |- | | |- |
| | 0xE | | | 0xE |
| | 0x2 | | | 0x2 |
− | | Unused | + | | Reserved |
| |} | | |} |
| | | |
Line 222: |
Line 213: |
| == SystemUpdate Extended Data == | | == SystemUpdate Extended Data == |
| | | |
| + | If the Version field is 1, the format is: |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x4 |
| + | | Version |
| + | |- |
| + | | 0x4 |
| + | | 0x4 |
| + | | Variation Count |
| + | |- |
| + | | 0x8 |
| + | | 0x20 * Variation Count |
| + | | [[CNMT#Firmware_Variation_Info_(Version_1)|Firmware Variation Info (Version 1)]] |
| + | |} |
| + | |
| + | If the Version field is 2, the format is: |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
| |- | | |- |
Line 237: |
Line 249: |
| |- | | |- |
| | 0x8 | | | 0x8 |
| + | | 0x4 * Variation Count |
| + | | Firmware Variation ID |
| + | |- |
| + | | |
| + | | 0x20 * Variation Count |
| + | | [[CNMT#Firmware_Variation_Info_(Version_2)|Firmware Variation Info (Version 2)]] |
| + | |- |
| + | | |
| + | | 0x10 * Meta Count (From [[CNMT#Firmware_Variation_Info_(Version_2)|Firmware Variation Info (Version 2)]]) |
| + | | [[CNMT#Content_Meta_Info|Content Meta Info]] (If Refer To Base is True) |
| + | |} |
| + | |
| + | === Firmware Variation Info (Version 1) === |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| | 0x4 | | | 0x4 |
− | | Firmware Variation | + | | Firmware Variation ID |
− | |- | + | |- |
− | | 0xC | + | | 0x4 |
− | | 0x1C * Variation Count | + | | 0x1C |
− | | Unused | + | | Reserved |
| + | |} |
| + | |
| + | === Firmware Variation Info (Version 2) === |
| + | |
| + | {| class="wikitable" border="1" |
| + | |- |
| + | ! Offset |
| + | ! Size |
| + | ! Description |
| + | |- |
| + | | 0x0 |
| + | | 0x1 |
| + | | Refer To Base (0=False, 1=True) |
| + | |- |
| + | | 0x1 |
| + | | 0x3 |
| + | | Reserved |
| + | |- |
| + | | 0x4 |
| + | | 0x4 |
| + | | Meta Count |
| + | |- |
| + | | 0x8 |
| + | | 0x18 |
| + | | Reserved |
| |} | | |} |
| | | |
Line 279: |
Line 337: |
| | 0x18 | | | 0x18 |
| | 0x4 | | | 0x4 |
− | | Unused | + | | Reserved |
| |- | | |- |
| | 0x1C | | | 0x1C |
Line 299: |
Line 357: |
| | | | | |
| | 0x18 * History Content Count | | | 0x18 * History Content Count |
− | | [[CNMT#Content_Records|History Content Records (Content Records without the Hash entry)]] | + | | [[CNMT#Packaged_Content_Info|History Content Info]] (Packaged Content Info without the Hash entry) |
| |- | | |- |
| | | | | |
| | 0x38 * Delta Content Count | | | 0x38 * Delta Content Count |
− | | [[CNMT#Content_Records|Delta Content Records]] | + | | [[CNMT#Packaged_Content_Info|Delta Packaged Content Info]] |
| |- | | |- |
| | | | | |
− | | 0x4 * Fragment Indicator Count (Fragment Set) | + | | 0x4 * Fragment Indicator Count (From [[CNMT#Fragment_Set|Fragment Sets]]) |
| | [[CNMT#Fragment_Indicator|Fragment Indicators]] | | | [[CNMT#Fragment_Indicator|Fragment Indicators]] |
| |} | | |} |
Line 320: |
Line 378: |
| | 0x0 | | | 0x0 |
| | 0x10 | | | 0x10 |
− | | [[CNMT#Content_Meta_Records|Content Meta Record]]
| + | | Content Meta Key (Slightly different Content Meta Info) |
− | |-
| |
− | | 0xC
| |
− | | 0x1
| |
− | | [[NCM_services#Title_Types|Meta Type]]
| |
− | |-
| |
− | | 0xD
| |
− | | 0x1
| |
− | | Attributes (0=None, 1=IncludesExFatDriver, 2=Rebootless)
| |
− | |-
| |
− | | 0xE
| |
− | | 0x2
| |
− | | Unused
| |
| |- | | |- |
| | 0x10 | | | 0x10 |
Line 344: |
Line 390: |
| | 0x32 | | | 0x32 |
| | 0x6 | | | 0x6 |
− | | Unused | + | | Reserved |
| |} | | |} |
| | | |
Line 377: |
Line 423: |
| | 0x20 | | | 0x20 |
| | 0x8 | | | 0x8 |
− | | Unused | + | | Reserved |
| |} | | |} |
| | | |
Line 410: |
Line 456: |
| | 0x1A | | | 0x1A |
| | 0x6 | | | 0x6 |
− | | Unused | + | | Reserved |
| |- | | |- |
| | 0x20 | | | 0x20 |
Line 418: |
Line 464: |
| | 0x22 | | | 0x22 |
| | 0x6 | | | 0x6 |
− | | Unused | + | | Reserved |
| |} | | |} |
| | | |
Line 451: |
Line 497: |
| | 0x2E | | | 0x2E |
| | 0x1 | | | 0x1 |
− | | Content Type (0=Meta, 1=Program, 2=Data, 3=Control, 4=[[Internet_Browser|HtmlDocument]], 5=[[Internet_Browser|LegalInformation]], 6=[[NCA_Format|DeltaFragment]]) | + | | Fragment Target Content Type (0=Meta, 1=Program, 2=Data, 3=Control, 4=[[Internet_Browser|HtmlDocument]], 5=[[Internet_Browser|LegalInformation]], 6=[[NCA_Format|DeltaFragment]]) |
| |- | | |- |
| | 0x2F | | | 0x2F |
Line 459: |
Line 505: |
| | 0x30 | | | 0x30 |
| | 0x4 | | | 0x4 |
− | | Unused | + | | Reserved |
| |} | | |} |
| | | |
Line 509: |
Line 555: |
| | 0x1A | | | 0x1A |
| | 0x6 | | | 0x6 |
− | | Unused | + | | Reserved |
| |- | | |- |
| | 0x20 | | | 0x20 |
Line 516: |
Line 562: |
| |- | | |- |
| | | | | |
− | | 0x4 * Fragment Indicator Count (Fragment Set) | + | | 0x4 * Fragment Indicator Count (From [[CNMT#Fragment_Set|Fragment Sets]]) |
| | [[CNMT#Fragment_Indicator|Fragment Indicators]] | | | [[CNMT#Fragment_Indicator|Fragment Indicators]] |
| |} | | |} |