Title list/DLC: Difference between revisions

Added content metadata structure.
Line 5: Line 5:


The titleID-low for DLC is: ((uniqueID<<8) | DLC_title_index). DLC_title_index starts at zero. Each DLC item is grouped under a DLC_title_index. Usually an application only has one DLC_title_index, but for applications which have a *lot* of DLC there's more than one DLC_title_index(JPN Home Menu for themes for example).
The titleID-low for DLC is: ((uniqueID<<8) | DLC_title_index). DLC_title_index starts at zero. Each DLC item is grouped under a DLC_title_index. Usually an application only has one DLC_title_index, but for applications which have a *lot* of DLC there's more than one DLC_title_index(JPN Home Menu for themes for example).
Every DLC title include [[NCCH]] partitions. The first one is always content metadata.
== Content metadata structure ==
The first [[NCCH]] partition of a DLC title. It determines region, language and DLC icons. The ExeFS section of content metadata only contains [[SMDH|icon]] section. The RomFS section contains "icons" directory, MetaDataContentHeader.bin and some ContentInfoArchive file(s).
=== icons directory ===
Contains DLC icons (.icn files).
=== MetaDataContentHeader.bin ===
{| class="wikitable" border="1"
|-
!  Offset
!  Size
!  Description
|-
|  0x0
|  0x4
|  Unknown
|-
|  0x4
|  0x4
|  Number of working DLC
|-
|  0x8
|  0x4
|  Number of available DLC
|-
|  0xC
|  0x4
|  Company Code
|-
|  0x10
|  0x4
|  Magic number, always 0xDEADBEEF (little endian)
|-
|  0x14
|  0x4 * 7
|  Region data (see below)
|-
|  0x30
|  0x4
|  Number of ContentInfoArchive file (n)
|-
|  0x34
|  0x4 * n
|  Region data of ContentInfoArchive files (see below).
|}
==== Region data ====
The first, the second and the third record of the main region data is often assigned to JPN, USA, EUR region respectively.
{| class="wikitable" border="1"
|-
!  Offset
!  Size
!  Description
|-
|  0x0
|  0x2
|  Region ID
|-
|  0x2
|  0x2
|  Language ID
|}
==== Region IDs ====
{| class="wikitable" border="1"
|-
!  ID
!  Region code
!  Region name
|-
|  0x0
|  JPN
|  Japan
|-
|  0x1
|  USA
|  North America
|-
|  0x2
|  EUR
|  Europe
|}
==== Language IDs ====
{| class="wikitable" border="1"
|-
!  ID
!  Language code
!  Language
|-
|  0x0
|  ja
|  Japanese
|-
|  0x1
|  en
|  English
|-
|  0x2
|  fr
|  French
|-
|  0x3
|  de
|  German
|-
|  0x4
|  it
|  Italian
|-
|  0x5
|  es
|  Spanish
|-
|  0x7
|  ko
|  Korean
|-
|  0x8
|  nl
|  Dutch
|-
|  0x9
|  pt
|  Portuguese
|-
|  0xA
|  ru
|  Russian
|}
==== Example ====
MetaDataContentHeader.bin in Fire Emblem Awakening DLC (EUR):
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000  01 00 00 00 19 00 00 00 19 00 00 00 30 00 30 00  ............0.0.
00000010  EF BE AD DE FF FF FF FF FF FF FF FF 02 00 01 00  ï¾.Þÿÿÿÿÿÿÿÿ....
00000020  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00000030  08 00 00 00 02 00 01 00 02 00 05 00 02 00 02 00  ................
00000040  02 00 03 00 02 00 04 00 02 00 08 00 02 00 09 00  ................
00000050  02 00 0A 00                                      ....
=== ContentInfoArchive files ===
The name of these files follow this format: ContentInfoArchive_<region code>_<language code>.bin (<region code> and <language code> are determined in MetaDataContentHeader.bin)
{| class="wikitable" border="1"
|-
!  Offset
!  Size
!  Description
|-
|  0x0
|  0x4
|  Unknown
|-
|  0x4
|  0x4
|  Number of DLC (n)
|-
|  0x8
|  0x88 * n
|  DLC data (see below)
|}
==== DLC data ====
{| class="wikitable" border="1"
|-
!  Offset
!  Size
!  Description
|-
|  0x0
|  0x40
|  Content title (UTF-8)
|-
|  0x40
|  0x80
|  Content description (UTF-8)
|-
|  0xC0
|  0x4
|  Content ID
|-
|  0xC4
|  0x4
|  Unknown
|}


== List ==
== List ==
Line 124: Line 316:
| v0
| v0
|}
|}
== Tools ==
* [https://github.com/Gericom/EveryFileExplorer EveryFileExplorer] Open .icn files.