<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Idunoe</id>
	<title>3dbrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Idunoe"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/Idunoe"/>
	<updated>2026-04-12T12:32:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=NCCH&amp;diff=11232</id>
		<title>NCCH</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=NCCH&amp;diff=11232"/>
		<updated>2014-12-22T07:44:36Z</updated>

		<summary type="html">&lt;p&gt;Idunoe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
The following text tries to document the structure of the NCCH container format.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
There are two known NCCH container specialisations used on the 3DS, &amp;quot;executable&amp;quot; and &amp;quot;non-executable&amp;quot;, officially known as CXI and CFA respectively.&lt;br /&gt;
&lt;br /&gt;
== CXI == &lt;br /&gt;
&lt;br /&gt;
The CXI (CTR Executable Image) specialisation of the NCCH container, contains executable code, which runs on a single ARM11 core. It can communicate through SVC calls with the other ARM11 core running the &#039;system&#039; program code. For reasons of clarity, the ARM11 cores will sometimes be called the &#039;appcore&#039; and &#039;syscore&#039; respectively.&lt;br /&gt;
&lt;br /&gt;
The CXI format is structured in the following order:&lt;br /&gt;
* first a NCCH header,&lt;br /&gt;
* followed by an extended header,&lt;br /&gt;
* followed by an access descriptor,&lt;br /&gt;
* followed by an &#039;&#039;&#039;optional&#039;&#039;&#039; plain binary region,&lt;br /&gt;
* followed by an &#039;&#039;&#039;optional&#039;&#039;&#039; executable filesystem ([[ExeFS]]) - (contains ARM11 code, Home menu [[SMDH|icn]]/bnr and [[Logo|logo]]),&lt;br /&gt;
* and finally followed by an &#039;&#039;&#039;optional&#039;&#039;&#039; read-only filesystem ([[RomFS]]) - (Used for external file storage).&lt;br /&gt;
&lt;br /&gt;
The extended header contains additional information regarding access control. &lt;br /&gt;
The plain binary region is an area specifically stored in plaintext, mostly containing SDK library strings for identification.&lt;br /&gt;
&lt;br /&gt;
== CFA ==&lt;br /&gt;
&lt;br /&gt;
The CFA (CTR File Archive) specialisation of the NCCH container, is not executable, but are used in conjunction with CXI files. For instance the DLP Child Container and the Electronic Manual. (There is a system update NCCH which follows this format, but is used by the 3DS rather than the Application NCCH, and only works when embedded in the [[CCI]] format because the nVer is kept in the header of retail [[CCI]] files instead of the application NCCH). There are CFA files which exist alone in a title, but these are just [[Title list|System Data Archive]] titles and are found only in the [[Flash Filesystem#CTR partition|NAND]].&lt;br /&gt;
&lt;br /&gt;
CFA files are structured in the following order:&lt;br /&gt;
* first a NCCH header,&lt;br /&gt;
* followed by an &#039;&#039;&#039;optional&#039;&#039;&#039; executable filesystem ([[ExeFS]]) (same as in CXI, except no ARM11 code)&lt;br /&gt;
* followed by an &#039;&#039;&#039;optional&#039;&#039;&#039; read-only filesystem ([[RomFS]])&lt;br /&gt;
&lt;br /&gt;
Non-Executable NCCH file examples(Includes Decrypted [[RomFS]]):&lt;br /&gt;
&lt;br /&gt;
[https://dl.dropbox.com/u/60710927/CTR/Sample/DLP%20Child.7z DLPChild Container]&lt;br /&gt;
[https://dl.dropbox.com/u/60710927/CTR/Sample/Manual.7z Electronic Manual]&lt;br /&gt;
&lt;br /&gt;
== NCCH Specs ==&lt;br /&gt;
&lt;br /&gt;
=== Encryption ===&lt;br /&gt;
The extended header, the [[ExeFS]] and the [[RomFS]] are encrypted using 128-bit AES CTR. See here regarding the [https://github.com/3dshax/ctr/blob/master/ctrtool/ncch.c CTR].&lt;br /&gt;
&lt;br /&gt;
The key is generated using the [[AES|AES Engine]] key generator, where the keyX is set by the bootrom (keyslot 0x2C) and the keyY is the first 0x10 bytes of the NCCH signature. This method of key generation is referred to as &amp;quot;secure-crypto&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
If a certain NCCH flag is set, a fixed AES key is used. There are two fixed keys, one for titles which have the system category bit set (SystemFixedKey), and one for the rest (&amp;quot;zeros&amp;quot; key). These are debug keys, as they aren&#039;t nomally supported on retail systems.&lt;br /&gt;
&lt;br /&gt;
As of [[7.0.0-13|7.0.0-X]] the system supports a new encryption method for secure-crypto (when ncchflag[3] != 0). Where a second key is generated using the same keyY but with another [[AES|keyslot]]. The second key is used to crypt the [[RomFS]] and [[ExeFS]] files which don&#039;t have filenames &amp;quot;icon&amp;quot; or &amp;quot;banner&amp;quot;(i.e. &amp;quot;.code&amp;quot; and &amp;quot;.firm&amp;quot;). While everything else is crypted with the original key. Note the CTR used is the same for both keys. This makes titles &amp;quot;recognizable&amp;quot; but not &amp;quot;launchable&amp;quot; on systems which don&#039;t support this method or the keyslot used. See below for keyslots used for generating the second key.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  ncchflag[3]&lt;br /&gt;
!  FW Introduced&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  AES Keyslot&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
|  0x01&lt;br /&gt;
|  [[7.0.0-13|7.0.0-X]]&lt;br /&gt;
|  style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
|  0x25&lt;br /&gt;
|  This keyslot is [[Savegames|initialized]] by the 6.0 gamecard savegame keyY init function during boot, using a different portion of the [[Savegames|final]] hash(this keyslot is separate from the one used for the 6.0 save crypto).&lt;br /&gt;
|-&lt;br /&gt;
|  0x0A&lt;br /&gt;
|  [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
|  style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
|  ?&lt;br /&gt;
|  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Format ===&lt;br /&gt;
&lt;br /&gt;
Currently, only [[ExeFS]]:/.code can be compressed (with a LZ77 variant). A flag in the [[NCCH/Extended Header#System Info|exheader]] determines if this is the case.&lt;br /&gt;
&lt;br /&gt;
On retail for SD applications, exheader_systeminfoflags.flag bit1 must be set.&lt;br /&gt;
&lt;br /&gt;
Retail CFAs use the default NCCH product code &amp;quot;CTR-P-CTAP&amp;quot;, while retail title/gamecard CXIs use NCCH product code &amp;quot;CTR-X-XXXX&amp;quot;. This product code is the NCCH [[Serials|serial code]]. The region-locking info checked by home menu is stored in the [[SMDH#BNR Region|icon]].&lt;br /&gt;
&lt;br /&gt;
All of the hashes stored in this NCCH header are over the cleartext data. The ExeFS/RomFS superblock starts at offset 0x0 in the ExeFS/RomFS, and the size is specified by the hash region fields. Nintendo&#039;s NCCH validation code seems to have the size of this region fixed to 0x200 bytes (for ExeFS at least). &lt;br /&gt;
&lt;br /&gt;
As of [[5.0.0-11]] the application [[ExeFS]]:/logo can be loaded from the plaintext region between the access descriptor and the plain region, all applications built since [[5.0.0-11]] store the logo here. The size of this logo is always 0x2000-bytes.&lt;br /&gt;
&lt;br /&gt;
The plain region mainly contains tags for each SDK library used when building the CXI. The version used for the &amp;quot;FIRMWARE&amp;quot; tag is the kernel/FIRM [[Configuration_Memory|version]], this version can also be stored in the exheader &amp;quot;kernel release version&amp;quot; ARM11 kernel descriptor field. As of [[2.2.0-X]] the NATIVE_FIRM kernels check the CXI exheader &amp;quot;kernel release version&amp;quot; field, if it is stored in the CXI exheader. If the kernel/FIRM version specified by this field is higher than the version of the running NATIVE_FIRM, the kernel will return error-code 0xD9001413.&lt;br /&gt;
&lt;br /&gt;
=== NCCH Header ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  OFFSET&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  0x000&lt;br /&gt;
|  0x100&lt;br /&gt;
|  RSA-2048 signature of the NCCH header, using SHA-256.&lt;br /&gt;
|-&lt;br /&gt;
|  0x100&lt;br /&gt;
|  4&lt;br /&gt;
|  Magic ID, always &#039;NCCH&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  0x104&lt;br /&gt;
|  4&lt;br /&gt;
|  Content size, in media units (1 media unit = 0x200 bytes)&lt;br /&gt;
|-&lt;br /&gt;
|  0x108&lt;br /&gt;
|  8&lt;br /&gt;
|  Partition ID&lt;br /&gt;
|-&lt;br /&gt;
|  0x110&lt;br /&gt;
|  2&lt;br /&gt;
|  Maker code&lt;br /&gt;
|-&lt;br /&gt;
|  0x112&lt;br /&gt;
|  2&lt;br /&gt;
|  Version&lt;br /&gt;
|-&lt;br /&gt;
|  0x114&lt;br /&gt;
|  4&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x118&lt;br /&gt;
|  8&lt;br /&gt;
|  Program ID&lt;br /&gt;
|-&lt;br /&gt;
|  0x120&lt;br /&gt;
|  0x10&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x130&lt;br /&gt;
|  0x20&lt;br /&gt;
|  Logo Region SHA-256 hash. (For applications built with SDK 5+) (Supported from firmware: [[5.0.0-11]])&lt;br /&gt;
|-&lt;br /&gt;
|  0x150&lt;br /&gt;
|  0x10&lt;br /&gt;
|  Product code&lt;br /&gt;
|-&lt;br /&gt;
|  0x160&lt;br /&gt;
|  0x20&lt;br /&gt;
|  Extended header SHA-256 hash (SHA256 of 2x Alignment Size, beginning at 0x0 of ExHeader)&lt;br /&gt;
|-&lt;br /&gt;
|  0x180&lt;br /&gt;
|  4&lt;br /&gt;
|  Extended header size&lt;br /&gt;
|-&lt;br /&gt;
|  0x184&lt;br /&gt;
|  4&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x188&lt;br /&gt;
|  8&lt;br /&gt;
|  Flags (See Below)&lt;br /&gt;
|-&lt;br /&gt;
|  0x190&lt;br /&gt;
|  4&lt;br /&gt;
|  Plain region offset, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x194&lt;br /&gt;
|  4&lt;br /&gt;
|  Plain region size, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x198&lt;br /&gt;
|  4&lt;br /&gt;
|  Logo Region offset, in media units (For applications built with SDK 5+) (Supported from firmware: [[5.0.0-11]])&lt;br /&gt;
|-&lt;br /&gt;
|  0x19c&lt;br /&gt;
|  4&lt;br /&gt;
|  Logo Region size, in media units (For applications built with SDK 5+) (Supported from firmware: [[5.0.0-11]])&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A0&lt;br /&gt;
|  4&lt;br /&gt;
|  ExeFS offset, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A4&lt;br /&gt;
|  4&lt;br /&gt;
|  ExeFS size, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A8&lt;br /&gt;
|  4&lt;br /&gt;
|  ExeFS hash region size, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1AC&lt;br /&gt;
|  4&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x1B0&lt;br /&gt;
|  4&lt;br /&gt;
|  RomFS offset, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1B4&lt;br /&gt;
|  4&lt;br /&gt;
|  RomFS size, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1B8&lt;br /&gt;
|  4&lt;br /&gt;
|  RomFS hash region size, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1BC&lt;br /&gt;
|  4&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C0&lt;br /&gt;
|  0x20&lt;br /&gt;
|  ExeFS superblock SHA-256 hash - (SHA-256 hash, starting at 0x0 of the ExeFS over the number of media units specified in the ExeFS hash region size)&lt;br /&gt;
|-&lt;br /&gt;
|  0x1E0&lt;br /&gt;
|  0x20&lt;br /&gt;
|  RomFS superblock SHA-256 hash - (SHA-256 hash, starting at 0x0 of the RomFS over the number of media units specified in the RomFS hash region size)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NCCH Flags ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  INDEX&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  3&lt;br /&gt;
|  Crypto Method: When this is non-zero, a NCCH crypto method using two keyslots is used(see above).&lt;br /&gt;
|-&lt;br /&gt;
|  4&lt;br /&gt;
|  Content Platform: 1 = CTR.&lt;br /&gt;
|-&lt;br /&gt;
|  5&lt;br /&gt;
|  Content Type Bit-masks: Data = 0x1, Executable = 0x2, SystemUpdate = 0x4, Manual = 0x8, Child = (0x4&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;0x8), Trial = 0x10. When &#039;Data&#039; is set, but not &#039;Executable&#039;, NCCH is a CFA. Otherwise when &#039;Executable&#039; is set, NCCH is a CXI.&lt;br /&gt;
|-&lt;br /&gt;
|  6&lt;br /&gt;
|  Content Unit Size i.e. u32 ContentUnitSize = 0x200*2^flags[6]; &lt;br /&gt;
|-&lt;br /&gt;
|  7&lt;br /&gt;
|  Bit-masks: FixedCryptoKey = 0x1, NoMountRomFs = 0x2, NoCrypto = 0x4&lt;br /&gt;
|}&lt;br /&gt;
CXIs NCCH header signature is verified using the RSA public key stored in the accessdesc,(which follows the exheader) while CFAs NCCH header is verified with a fixed RSA public key.&lt;br /&gt;
&lt;br /&gt;
==== NCCH header example for Lego Starwars III ====&lt;br /&gt;
 Signature:              720FF8F83F2A1E998322A026D1434165&lt;br /&gt;
                         ED19642ABC1CB2722135AA202BEAD60A&lt;br /&gt;
                         80BCD21C768C597B8268FEF2C64EA710&lt;br /&gt;
                         4C9BA5E12CFFBD1D0C619F4EF7B42CA7&lt;br /&gt;
                         DD8482CB4EB26720AD66CDA57ABCBCFB&lt;br /&gt;
                         D63268A6E2896A59B3B744E39E45B88A&lt;br /&gt;
                         ABB4C0980ACC6210818DCE6DAC838A10&lt;br /&gt;
                         95D0F66B352474D4B3DA4B333F49912D&lt;br /&gt;
                         29AF7EA58BC8C890B18C70B7D540A9FB&lt;br /&gt;
                         EBE24A5312055617D3353B28C3EB1D17&lt;br /&gt;
                         61021BEFF6AD22C384835B40BD44DFAD&lt;br /&gt;
                         981F6350F9458B17BCB5F768C92ABC93&lt;br /&gt;
                         2BCE9888855A8998F4CDE40C9543514A&lt;br /&gt;
                         C57B84EB75A680E7C742632614620D1D&lt;br /&gt;
                         A253284DF3DC01091EB3800C36FD62EE&lt;br /&gt;
                         BA15340F1FD498FAB67C0302E9CDA397&lt;br /&gt;
 Magic:                  NCCH&lt;br /&gt;
 Content size:           0x1cfef400&lt;br /&gt;
 Partition id:           0004000000038c00&lt;br /&gt;
 Maker code:             3436 (&amp;quot;46&amp;quot;)&lt;br /&gt;
 Version:                0002&lt;br /&gt;
 Program id:             0004000000038c00&lt;br /&gt;
 Temp flag:              00&lt;br /&gt;
 Product code:           CTR-P-ALGP&lt;br /&gt;
 Extended header hash:   0C27E3C1DE7B2AE2D3114F32A4EEBF46&lt;br /&gt;
                         9AFD0CF352C11D4984C2A9F1D2144C63&lt;br /&gt;
 Extended header size:   00000400&lt;br /&gt;
 Flags:                  0000030100000000&lt;br /&gt;
 Plain region offset:    0x00004a00&lt;br /&gt;
 Plain region size:      0x00000200&lt;br /&gt;
 ExeFS offset:           0x00004c00&lt;br /&gt;
 ExeFS size:             0x00143800&lt;br /&gt;
 ExeFS hash region size: 0x00000200&lt;br /&gt;
 RomFS offset:           0x00148400&lt;br /&gt;
 RomFS size:             0x1ceab000&lt;br /&gt;
 RomFS hash region size: 0x00000200&lt;br /&gt;
 ExeFS Superblock Hash:  130C042615F647C4C63225EA9E67F8A2&lt;br /&gt;
                         7B15246B88FBC7A927257B84977B787B&lt;br /&gt;
 RomFS Superblock Hash:  A65BEE1060BB6A6821BBCEC600035B7E&lt;br /&gt;
                         64FB6EACA7F0960CFB1F5A37087728F7&lt;br /&gt;
 Note: Offsets and sizes in media units have been converted to byte sizes.&lt;br /&gt;
&lt;br /&gt;
==== Plain region example for Lego Starwars III ====&lt;br /&gt;
 0004a00: 5b 53 44 4b 2b 4e 49 4e 54 45 4e 44 4f 3a 43 54  [SDK+NINTENDO:CT    [SDK+NINTENDO:CTR_SDK-0_14_23_200_none]&lt;br /&gt;
 0004a10: 52 5f 53 44 4b 2d 30 5f 31 34 5f 32 33 5f 32 30  R_SDK-0_14_23_20&lt;br /&gt;
 0004a20: 30 5f 6e 6f 6e 65 5d 00 5b 53 44 4b 2b 4e 49 4e  0_none].[SDK+NIN    [SDK+NINTENDO:Firmware-02_27]&lt;br /&gt;
 0004a30: 54 45 4e 44 4f 3a 46 69 72 6d 77 61 72 65 2d 30  TENDO:Firmware-0&lt;br /&gt;
 0004a40: 32 5f 32 37 5d 00 5b 53 44 4b 2b 4d 6f 62 69 63  2_27].[SDK+Mobic    [SDK+Mobiclip:Deblocker_1_0_2]&lt;br /&gt;
 0004a50: 6c 69 70 3a 44 65 62 6c 6f 63 6b 65 72 5f 31 5f  lip:Deblocker_1_&lt;br /&gt;
 0004a60: 30 5f 32 5d 00 5b 53 44 4b 2b 4d 6f 62 69 63 6c  0_2].[SDK+Mobicl    [SDK+Mobiclip:ImaAdpcmDec_1_0_0]&lt;br /&gt;
 0004a70: 69 70 3a 49 6d 61 41 64 70 63 6d 44 65 63 5f 31  ip:ImaAdpcmDec_1&lt;br /&gt;
 0004a80: 5f 30 5f 30 5d 00 5b 53 44 4b 2b 4d 6f 62 69 63  _0_0].[SDK+Mobic    [SDK+Mobiclip:MobiclipDec_1_0_1]&lt;br /&gt;
 0004a90: 6c 69 70 3a 4d 6f 62 69 63 6c 69 70 44 65 63 5f  lip:MobiclipDec_&lt;br /&gt;
 0004aa0: 31 5f 30 5f 31 5d 00 5b 53 44 4b 2b 4d 6f 62 69  1_0_1].[SDK+Mobi    [SDK+Mobiclip:MoflexDemuxer_1_0_2]&lt;br /&gt;
 0004ab0: 63 6c 69 70 3a 4d 6f 66 6c 65 78 44 65 6d 75 78  clip:MoflexDemux&lt;br /&gt;
 0004ac0: 65 72 5f 31 5f 30 5f 32 5d 00 00 00 00 00 00 00  er_1_0_2].......&lt;br /&gt;
 0004ad0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................&lt;br /&gt;
 0004ae0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................&lt;br /&gt;
&lt;br /&gt;
==== Example dependency list from the extended header ====&lt;br /&gt;
 00850 41 50 54 3A 55 00 00 00 24 68 69 6F 46 49 4F 00 APT:U...$hioFIO.&lt;br /&gt;
 00860 24 68 6F 73 74 69 6F 30 24 68 6F 73 74 69 6F 31 $hostio0$hostio1&lt;br /&gt;
 00870 61 63 3A 75 00 00 00 00 62 6F 73 73 3A 55 00 00 ac:u....boss:U..&lt;br /&gt;
 00880 63 61 6D 3A 75 00 00 00 63 65 63 64 3A 75 00 00 cam:u...cecd:u..&lt;br /&gt;
 00890 63 66 67 3A 75 00 00 00 64 6C 70 3A 46 4B 43 4C cfg:u...dlp:FKCL&lt;br /&gt;
 008A0 64 6C 70 3A 53 52 56 52 64 73 70 3A 3A 44 53 50 dlp:SRVRdsp::DSP&lt;br /&gt;
 008B0 66 72 64 3A 75 00 00 00 66 73 3A 55 53 45 52 00 frd:u...fs:USER.&lt;br /&gt;
 008C0 67 73 70 3A 3A 47 70 75 68 69 64 3A 55 53 45 52 gsp::Gpuhid:USER&lt;br /&gt;
 008D0 68 74 74 70 3A 43 00 00 6D 69 63 3A 75 00 00 00 http:C..mic:u...&lt;br /&gt;
 008E0 6E 64 6D 3A 75 00 00 00 6E 65 77 73 3A 75 00 00 ndm:u...&amp;lt;nowiki&amp;gt;news:u..&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 008F0 6E 77 6D 3A 3A 55 44 53 70 74 6D 3A 75 00 00 00 nwm::UDSptm:u...&lt;br /&gt;
 00900 70 78 69 3A 64 65 76 00 73 6F 63 3A 55 00 00 00 pxi:dev.soc:U...&lt;br /&gt;
 00910 73 73 6C 3A 43 00 00 00 79 32 72 3A 75 00 00 00 ssl:C...y2r:u...&lt;br /&gt;
 00920 69 72 3A 55 53 45 52 00 6C 64 72 3A 72 6F 00 00 ir:USER.ldr:ro..&lt;br /&gt;
 00930 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................&lt;br /&gt;
 00940 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................&lt;br /&gt;
 00950 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................&lt;br /&gt;
 00960 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................&lt;br /&gt;
 ... ...&lt;br /&gt;
 009D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF                 &lt;br /&gt;
 009E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................&lt;br /&gt;
 009F0 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 02 . .............&lt;br /&gt;
&lt;br /&gt;
=== Extended Header ===&lt;br /&gt;
See also: [https://github.com/3dshax/ctr/blob/master/ctrtool/exheader.h]&lt;br /&gt;
&lt;br /&gt;
See [[NCCH/Extended Header|this]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
[https://github.com/3dshax/ctr/tree/master/ctrtool ctrtool] - (CMD)(Windows/Linux) Parsing and decrypting(debug only) NCCH files&lt;br /&gt;
&lt;br /&gt;
[[3DSExplorer]] - (GUI)(Windows Only) Parsing NCCH files&lt;/div&gt;</summary>
		<author><name>Idunoe</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=NCCH&amp;diff=11231</id>
		<title>NCCH</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=NCCH&amp;diff=11231"/>
		<updated>2014-12-22T06:33:03Z</updated>

		<summary type="html">&lt;p&gt;Idunoe: /* NCCH Flags */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
The following text tries to document the structure of the NCCH container format.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
There are two known NCCH container specialisations used on the 3DS, &amp;quot;executable&amp;quot; and &amp;quot;non-executable&amp;quot;, officially known as CXI and CFA respectively.&lt;br /&gt;
&lt;br /&gt;
== CXI == &lt;br /&gt;
&lt;br /&gt;
The CXI (CTR Executable Image) specialisation of the NCCH container, contains executable code, which runs on a single ARM11 core. It can communicate through SVC calls with the other ARM11 core running the &#039;system&#039; program code. For reasons of clarity, the ARM11 cores will sometimes be called the &#039;appcore&#039; and &#039;syscore&#039; respectively.&lt;br /&gt;
&lt;br /&gt;
The CXI format is structured in the following order:&lt;br /&gt;
* first a NCCH header,&lt;br /&gt;
* followed by an extended header,&lt;br /&gt;
* followed by an access descriptor,&lt;br /&gt;
* followed by an &#039;&#039;&#039;optional&#039;&#039;&#039; plain binary region,&lt;br /&gt;
* followed by an &#039;&#039;&#039;optional&#039;&#039;&#039; executable filesystem ([[ExeFS]]) - (contains ARM11 code, Home menu [[SMDH|icn]]/bnr and [[Logo|logo]]),&lt;br /&gt;
* and finally followed by an &#039;&#039;&#039;optional&#039;&#039;&#039; read-only filesystem ([[RomFS]]) - (Used for external file storage).&lt;br /&gt;
&lt;br /&gt;
The extended header contains additional information regarding access control. &lt;br /&gt;
The plain binary region is an area specifically stored in plaintext, mostly containing SDK library strings for identification.&lt;br /&gt;
&lt;br /&gt;
== CFA ==&lt;br /&gt;
&lt;br /&gt;
The CFA (CTR File Archive) specialisation of the NCCH container, is not executable, but are used in conjunction with CXI files. For instance the DLP Child Container and the Electronic Manual. (There is a system update NCCH which follows this format, but is used by the 3DS rather than the Application NCCH, and only works when embedded in the [[CCI]] format because the nVer is kept in the header of retail [[CCI]] files instead of the application NCCH). There are CFA files which exist alone in a title, but these are just [[Title list|System Data Archive]] titles and are found only in the [[Flash Filesystem#CTR partition|NAND]].&lt;br /&gt;
&lt;br /&gt;
CFA files are structured in the following order:&lt;br /&gt;
* first a NCCH header,&lt;br /&gt;
* followed by an &#039;&#039;&#039;optional&#039;&#039;&#039; executable filesystem ([[ExeFS]]) (same as in CXI, except no ARM11 code)&lt;br /&gt;
* followed by an &#039;&#039;&#039;optional&#039;&#039;&#039; read-only filesystem ([[RomFS]])&lt;br /&gt;
&lt;br /&gt;
Non-Executable NCCH file examples(Includes Decrypted [[RomFS]]):&lt;br /&gt;
&lt;br /&gt;
[https://dl.dropbox.com/u/60710927/CTR/Sample/DLP%20Child.7z DLPChild Container]&lt;br /&gt;
[https://dl.dropbox.com/u/60710927/CTR/Sample/Manual.7z Electronic Manual]&lt;br /&gt;
&lt;br /&gt;
== NCCH Specs ==&lt;br /&gt;
&lt;br /&gt;
=== Encryption ===&lt;br /&gt;
The extended header, the [[ExeFS]] and the [[RomFS]] are encrypted using 128-bit AES CTR. See here regarding the [https://github.com/3dshax/ctr/blob/master/ctrtool/ncch.c CTR].&lt;br /&gt;
&lt;br /&gt;
By default encrypted regions are compressed(ExeFS:/.code only) with an LZ77 variant, then encrypted. The spec allows for both unencrypted and uncompressed regions to exist. Development units use a fixed system key for system titles. For the &amp;quot;Secure crypto&amp;quot; NCCH encryption mode(the encryption mode used for retail NCCH) the [[AES|keyY]] is the first 0x10-bytes of the NCCH signature, the AES engine internally generates the final-normal key(see [[AES|here]] for the keyslot).&lt;br /&gt;
&lt;br /&gt;
As of [[7.0.0-13]] the system now supports a new encryption method for the secure-cryptotype, the CTR for this is the same as before. This is enabled when NCCH flag[3] is non-zero. When enabled, the [[RomFS]] and [[ExeFS]] files which don&#039;t have filenames &amp;quot;icon&amp;quot; or &amp;quot;banner&amp;quot;(that is, &amp;quot;.code&amp;quot;) are crypted with a different keyslot. This keyslot is [[Savegames|initialized]] by the 6.0 gamecard savegame keyY init function during boot, using a different portion of the [[Savegames|final]] hash(this keyslot is separate from the one used for the 6.0 save crypto).&lt;br /&gt;
&lt;br /&gt;
With New3DS [[9.3.0-21|9.3.0-X]] new NCCH crypto support was added, enabled via ncchflag[3]=0x0A. This is identical to the v7.0 crypto except with a New3DS-only keyslot.&lt;br /&gt;
&lt;br /&gt;
=== Format ===&lt;br /&gt;
&lt;br /&gt;
On retail for SD applications, exheader_systeminfoflags.flag bit1 must be set.&lt;br /&gt;
&lt;br /&gt;
Retail CFAs use NCCH product code &amp;quot;CTR-P-CTAP&amp;quot;, while retail title/gamecard CXIs use NCCH product code &amp;quot;CTR-P-XXXX&amp;quot;. This product code is the NCCH [[Serials|serial code]]. The region-locking info checked by home menu is stored in the [[SMDH#BNR Region|icon]].&lt;br /&gt;
&lt;br /&gt;
All of the hashes stored in this NCCH header are over the cleartext data. The ExeFS/RomFS superblock starts at offset 0x0 in the ExeFS/RomFS, and the size is specified by the hash region fields. Interestingly, Nintendo&#039;s NCCH validation code seems to have the size of this region fixed to 0x200 bytes (for ExeFS at least). &lt;br /&gt;
&lt;br /&gt;
As of [[5.0.0-11]] the application [[ExeFS]]:/.logo can be loaded from the plaintext region between the access descriptor and the plain region, all applications built since [[5.0.0-11]] store the logo here. The size of this logo is always 0x2000-bytes.&lt;br /&gt;
&lt;br /&gt;
The plain region mainly contains tags for each SDK library used when building the CXI. The version used for the &amp;quot;FIRMWARE&amp;quot; tag is the kernel/FIRM [[Configuration_Memory|version]], this version can also be stored in the exheader &amp;quot;kernel release version&amp;quot; ARM11 kernel descriptor field. As of [[2.2.0-X]] the NATIVE_FIRM kernels check the CXI exheader &amp;quot;kernel release version&amp;quot; field, if it is stored in the CXI exheader. If the kernel/FIRM version specified by this field is higher than the version of the running NATIVE_FIRM, the kernel will return error-code 0xD9001413.&lt;br /&gt;
&lt;br /&gt;
=== NCCH Header ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  OFFSET&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  0x000&lt;br /&gt;
|  0x100&lt;br /&gt;
|  RSA-2048 signature of the NCCH header, using SHA-256.&lt;br /&gt;
|-&lt;br /&gt;
|  0x100&lt;br /&gt;
|  4&lt;br /&gt;
|  Magic ID, always &#039;NCCH&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  0x104&lt;br /&gt;
|  4&lt;br /&gt;
|  Content size, in media units (1 media unit = 0x200 bytes)&lt;br /&gt;
|-&lt;br /&gt;
|  0x108&lt;br /&gt;
|  8&lt;br /&gt;
|  Partition ID&lt;br /&gt;
|-&lt;br /&gt;
|  0x110&lt;br /&gt;
|  2&lt;br /&gt;
|  Maker code&lt;br /&gt;
|-&lt;br /&gt;
|  0x112&lt;br /&gt;
|  2&lt;br /&gt;
|  Version&lt;br /&gt;
|-&lt;br /&gt;
|  0x114&lt;br /&gt;
|  4&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x118&lt;br /&gt;
|  8&lt;br /&gt;
|  Program ID&lt;br /&gt;
|-&lt;br /&gt;
|  0x120&lt;br /&gt;
|  0x10&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x130&lt;br /&gt;
|  0x20&lt;br /&gt;
|  Logo Region SHA-256 hash. (For applications built with SDK 5+) (Supported from firmware: [[5.0.0-11]])&lt;br /&gt;
|-&lt;br /&gt;
|  0x150&lt;br /&gt;
|  0x10&lt;br /&gt;
|  Product code&lt;br /&gt;
|-&lt;br /&gt;
|  0x160&lt;br /&gt;
|  0x20&lt;br /&gt;
|  Extended header SHA-256 hash (SHA256 of 2x Alignment Size, beginning at 0x0 of ExHeader)&lt;br /&gt;
|-&lt;br /&gt;
|  0x180&lt;br /&gt;
|  4&lt;br /&gt;
|  Extended header size&lt;br /&gt;
|-&lt;br /&gt;
|  0x184&lt;br /&gt;
|  4&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x188&lt;br /&gt;
|  8&lt;br /&gt;
|  Flags (See Below)&lt;br /&gt;
|-&lt;br /&gt;
|  0x190&lt;br /&gt;
|  4&lt;br /&gt;
|  Plain region offset, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x194&lt;br /&gt;
|  4&lt;br /&gt;
|  Plain region size, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x198&lt;br /&gt;
|  4&lt;br /&gt;
|  Logo Region offset, in media units (For applications built with SDK 5+) (Supported from firmware: [[5.0.0-11]])&lt;br /&gt;
|-&lt;br /&gt;
|  0x19c&lt;br /&gt;
|  4&lt;br /&gt;
|  Logo Region size, in media units (For applications built with SDK 5+) (Supported from firmware: [[5.0.0-11]])&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A0&lt;br /&gt;
|  4&lt;br /&gt;
|  ExeFS offset, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A4&lt;br /&gt;
|  4&lt;br /&gt;
|  ExeFS size, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1A8&lt;br /&gt;
|  4&lt;br /&gt;
|  ExeFS hash region size, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1AC&lt;br /&gt;
|  4&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x1B0&lt;br /&gt;
|  4&lt;br /&gt;
|  RomFS offset, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1B4&lt;br /&gt;
|  4&lt;br /&gt;
|  RomFS size, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1B8&lt;br /&gt;
|  4&lt;br /&gt;
|  RomFS hash region size, in media units&lt;br /&gt;
|-&lt;br /&gt;
|  0x1BC&lt;br /&gt;
|  4&lt;br /&gt;
|  Reserved&lt;br /&gt;
|-&lt;br /&gt;
|  0x1C0&lt;br /&gt;
|  0x20&lt;br /&gt;
|  ExeFS superblock SHA-256 hash - (SHA-256 hash, starting at 0x0 of the ExeFS over the number of media units specified in the ExeFS hash region size)&lt;br /&gt;
|-&lt;br /&gt;
|  0x1E0&lt;br /&gt;
|  0x20&lt;br /&gt;
|  RomFS superblock SHA-256 hash - (SHA-256 hash, starting at 0x0 of the RomFS over the number of media units specified in the RomFS hash region size)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NCCH Flags ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  INDEX&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  3&lt;br /&gt;
|  Crypto Method: When this is non-zero, a NCCH crypto method using two keyslots is used(see above). v7.0 keyslot(Old3DS/New3DS) = 0x01, v9.3 keyslot(New3DS only) = 0x0A.&lt;br /&gt;
|-&lt;br /&gt;
|  4&lt;br /&gt;
|  Content Platform: 1 = CTR.&lt;br /&gt;
|-&lt;br /&gt;
|  5&lt;br /&gt;
|  Content Type Bit-masks: Data = 0x1, Executable = 0x2, SystemUpdate = 0x4, Manual = 0x8, Child = (0x4&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;0x8), Trial = 0x10. When &#039;Data&#039; is set, but not &#039;Executable&#039;, NCCH is a CFA. Otherwise when &#039;Executable&#039; is set, NCCH is a CXI.&lt;br /&gt;
|-&lt;br /&gt;
|  6&lt;br /&gt;
|  Content Unit Size i.e. u32 ContentUnitSize = 0x200*2^flags[6]; &lt;br /&gt;
|-&lt;br /&gt;
|  7&lt;br /&gt;
|  Bit-masks: FixedCryptoKey = 0x1, NoMountRomFs = 0x2, NoCrypto = 0x4&lt;br /&gt;
|}&lt;br /&gt;
CXIs NCCH header signature is verified using the RSA public key stored in the accessdesc,(which follows the exheader) while CFAs NCCH header is verified with a fixed RSA public key.&lt;br /&gt;
&lt;br /&gt;
==== NCCH header example for Lego Starwars III ====&lt;br /&gt;
 Signature:              720FF8F83F2A1E998322A026D1434165&lt;br /&gt;
                         ED19642ABC1CB2722135AA202BEAD60A&lt;br /&gt;
                         80BCD21C768C597B8268FEF2C64EA710&lt;br /&gt;
                         4C9BA5E12CFFBD1D0C619F4EF7B42CA7&lt;br /&gt;
                         DD8482CB4EB26720AD66CDA57ABCBCFB&lt;br /&gt;
                         D63268A6E2896A59B3B744E39E45B88A&lt;br /&gt;
                         ABB4C0980ACC6210818DCE6DAC838A10&lt;br /&gt;
                         95D0F66B352474D4B3DA4B333F49912D&lt;br /&gt;
                         29AF7EA58BC8C890B18C70B7D540A9FB&lt;br /&gt;
                         EBE24A5312055617D3353B28C3EB1D17&lt;br /&gt;
                         61021BEFF6AD22C384835B40BD44DFAD&lt;br /&gt;
                         981F6350F9458B17BCB5F768C92ABC93&lt;br /&gt;
                         2BCE9888855A8998F4CDE40C9543514A&lt;br /&gt;
                         C57B84EB75A680E7C742632614620D1D&lt;br /&gt;
                         A253284DF3DC01091EB3800C36FD62EE&lt;br /&gt;
                         BA15340F1FD498FAB67C0302E9CDA397&lt;br /&gt;
 Magic:                  NCCH&lt;br /&gt;
 Content size:           0x1cfef400&lt;br /&gt;
 Partition id:           0004000000038c00&lt;br /&gt;
 Maker code:             3436 (&amp;quot;46&amp;quot;)&lt;br /&gt;
 Version:                0002&lt;br /&gt;
 Program id:             0004000000038c00&lt;br /&gt;
 Temp flag:              00&lt;br /&gt;
 Product code:           CTR-P-ALGP&lt;br /&gt;
 Extended header hash:   0C27E3C1DE7B2AE2D3114F32A4EEBF46&lt;br /&gt;
                         9AFD0CF352C11D4984C2A9F1D2144C63&lt;br /&gt;
 Extended header size:   00000400&lt;br /&gt;
 Flags:                  0000030100000000&lt;br /&gt;
 Plain region offset:    0x00004a00&lt;br /&gt;
 Plain region size:      0x00000200&lt;br /&gt;
 ExeFS offset:           0x00004c00&lt;br /&gt;
 ExeFS size:             0x00143800&lt;br /&gt;
 ExeFS hash region size: 0x00000200&lt;br /&gt;
 RomFS offset:           0x00148400&lt;br /&gt;
 RomFS size:             0x1ceab000&lt;br /&gt;
 RomFS hash region size: 0x00000200&lt;br /&gt;
 ExeFS Superblock Hash:  130C042615F647C4C63225EA9E67F8A2&lt;br /&gt;
                         7B15246B88FBC7A927257B84977B787B&lt;br /&gt;
 RomFS Superblock Hash:  A65BEE1060BB6A6821BBCEC600035B7E&lt;br /&gt;
                         64FB6EACA7F0960CFB1F5A37087728F7&lt;br /&gt;
 Note: Offsets and sizes in media units have been converted to byte sizes.&lt;br /&gt;
&lt;br /&gt;
==== Plain region example for Lego Starwars III ====&lt;br /&gt;
 0004a00: 5b 53 44 4b 2b 4e 49 4e 54 45 4e 44 4f 3a 43 54  [SDK+NINTENDO:CT    [SDK+NINTENDO:CTR_SDK-0_14_23_200_none]&lt;br /&gt;
 0004a10: 52 5f 53 44 4b 2d 30 5f 31 34 5f 32 33 5f 32 30  R_SDK-0_14_23_20&lt;br /&gt;
 0004a20: 30 5f 6e 6f 6e 65 5d 00 5b 53 44 4b 2b 4e 49 4e  0_none].[SDK+NIN    [SDK+NINTENDO:Firmware-02_27]&lt;br /&gt;
 0004a30: 54 45 4e 44 4f 3a 46 69 72 6d 77 61 72 65 2d 30  TENDO:Firmware-0&lt;br /&gt;
 0004a40: 32 5f 32 37 5d 00 5b 53 44 4b 2b 4d 6f 62 69 63  2_27].[SDK+Mobic    [SDK+Mobiclip:Deblocker_1_0_2]&lt;br /&gt;
 0004a50: 6c 69 70 3a 44 65 62 6c 6f 63 6b 65 72 5f 31 5f  lip:Deblocker_1_&lt;br /&gt;
 0004a60: 30 5f 32 5d 00 5b 53 44 4b 2b 4d 6f 62 69 63 6c  0_2].[SDK+Mobicl    [SDK+Mobiclip:ImaAdpcmDec_1_0_0]&lt;br /&gt;
 0004a70: 69 70 3a 49 6d 61 41 64 70 63 6d 44 65 63 5f 31  ip:ImaAdpcmDec_1&lt;br /&gt;
 0004a80: 5f 30 5f 30 5d 00 5b 53 44 4b 2b 4d 6f 62 69 63  _0_0].[SDK+Mobic    [SDK+Mobiclip:MobiclipDec_1_0_1]&lt;br /&gt;
 0004a90: 6c 69 70 3a 4d 6f 62 69 63 6c 69 70 44 65 63 5f  lip:MobiclipDec_&lt;br /&gt;
 0004aa0: 31 5f 30 5f 31 5d 00 5b 53 44 4b 2b 4d 6f 62 69  1_0_1].[SDK+Mobi    [SDK+Mobiclip:MoflexDemuxer_1_0_2]&lt;br /&gt;
 0004ab0: 63 6c 69 70 3a 4d 6f 66 6c 65 78 44 65 6d 75 78  clip:MoflexDemux&lt;br /&gt;
 0004ac0: 65 72 5f 31 5f 30 5f 32 5d 00 00 00 00 00 00 00  er_1_0_2].......&lt;br /&gt;
 0004ad0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................&lt;br /&gt;
 0004ae0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................&lt;br /&gt;
&lt;br /&gt;
==== Example dependency list from the extended header ====&lt;br /&gt;
 00850 41 50 54 3A 55 00 00 00 24 68 69 6F 46 49 4F 00 APT:U...$hioFIO.&lt;br /&gt;
 00860 24 68 6F 73 74 69 6F 30 24 68 6F 73 74 69 6F 31 $hostio0$hostio1&lt;br /&gt;
 00870 61 63 3A 75 00 00 00 00 62 6F 73 73 3A 55 00 00 ac:u....boss:U..&lt;br /&gt;
 00880 63 61 6D 3A 75 00 00 00 63 65 63 64 3A 75 00 00 cam:u...cecd:u..&lt;br /&gt;
 00890 63 66 67 3A 75 00 00 00 64 6C 70 3A 46 4B 43 4C cfg:u...dlp:FKCL&lt;br /&gt;
 008A0 64 6C 70 3A 53 52 56 52 64 73 70 3A 3A 44 53 50 dlp:SRVRdsp::DSP&lt;br /&gt;
 008B0 66 72 64 3A 75 00 00 00 66 73 3A 55 53 45 52 00 frd:u...fs:USER.&lt;br /&gt;
 008C0 67 73 70 3A 3A 47 70 75 68 69 64 3A 55 53 45 52 gsp::Gpuhid:USER&lt;br /&gt;
 008D0 68 74 74 70 3A 43 00 00 6D 69 63 3A 75 00 00 00 http:C..mic:u...&lt;br /&gt;
 008E0 6E 64 6D 3A 75 00 00 00 6E 65 77 73 3A 75 00 00 ndm:u...&amp;lt;nowiki&amp;gt;news:u..&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 008F0 6E 77 6D 3A 3A 55 44 53 70 74 6D 3A 75 00 00 00 nwm::UDSptm:u...&lt;br /&gt;
 00900 70 78 69 3A 64 65 76 00 73 6F 63 3A 55 00 00 00 pxi:dev.soc:U...&lt;br /&gt;
 00910 73 73 6C 3A 43 00 00 00 79 32 72 3A 75 00 00 00 ssl:C...y2r:u...&lt;br /&gt;
 00920 69 72 3A 55 53 45 52 00 6C 64 72 3A 72 6F 00 00 ir:USER.ldr:ro..&lt;br /&gt;
 00930 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................&lt;br /&gt;
 00940 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................&lt;br /&gt;
 00950 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................&lt;br /&gt;
 00960 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................&lt;br /&gt;
 ... ...&lt;br /&gt;
 009D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF                 &lt;br /&gt;
 009E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................&lt;br /&gt;
 009F0 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 02 . .............&lt;br /&gt;
&lt;br /&gt;
=== Extended Header ===&lt;br /&gt;
See also: [https://github.com/3dshax/ctr/blob/master/ctrtool/exheader.h]&lt;br /&gt;
&lt;br /&gt;
See [[NCCH/Extended Header|this]]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
[https://github.com/3dshax/ctr/tree/master/ctrtool ctrtool] - (CMD)(Windows/Linux) Parsing and decrypting(debug only) NCCH files&lt;br /&gt;
&lt;br /&gt;
[[3DSExplorer]] - (GUI)(Windows Only) Parsing NCCH files&lt;/div&gt;</summary>
		<author><name>Idunoe</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Home_Menu&amp;diff=11003</id>
		<title>Home Menu</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Home_Menu&amp;diff=11003"/>
		<updated>2014-12-09T02:16:53Z</updated>

		<summary type="html">&lt;p&gt;Idunoe: /* System Versions List */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Home Menu&#039;&#039;&#039; is the heart of the Nintendo 3DS. From there one can start games, applications, and access various processes including the friends list. It is launched by [[NS]], and is always running in the background in 3DS-mode except when other programID-high 00040030 applications like Internet Browser, Friend-List, etc are running. Home Menu is still running while [[System Settings]] is running, however the System Settings application does not allow directly returning to home-menu. The system will normally re-launch Home Menu when the Home Menu process crashes/terminates. When this re-launch occurs while Home Menu is active, Home Menu displays an error message which says to manually reboot the system.&lt;br /&gt;
&lt;br /&gt;
== System Versions ==&lt;br /&gt;
Nintendo devised a system, whereby updates would be delivered via two channels: &lt;br /&gt;
*Card Updates (CUP) - The Nintendo 3DS is updated with data from an [[System Update CFA|update partition]] on retail gamecard title. &lt;br /&gt;
*Network Updates (NUP) - The Nintendo 3DS is updated by downloading data from Nintendo&#039;s [[Title list|CDN]].&lt;br /&gt;
&lt;br /&gt;
CUPs will only deliver updates to core features, such as the Home Menu, [[Nintendo 3DS Camera]] etc. CUPs will not deliver updates to Network features, such as [[System Transfer]], [[Internet Browser]], [[StreetPass Mii Plaza]] or [[EShop|eShop]].&lt;br /&gt;
&lt;br /&gt;
NUPs can deliver updates to core features as well as (updated) Network Features.&lt;br /&gt;
&lt;br /&gt;
As a result of deciding to make a distinction between what content could be updated and how, Nintendo split the system version displayed by [[System Settings]] into two parts: [[CVer]] (Console Version) and [[NVer]] (Network Update Version). Represented as: &lt;br /&gt;
 &amp;lt;CVer Major&amp;gt;.&amp;lt;CVer Minor&amp;gt;.&amp;lt;CVer Micro&amp;gt;-&amp;lt;NUP Version&amp;gt;&amp;lt;NUP Region&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Console Version represents the version of the collectively installed core features. And the NUP Version represents the version of the collectively installed network features.&lt;br /&gt;
&lt;br /&gt;
So if a 3DS&#039; System Firmware read &#039;&#039;&#039;2.1.0-2U&#039;&#039;&#039;, it would indicate a console version of &#039;&#039;&#039;2.1.0&#039;&#039;&#039; and a NUP version of &#039;&#039;&#039;2U&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
NOTES:&lt;br /&gt;
* CUPs can only update core content, so [[NVer]] is never updated with CUPs.&lt;br /&gt;
* NUPs will not update [[NVer]] if network features are not updated. (Best seen with the USA vs JPN/EUR 6.0.0 NUP)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CUPs are implemented by adding a [[System Update CFA]] to retail NCSD gamecard images. Nintendo generally creates CUPs after NUPs are released.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When updating the system from 4.5.0-6 to 4.5.0-10, the following titles are updated(in the order of title download+install): [[Health and Safety Information]], [[Nintendo 3DS Camera]], [[eShop]], [[System Transfer]], [[Internet Browser]], [[Title_list|0004009B00014102]], [[Title_list|0004009B00014202]], [[Title_list|0004009B00014302]], [[NVer]], and [[FIRM|AGB_FIRM]].&lt;br /&gt;
&lt;br /&gt;
=== System Versions List ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! System version &lt;br /&gt;
! Home Menu title version&lt;br /&gt;
! Release date &lt;br /&gt;
! Changelog &lt;br /&gt;
! System security [[3DS_exploits|flaws]] fixed*&lt;br /&gt;
! 3DS-mode homebrew affected*&lt;br /&gt;
! CUP Released&lt;br /&gt;
! CDN Availability&lt;br /&gt;
! CDN Post Date&lt;br /&gt;
|-&lt;br /&gt;
| [[1.0.0-0|1.0.0-0]]&lt;br /&gt;
| 0&lt;br /&gt;
| February 26, 2011&lt;br /&gt;
| Shipped with 3DS on launch&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| February 18, 2011&lt;br /&gt;
|-&lt;br /&gt;
| [[1.1.0-1|1.1.0-1]] &lt;br /&gt;
| 0 &lt;br /&gt;
| February ?, 2011&lt;br /&gt;
| General bug fixes&lt;br /&gt;
Added 3D Video title to menu. (&amp;quot;For a Limited Time Only&amp;quot;)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| March 1, 2011&lt;br /&gt;
|-&lt;br /&gt;
| [[2.0.0-2|2.0.0-2]]&lt;br /&gt;
| 1029&lt;br /&gt;
| June 6/7, 2011&lt;br /&gt;
| [[eShop]] added, web browser available, [[System Transfer]] added. Full DSiWare data management available. [[Automatic_System_Update_Download|Automatic]] downloading for system updates added.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| June 6, 2011&lt;br /&gt;
|-&lt;br /&gt;
| [[2.1.0-3|2.1.0-3]]&lt;br /&gt;
| 2049&lt;br /&gt;
| June 15, 2011&lt;br /&gt;
| Fixes the Ridge Racer freeze.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| June 15, 2011&lt;br /&gt;
|-&lt;br /&gt;
| [[2.1.0-4|2.1.0-4]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| July 25, 2011&lt;br /&gt;
| System stability improvements and other adjustments.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| July 25, 2011&lt;br /&gt;
|-&lt;br /&gt;
| [[2.2.0-X|2.2.0]]&lt;br /&gt;
| ?&lt;br /&gt;
| November 6, 2011&lt;br /&gt;
| CUP Only Release. Improved the arrangement of [[Friend List]]. Update from some game cards such as Super Mario 3D Land.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Unavailable&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| [[3.0.0-5|3.0.0-5]]&lt;br /&gt;
| 4111&lt;br /&gt;
| December 7, 2011&lt;br /&gt;
| Added 3D video recording to the camera title, updated Mii Streetpass Plaza, [[System Transfer]] between 3DS systems available, improved eShop, home menu QR code scanning with QR codes containing URLs. [[Nintendo Zone]] is now always accessible, 3D video streaming support was added to NZone. This added support for running GBA VC titles via AGB_FIRM as well, support for GBA VC titles was also added to NATIVE_FIRM.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| December 7, 2011&lt;br /&gt;
|-&lt;br /&gt;
| [[3.0.0-6|3.0.0-6]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| December 21, 2011&lt;br /&gt;
| Only StreetPass Mii Plaza and the [[NVer]] title were updated. From Nintendo&#039;s release notes: &amp;quot;System stability improvements and other adjustments&amp;quot;.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| December 21, 2011&lt;br /&gt;
|-&lt;br /&gt;
| [[4.0.0-7|4.0.0-7]]&lt;br /&gt;
| 5131&lt;br /&gt;
| April 24, 2012&lt;br /&gt;
| Add folders to Home Menu, game patching added, buy more expensive games than 1000 yen in JPN. System titles for CHN, TWN, and KOR became available.&lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| April 24, 2012&lt;br /&gt;
|-&lt;br /&gt;
| [[4.1.0-8|4.1.0-8]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| May 14, 2012&lt;br /&gt;
| From changelog: &amp;quot;improvements to overall system stability and other minor adjustments&amp;quot;. Once updated to [[4.1.0-8]], the parental-controls PIN is no longer required for future system updates.&lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| May 14, 2012&lt;br /&gt;
|-&lt;br /&gt;
| [[4.2.0-9|4.2.0-9]]&lt;br /&gt;
| 6146&lt;br /&gt;
| June 26, 2012&lt;br /&gt;
| Improved eShop safety for entering credit-card info, and behind the scenes improvements. Stored CC info will be deleted by this updated eShop, and can be re-entered again.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| June 26, 2012&lt;br /&gt;
|-&lt;br /&gt;
| [[4.3.0-10|4.3.0-10]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| July 24, 2012&lt;br /&gt;
| Updated eShop, bad word list and NZone hotspot list updated.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| July 24, 2012&lt;br /&gt;
|-&lt;br /&gt;
| [[4.4.0-10|4.4.0-10]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| September 19, 2012&lt;br /&gt;
| NZone hotspot list updated and TWL_FIRM updated for blocking flash cards.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| September 19, 2012&lt;br /&gt;
|-&lt;br /&gt;
| [[4.4.0-10|4.4.0-10C]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| October 17, 2012&lt;br /&gt;
| China-only, the *only* updated title was [[System Settings]]. This title was updated to a version already available in TWN/KOR.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| ?&lt;br /&gt;
| Available&lt;br /&gt;
| October 17, 2012&lt;br /&gt;
|-&lt;br /&gt;
| [[4.5.0-10|4.5.0-10]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| December 4, 2012&lt;br /&gt;
| Flash-card block via updated TWL_FIRM and whitelist. NZone hotspot list updated as well.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| December 4, 2012&lt;br /&gt;
|-&lt;br /&gt;
| [[5.0.0-11|5.0.0-11]]&lt;br /&gt;
| 7172&lt;br /&gt;
| March 25, 2013&lt;br /&gt;
| Many system titles including NATIVE_FIRM were updated, multiple vulnerabilities were fixed as well.&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| March 25, 2013&lt;br /&gt;
|-&lt;br /&gt;
| [[5.1.0-11|5.1.0-11]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| April 4, 2013&lt;br /&gt;
| NATIVE_FIRM and NS were updated. According to the official change-log: &amp;quot;Resolves an issue that may prevent access to the System Settings or other features.&amp;quot;&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| April 4, 2013&lt;br /&gt;
|-&lt;br /&gt;
| [[6.0.0-11|6.0.0-12 (-11U)]]&lt;br /&gt;
| 8198&lt;br /&gt;
| June 17, 2013&lt;br /&gt;
| Official change-log: &amp;quot;Users can now back up save data for downloadable versions of Nintendo 3DS software and most Virtual Console games&amp;quot;. For EUR/JPN, the [[StreetPass Mii Plaza]] application and the [[Nintendo 3DS Camera]] application were updated. Other titles for all regions were updated as well.&lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| June 17, 2013&lt;br /&gt;
|-&lt;br /&gt;
| [[6.1.0-11|6.1.0-12 (-11U)]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| June 27, 2013&lt;br /&gt;
| Official change-log: &amp;quot;Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience.&amp;quot;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| June 27, 2013&lt;br /&gt;
|-&lt;br /&gt;
| [[6.1.0-12U]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| July 11, 2013&lt;br /&gt;
| This USA-only update added the updated network features applications which were first released in JPN/EUR with the [[6.0.0-11|6.0.0-12 NUP]] update.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| July 11, 2013&lt;br /&gt;
|-&lt;br /&gt;
| [[6.2.0-12]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| August 6, 2013&lt;br /&gt;
| This update added support for the StreetPass relay feature, updated TWL_FIRM, and updated the Nintendo Zone hotspots list.&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| August 6, 2013&lt;br /&gt;
|-&lt;br /&gt;
| [[6.3.0-12]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| September 13, 2013&lt;br /&gt;
| See [[6.3.0-12|this]].&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| September 13, 2013&lt;br /&gt;
|-&lt;br /&gt;
| [[6.4.0-12]]&lt;br /&gt;
| ?&lt;br /&gt;
| November 11, 2013&lt;br /&gt;
| See [[6.4.0-12|this]](Only for the KOR and TWN regions).&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| November 11, 2013&lt;br /&gt;
|-&lt;br /&gt;
| [[7.0.0-13]]&lt;br /&gt;
| 9230&lt;br /&gt;
| December 9, 2013&lt;br /&gt;
| See [[7.0.0-13|this]].&lt;br /&gt;
| Yes&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| December 9, 2013&lt;br /&gt;
|-&lt;br /&gt;
| [[7.1.0-14]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| December 19, 2013&lt;br /&gt;
| See [[7.1.0-14|this]].&lt;br /&gt;
| No&lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| December 19, 2013&lt;br /&gt;
|-&lt;br /&gt;
| [[7.1.0-15]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| January 22, 2014&lt;br /&gt;
| See [[7.1.0-15|this]].&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| January 22, 2014&lt;br /&gt;
|-&lt;br /&gt;
| [[7.1.0-16]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| February 26, 2014&lt;br /&gt;
| See [[7.1.0-16|this]].&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| February 26, 2014&lt;br /&gt;
|-&lt;br /&gt;
| [[7.2.0-17]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| May 12, 2014&lt;br /&gt;
| See [[7.2.0-17|this]].&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| May 12, 2014&lt;br /&gt;
|-&lt;br /&gt;
| [[8.0.0-18]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| July 7, 2014&lt;br /&gt;
| See [[8.0.0-18|this]].&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| July 7, 2014&lt;br /&gt;
|-&lt;br /&gt;
| [[8.1.0-18]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| July 24, 2014&lt;br /&gt;
| See [[8.1.0-18|this]].&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| Available&lt;br /&gt;
| July 24, 2014&lt;br /&gt;
|-&lt;br /&gt;
| [[8.1.0-19]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| August 7, 2014&lt;br /&gt;
| See [[8.1.0-19|this]].&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| August 7, 2014&lt;br /&gt;
|-&lt;br /&gt;
| [[8.1.0-0 New3DS]]&lt;br /&gt;
| Not updated&lt;br /&gt;
| September 26, 2014&lt;br /&gt;
| See [[8.1.0-0 New3DS|this]].&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| September 26, 2014&lt;br /&gt;
|-&lt;br /&gt;
| 8.1.0-19&lt;br /&gt;
| Not updated&lt;br /&gt;
| October 2, 2014&lt;br /&gt;
| Japan-only &amp;quot;update&amp;quot;, see [http://yls8.mtheall.com/ninupdates/reports.php?date=10-02-14_02-05-03&amp;amp;sys=ctr here]. The only change was that a new title([[New_3DS]]-only system application) was added, CVer/NVer titles were not even updated. The initial version of this [[Title_list|title]] is a stub.&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| October 2, 2014&lt;br /&gt;
|-&lt;br /&gt;
| [[9.0.0-20]]&lt;br /&gt;
| v11272&lt;br /&gt;
| October 6, 2014&lt;br /&gt;
| See [[9.0.0-20|this]].&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| October 6, 2014&lt;br /&gt;
|-&lt;br /&gt;
| [[9.1.0-20J]]&lt;br /&gt;
| v14336(JPN-region title)&lt;br /&gt;
| October 10, 2014&lt;br /&gt;
| Japan-only, see [[9.1.0-20J|this]].&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| October 10, 2014&lt;br /&gt;
|-&lt;br /&gt;
| [[9.2.0-20]]&lt;br /&gt;
| &lt;br /&gt;
| October 29, 2014&lt;br /&gt;
| See [[9.2.0-20|this]].&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| October 29, 2014&lt;br /&gt;
|-&lt;br /&gt;
| [[9.3.0-21]]&lt;br /&gt;
| &lt;br /&gt;
| December 8, 2014&lt;br /&gt;
| See [[9.3.0-21|this]].&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| Available&lt;br /&gt;
| December 8, 2014&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;System security [[3DS_exploits|flaws]] fixed*&amp;quot;: This includes known flaws, and any fixed flaws discovered via code bin-diff. This does not include ARM11-userland ROP entrypoints unless specifically mentioned otherwise on the system-update page.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;System security [[3DS_exploits|flaws]] fixed*&amp;quot; and &amp;quot;3DS-mode homebrew affected&amp;quot; only apply to the changes done with that specific system-update.&lt;br /&gt;
&lt;br /&gt;
[[Category:Nintendo Software]]&lt;br /&gt;
&lt;br /&gt;
== Auto-Boot Function ==&lt;br /&gt;
When the Home Menu is initially loaded by [[NS]], it checks the gamecard ExeFS:/[[SMDH|icon]] for the auto-boot flag. If the auto-boot flag is set, it will load the application on the cartridge and the home menu will not remain running in the background, or at least not in an operational state. Using software cues to return to the home menu, or sleep menu while in this state, causes a shutdown.&lt;br /&gt;
&lt;br /&gt;
Notable features of demo titles:&lt;br /&gt;
*Auto-boot demos generally disable the functionality of the home button.&lt;br /&gt;
*The &#039;&#039;New Super Mario Bros 2&#039;&#039; demo, retained the functionality of the home button, and had an timer which triggered the demo to quit after a period of inactivity.&lt;br /&gt;
&lt;br /&gt;
Auto-boot cartridges, can bypass some of the functions of the Home Menu. Auto Booted software:&lt;br /&gt;
* Doesn&#039;t show usage history in the [[Activity Log]]&lt;br /&gt;
* Bypasses Parental controls&lt;br /&gt;
* Bypasses Forced Game Card Updates&lt;br /&gt;
* Bypasses Initial 3DS Setup&lt;br /&gt;
* The console does not have a friends list presence.&lt;br /&gt;
* Is still subject to region lock(see below).&lt;br /&gt;
&lt;br /&gt;
Region lock is still active, so the home menu will refuse to launch demos with incorrect region lock will not load, displaying &amp;quot;An Error has Occurred&amp;quot;. However, game card update partition checks are not done, which allows launching demos that have region free encoding, but have an alternate(or even invalid) region update partition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following auto-boot paths can be used by Home Menu, checked in the same order listed below(the above gamecard auto-boot is checked before this):&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key-combo / requirements for this path&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| R, L, and X&lt;br /&gt;
| This launches [[System Settings]] for touchscreen calibration.&lt;br /&gt;
|-&lt;br /&gt;
| R, L, and Y&lt;br /&gt;
| This launches [[System Settings]] for circlepad calibration.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following is only checked when the low u16 from [[Config_Savegame|config]] block 0x00110000 is value zero(normally this is non-zero). Thus, the below is only handled when a system setup is required.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key-combo / requirements for this path&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| R, X, Y, A, and B, a 3DS gamecard must be inserted as well.&lt;br /&gt;
| This launches the gamecard application. Note that pressing the HOME button in the gamecard application launched this way will only result in the system shutting down.&lt;br /&gt;
|-&lt;br /&gt;
| This is used when the above path isn&#039;t used.&lt;br /&gt;
| This launches System Settings for the system setup.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Region Lockout ==&lt;br /&gt;
&lt;br /&gt;
One of the Home Menu&#039;s functions, is to regulate region lockout. The region lockout data for any given title is held in the [[SMDH#BNR Region|ICN data]]. There are 6 regions of which have their own region lockout, Japan, USA, Europe(including Nintendo Australia), China, Taiwan and Korea. There is also a value which makes a title exempt from region lockout, and consequently accessible from any region of 3DS.&lt;br /&gt;
&lt;br /&gt;
The region-field stored in the [[SMDH|ICN-data]] is only checked when Home Menu itself launches a title, not when other titles use NS to have Home Menu launch titles. This isn&#039;t actually useful for gamecard region-free however, due to the gamecard system-updates, see below.&lt;br /&gt;
&lt;br /&gt;
Also note that while some gamecard games are mostly region-free(main CXI is identical for all regions of the gamecard), those gamecards can&#039;t actually be launched with all 3DS regions due to the gamecard system-update, see below. Note that the main CXI being identical for all regions of a gamecard also means the savedata keyY is identical for all regions of that gamecard too(except for old system-version &amp;lt;v2.2 games, in some cases, due to different cardIDs).&lt;br /&gt;
&lt;br /&gt;
=== Effects of Region Lockout  ===&lt;br /&gt;
Every 3DS title regardless of location (NAND/SD Card/Game Card) is subject to region lockout scrutiny by the Home Menu. And the home menu treats &#039;out-of-region&#039; titles by simply refusing to show them on the home menu. No messages are shown on the home menu to notify the user, the title is simply ignored. However out-of-region SD Card titles, will appear and quickly disappear, while all the SD Titles are being processed. In cases where access to the home menu GUI is not needed to launch the title (like in the case of kiosk demos), the home menu states an error has occurred, and launching of the title is stopped.&lt;br /&gt;
&lt;br /&gt;
=== Game Card Updates ===&lt;br /&gt;
Either intentionally a region lock mechanism or not, the function which checks the game card update partition returns an error when it is detected the update is for a region other than the 3DS&#039;s region (Most likely triggered by the absence of the correct CVer title). And errors returned from checking the update partition, will result in the home menu displaying &amp;quot;This Game Card cannnot be used&amp;quot;, when the user attempts to launch the title.&lt;br /&gt;
&lt;br /&gt;
== Home-menu [[SpotPass]] usage ==&lt;br /&gt;
&lt;br /&gt;
Home-menu uses two domains with HTTPS for SpotPass. SpotPass stores this content in Home-menu&#039;s NAND shared extdata.&lt;br /&gt;
&lt;br /&gt;
* The system notifications are downloaded from: https://a248.e.akamai.net/f/248/103046/10m/npdl.c.app.nintendowifi.net/p01/nsa/&amp;lt;regionID&amp;gt;/&amp;lt;filename&amp;gt;/&amp;lt;langcode&amp;gt;/&amp;lt;filename&amp;gt; Where langcode is the two-character language codes from [[Config_Savegame|config]], and regionID is from the below table. &amp;lt;filename&amp;gt; is bashoX/sysmsgX where X is 0-3.&lt;br /&gt;
* https://pls.c.shop.nintendowifi.net/pl/upload This URL is used for uploading data from the home menu NAND shared extdata, it&#039;s unknown what this is used for. This data is uploaded every 24 hours.&lt;br /&gt;
* https://npul.c.app.nintendowifi.net/p01/recv/&amp;lt;regionID&amp;gt;/&amp;lt;filename&amp;gt; This is used for uploading unknown data from extdata. &amp;lt;filename&amp;gt; can be &amp;quot;phu&amp;quot;, &amp;quot;tiu&amp;quot;, &amp;quot;splu&amp;quot;, or &amp;quot;sendmgn&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Region&lt;br /&gt;
! ID&lt;br /&gt;
|-&lt;br /&gt;
| JPN&lt;br /&gt;
| gWr4JXxb2mKTG3lq&lt;br /&gt;
|-&lt;br /&gt;
| NA&lt;br /&gt;
| uuI82221UKkqmtbp&lt;br /&gt;
|-&lt;br /&gt;
| EUR / Others&lt;br /&gt;
| UrXSeurnxhPrq7AS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The SpotPass content payload for notifications begin with a header, followed by an [[SMDH|icon]] and the UTF-16 text, and various metadata.&lt;br /&gt;
&lt;br /&gt;
== Automatic System Update Download ==&lt;br /&gt;
See [[Automatic System Update Download]].&lt;br /&gt;
&lt;br /&gt;
== Home Menu Error Messages ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Dialog Text&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;An error has occured. Please save your data ... then restart the system&amp;quot;&lt;br /&gt;
| This dialog is displayed when a system process(including Home Menu) crashes/terminates. This dialog is also displayed for system errors as well.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Home Menu Themes ==&lt;br /&gt;
See [[Home_Menu/Themes|here]].&lt;br /&gt;
&lt;br /&gt;
== SD ExtData ==&lt;br /&gt;
The SD ExtData [[Extdata#Filesystem|File System]] for Home Menu is as follows:&lt;br /&gt;
&lt;br /&gt;
 root&lt;br /&gt;
 ├── icon&lt;br /&gt;
 ├── boss&lt;br /&gt;
 └── user&lt;br /&gt;
     ├── SaveData.dat&lt;br /&gt;
     ├── Cache.dat&lt;br /&gt;
     └── CacheD.dat&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  File&lt;br /&gt;
!  Details&lt;br /&gt;
!  Size&lt;br /&gt;
!  FW Introduced&lt;br /&gt;
!  Plaintext&lt;br /&gt;
|-&lt;br /&gt;
|  icon&lt;br /&gt;
|  Stubbed. Always image 00000002.&lt;br /&gt;
|  0x4 Bytes&lt;br /&gt;
|  n/a&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  SaveData.dat&lt;br /&gt;
|  Always image 00000003.&lt;br /&gt;
|  0x2cb0 Bytes&lt;br /&gt;
|  [[1.0.0-0]]&lt;br /&gt;
|  [https://dl.dropboxusercontent.com/u/60710927/CTR/Sample/HomeMenuExtdata/SaveData.dat Download]&lt;br /&gt;
|-&lt;br /&gt;
|  Cache.dat&lt;br /&gt;
|  Indexes and records details for the cached icon data. Always image 00000004.&lt;br /&gt;
|  0x1688 Bytes&lt;br /&gt;
|  [[1.0.0-0]]&lt;br /&gt;
|  [https://dl.dropboxusercontent.com/u/60710927/CTR/Sample/HomeMenuExtdata/Cache.dat Download]&lt;br /&gt;
|-&lt;br /&gt;
|  CacheD.dat&lt;br /&gt;
|  Cached icon data for Home Menu. Always image 00000005.&lt;br /&gt;
|  0x4cfe00 Bytes&lt;br /&gt;
|  [[1.0.0-0]]&lt;br /&gt;
|  [https://dl.dropboxusercontent.com/u/60710927/CTR/Sample/HomeMenuExtdata/CacheD.dat Download]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Cache.dat &amp;amp; CacheD.dat ===&lt;br /&gt;
These two files work in tandem to allow the home menu to cache icon data for applications which are presented on the Home Menu. The size of both files suggests a maximum cache size of 360 icons. Cache.dat stores details about the cache icon data, and CacheD.dat stores the icon data. The icon cache stores icon data for *all* applications shown on the Home Menu, this includes DSi NAND Titles, and DS(i) cartridges. The format of cached DS(i) icon data is not understood, but they are the same size as 3DS icon data (0x36c0).&lt;br /&gt;
&lt;br /&gt;
In Cache.dat the first 8 bytes are reserved, then follows each icon slots&#039;s entry in the format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  OFFSET&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  0x0&lt;br /&gt;
|  8&lt;br /&gt;
|  Title ID in Little Endian&lt;br /&gt;
|-&lt;br /&gt;
|  0x8&lt;br /&gt;
|  4&lt;br /&gt;
|  Unknown&lt;br /&gt;
|-&lt;br /&gt;
|  0xc&lt;br /&gt;
|  4&lt;br /&gt;
|  Unknown&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All unused entries have the Title IDs filled with &amp;quot;0xff&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In CacheD.dat, the icon data is concatenated together, with the first icon at offset 0x0.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* http://www.nintendo.com/consumer/systems/3ds/en_na/menu_update.jsp&lt;br /&gt;
* http://www.nintendo.co.jp/netinfo/3ds/JPN/ja.html&lt;br /&gt;
* http://yls8.mtheall.com/ninupdates/reports.php&lt;/div&gt;</summary>
		<author><name>Idunoe</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Title_Database&amp;diff=10911</id>
		<title>Title Database</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Title_Database&amp;diff=10911"/>
		<updated>2014-11-29T15:45:27Z</updated>

		<summary type="html">&lt;p&gt;Idunoe: The tickets in ticket.db are not encrypted.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These files contain data relating to install/usage/management of installed 3DS titles. The database files are located at:&lt;br /&gt;
&lt;br /&gt;
* nand/dbs&lt;br /&gt;
* sdmc/Nintendo 3DS/&amp;lt;ID0&amp;gt;/&amp;lt;ID1&amp;gt;/dbs&lt;br /&gt;
&lt;br /&gt;
ID0 is the first 0x10-bytes from a SHA256 [[nand/private/movable.sed|hash]]. The installation of [[SD Filesystem|SD Card]] titles was introduced in the [[2.0.0-2]] update and the SD dbs files are encrypted. These files are [[extdata]] images. The NAND extdata images are cleartext, however some of the images contain data encrypted with a console-unique keyslot.&lt;br /&gt;
&lt;br /&gt;
These files are only created on SD(via [[Application_Manager_Services|AM]]) if they don&#039;t exist when the [[eShop]] application is starting up, during network init etc(prior to showing the &amp;quot;system update required&amp;quot; dialog).&lt;br /&gt;
&lt;br /&gt;
These files are stored under this directory:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Stored on SD card&lt;br /&gt;
!  Stored in CTR-NAND&lt;br /&gt;
!  Filename&lt;br /&gt;
!  [[Savegames#AES_MAC_header|CTR-9DB0]] ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| ticket.db&lt;br /&gt;
| 0x0&lt;br /&gt;
| This contains the installed tickets(NAND and SD).&lt;br /&gt;
|-&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| certs.db&lt;br /&gt;
| 0x1&lt;br /&gt;
| This contains the certificate chain used to verify TMDs and other certificates.&lt;br /&gt;
|-&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| title.db&lt;br /&gt;
| 0x2&lt;br /&gt;
| Title database, this contains entries for all installed titles (TWL &amp;amp; CTR) on the 3DS(Each database is responsible for titles installed on its medium).&lt;br /&gt;
|-&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| import.db&lt;br /&gt;
| 0x3&lt;br /&gt;
| This is an Import Database, it contains entries for titles(or versions of titles) not yet installed, ready for transferring to the title.db. (Automatic Update uses this, so completing the update takes seconds)&lt;br /&gt;
|-&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| tmp_t.db&lt;br /&gt;
| 0x4&lt;br /&gt;
| This is the temporary Title database containing one entry for the currently installed [[Download Play]] Child.&lt;br /&gt;
|-&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| tmp_i.db&lt;br /&gt;
| 0x5&lt;br /&gt;
| Similar to import.db, except it&#039;s used in conjunction with tmp_t.db, for installing [[Download Play]] Children.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The SD dbs images use the same [[nand/private/movable.sed|keyslot]] as the other SD/NAND savedata images for the AES-MAC. The NAND dbs images for the AES-MAC use a console-unique keyslot where the keyX and keyY for it are initialized by bootrom.&lt;br /&gt;
&lt;br /&gt;
The *.db [[extdata|Extdata]] images do not use a DATA partition, so there are two versions of the database in the image, an active and old version (the active one is defined by the DIFF header). These database files consist of a pre-header with size of 0x80 identifying the Database Type, followed by a BDRI container. The offsets in the BDRI header are usually relative to the offset to the start of the BDRI header (0x80 in the file)&lt;br /&gt;
&lt;br /&gt;
== Pre Header ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 8&lt;br /&gt;
| Database Type &amp;quot;Magic&amp;quot; (see below)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x78&lt;br /&gt;
| Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Database Magic ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Database Type&lt;br /&gt;
! Magic&lt;br /&gt;
|-&lt;br /&gt;
| CTR-NAND import.db&lt;br /&gt;
| NANDIDB&lt;br /&gt;
|-&lt;br /&gt;
| CTR-NAND title.db&lt;br /&gt;
| NANDTDB&lt;br /&gt;
|-&lt;br /&gt;
| CTR-NAND tmp_i.db&lt;br /&gt;
| TEMPIDB&lt;br /&gt;
|-&lt;br /&gt;
| CTR-NAND tmp_t.db&lt;br /&gt;
| TEMPIDB&lt;br /&gt;
|-&lt;br /&gt;
| SD Card import.db&lt;br /&gt;
| TEMPTDB&lt;br /&gt;
|-&lt;br /&gt;
| SD Card title.db&lt;br /&gt;
| TEMPTDB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== BDRI ==&lt;br /&gt;
&lt;br /&gt;
Information stored about titles in these Title Database files are stored in two parts in a BDRI partition. Firstly in a Title Entry Table, and secondly in a Title Info Table.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 4&lt;br /&gt;
| Database Magic (&amp;quot;BDRI&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 4&lt;br /&gt;
| Magic Number (0x30000)&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 8&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 8&lt;br /&gt;
| File Size(including pre header), divided by the value at relative offset 0x18 (usually = 0x80)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 4&lt;br /&gt;
| Usually 0x80&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 4&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x20&lt;br /&gt;
| Unknown/Constant&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x18&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| 8&lt;br /&gt;
| Relative Title Entry Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| 0x20&lt;br /&gt;
| Unknown&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Title Entry Table ==&lt;br /&gt;
&lt;br /&gt;
This contains &#039;Entries&#039; for all the titles stored in the database. However this just appears to be an indexing table, the majority of title information is kept in a Title Info Table, which these index entries point to. Title Entries start immediately after the Title Entry Table Header. And there is no padding between entries.&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown/Magic? (usually = 0x2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown/Magic? (usually = 0x3)&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x24&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| 4&lt;br /&gt;
| Number of used Title Entries&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x50&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x80&lt;br /&gt;
| 4&lt;br /&gt;
| MAX Number of Title Entries&lt;br /&gt;
|-&lt;br /&gt;
| 0x84&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x88&lt;br /&gt;
| 0x20&lt;br /&gt;
| Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Title Entry Format ===&lt;br /&gt;
&lt;br /&gt;
The entries are 0x2C bytes long.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 4&lt;br /&gt;
| Active Flag. If this isn&#039;t = 0x1, then this entry slot is unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| Title ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 4&lt;br /&gt;
| Title Entry Index&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 4&lt;br /&gt;
| Relative Title Info Offset, divided by the value at offset 0x18 in this Title Entry (usually 0x80)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x4&lt;br /&gt;
| Usually 0x80&lt;br /&gt;
|-&lt;br /&gt;
| 0x1c&lt;br /&gt;
| 4&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 4&lt;br /&gt;
| Unknown, occasionally this value is the title&#039;s &amp;quot;Title ID lower&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x4&lt;br /&gt;
| Unknown&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The actual Title Info offset is calculated by the following: Offset of BDRI Header + Relative Offset of Title Entry Table + Relative Title Info Offset&lt;br /&gt;
&lt;br /&gt;
== Title Info Table ==&lt;br /&gt;
&lt;br /&gt;
These consist of 0x80 byte long entries, pointed to by the title index entries. They contain information taken from both the application NCCH file(s) and TMD.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
! Length&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 8&lt;br /&gt;
| Title Size&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 4&lt;br /&gt;
| Title Type(usually 0x40)&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 4&lt;br /&gt;
| Title Version&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 4&lt;br /&gt;
| Flags_0&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 4&lt;br /&gt;
| TMD Content ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 4&lt;br /&gt;
| CMD Content ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x1c&lt;br /&gt;
| 4&lt;br /&gt;
| Flags_1&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 4&lt;br /&gt;
| ExtdataID low (zero if title doesn&#039;t use Extdata)&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 4&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 8&lt;br /&gt;
| Flags_2&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x10&lt;br /&gt;
| Product Code&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x10&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| 0x4&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| 0x2c&lt;br /&gt;
| Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flags_0 ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Index&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Electronic Manual&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| ?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flags_1 ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Index&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| SD Save Data&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| ?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flags_2 ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Index&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| DSiWare Related (Visibility on Home Menu/Export Flag?)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Found with DSiWare Titles and titles with an &#039;Application&#039; Title ID&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| DSiWare Related (Visibility on Home Menu/Export Flag?)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| ?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTES:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is important to note the database doesn&#039;t contain a hash of the [[Title Data Structure|.cmd]]. So if a user has more than one valid set of [[Title Data Structure|application data]] for a given .cmd Content ID they can be manually interchanged without issue. Though renaming a .cmd file to match the Content ID which the title.db is expecting will result in an error, as the CTR for the per-console encryption layer changes depending on the file path, and the MAC of the .cmd is probably generated with the .cmd Content ID in mind.&lt;br /&gt;
&lt;br /&gt;
These NAND/SD /dbs images seem to be loaded by the ARM9 while NATIVE_FIRM is booting.&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
[https://github.com/ps3hen/ctr_toolkit/tree/master/extdata_tool extdata_tool] - parsing cleartext .db extdata images&lt;/div&gt;</summary>
		<author><name>Idunoe</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Makerom&amp;diff=10885</id>
		<title>Makerom</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Makerom&amp;diff=10885"/>
		<updated>2014-11-27T15:05:50Z</updated>

		<summary type="html">&lt;p&gt;Idunoe: fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox homebrew&lt;br /&gt;
| title       = makerom&lt;br /&gt;
| type        = pc utility&lt;br /&gt;
| author      = [[User:3dsguy|3dsguy]]&lt;br /&gt;
| download = https://anonfiles.com/file/865643f366d17771aa907d467f00826f&lt;br /&gt;
| source = https://github.com/profi200/Project_CTR/tree/master/makerom&lt;br /&gt;
| version     = 0.13&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
makerom is a tool which can be used to create [[NCCH]], [[NCSD|CCI]], and [[CIA]] files.&lt;br /&gt;
&lt;br /&gt;
== Format Overviews ==&lt;br /&gt;
=== NCCH ===&lt;br /&gt;
The native format storing code binaries and data archives for the 3DS is [[NCCH]]. [[NCCH]] files are comprised of:&lt;br /&gt;
* code/exheader/plainregion (used for code execution) (plainregion just lists included SDK library add-ons)&lt;br /&gt;
* icon (app title text, icon, homemenu settings, see [[SMDH|here]]&lt;br /&gt;
* banner (cbmd + cwav, i.e. the upper screen banner/sound shown on the homemenu)&lt;br /&gt;
* logo (the splash screen displayed after an application is launched from the homemenu)&lt;br /&gt;
* romfs (read-only filesystem used to store resources)&lt;br /&gt;
&lt;br /&gt;
Typical uses for NCCH files include:&lt;br /&gt;
* Executable image (code+exheader+icon+banner+logo+romfs)&lt;br /&gt;
* e-Manual archive (accessed from homemenu) (romfs)&lt;br /&gt;
* [[Download Play|DLP]] child CIA archive (accessed from application) (romfs)&lt;br /&gt;
* Update Data archive (romfs)&lt;br /&gt;
* Standalone data archive (romfs)&lt;br /&gt;
* DLC index archive (icon+romfs)&lt;br /&gt;
* DLC archive (romfs)&lt;br /&gt;
&lt;br /&gt;
=== CCI ===&lt;br /&gt;
The native format for gamecard images is [[NCSD|CCI]] and is a NCCH container format. CCI files are limited to containing 8 NCCH files, and can contain NCCH files for applications titles only.&lt;br /&gt;
==== NCCH configuration for CCI ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| e-Manual archive&lt;br /&gt;
| NO&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| DLP child CIA archive&lt;br /&gt;
| NO&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| Update Data archive&lt;br /&gt;
| NO&lt;br /&gt;
| 7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CIA ===&lt;br /&gt;
The native format for packaging NCCH files for install is [[CIA]], which is also a NCCH container format. CIA files are limited to containing 65535 NCCH files and can be used to contain NCCH files for any title type. CIA files also contain &#039;&#039;&#039;signed&#039;&#039;&#039; data used by the 3DS for general title management and DRM. Installing custom CIA files on a 3DS which also uses eShop/SysUpdates is unwise as conflicts will likely occur.&lt;br /&gt;
&lt;br /&gt;
==== NCCH configurations for CIA ====&lt;br /&gt;
Applications (Application/DlpChild/Demo/Patch/SystemApplication):&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| e-Manual archive&lt;br /&gt;
| NO&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| DLP child CIA archive&lt;br /&gt;
| NO&lt;br /&gt;
| 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System Applet/Module:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System Data Archives:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Data archive&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
DLC:&lt;br /&gt;
&lt;br /&gt;
The number of DLC data archives in DLC varies for each DLC.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| DLC index archive&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| DLC data archive&lt;br /&gt;
| YES&lt;br /&gt;
| Varies&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Makerom ==&lt;br /&gt;
&lt;br /&gt;
=== Command line ===&lt;br /&gt;
&lt;br /&gt;
 makerom [general args] [rsf args] [crypto args] [ncch 0 build args] [cci args] [cia args]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;General Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -f &amp;lt;format&amp;gt;&lt;br /&gt;
| &#039;ncch&#039;/&#039;cxi&#039;/&#039;cfa&#039;/&#039;cci&#039;/&#039;cia&#039;&lt;br /&gt;
| Specify the output file format. &#039;ncch&#039;/&#039;cxi&#039;/&#039;cfa&#039; has no affect, probably parsed without error for legacy support.&lt;br /&gt;
|-&lt;br /&gt;
| -o &amp;lt;path&amp;gt;&lt;br /&gt;
| Valid file path.&lt;br /&gt;
| Specify name/path for output file. Makerom will decided a name if this is not specified.&lt;br /&gt;
|-&lt;br /&gt;
| -v&lt;br /&gt;
| not required&lt;br /&gt;
| Enables verbose output.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;RSF Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -rsf &amp;lt;path&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify the path to Rom Specification File(RSF). See below for creating RSF.&lt;br /&gt;
|-&lt;br /&gt;
| -D&amp;lt;NAME&amp;gt;=&amp;lt;VALUE&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| This is used to substitute where &amp;quot;$(&amp;lt;NAME&amp;gt;)&amp;quot; exists in the RSF files with &amp;quot;&amp;lt;VALUE&amp;gt;&amp;quot;. (Uppercase isn&#039;t a requirement)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Crypto Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -target &amp;lt;target&amp;gt;&lt;br /&gt;
| &#039;t&#039;/&#039;d&#039;/&#039;p&#039;&lt;br /&gt;
| Specify key-chain. This affects encryption, signing and &#039;-desc&#039; template availability. t=test, suitable for homebrew. d=devkit(incomplete), suitable for devkits. p=retail(unusable), suitable for signing retail software?&lt;br /&gt;
|-&lt;br /&gt;
| -ckeyid &amp;lt;index&amp;gt;&lt;br /&gt;
| Any value between 0-255 (inclusive).&lt;br /&gt;
| Overrides the default common key used to encrypt CIA title keys.&lt;br /&gt;
|-&lt;br /&gt;
| -showkeys&lt;br /&gt;
| none&lt;br /&gt;
| Dumps loaded key-chain to stdout.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NCCH Build Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -elf &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify ELF. See below for creating ELF.&lt;br /&gt;
|-&lt;br /&gt;
| -icon &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify [[SMDH|icon]].&lt;br /&gt;
|-&lt;br /&gt;
| -banner &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify banner.&lt;br /&gt;
|-&lt;br /&gt;
| -desc &amp;lt;apptype&amp;gt;:&amp;lt;fw&amp;gt;&lt;br /&gt;
| &amp;lt;apptype&amp;gt;=&#039;app&#039;/&#039;ecapp&#039;/&#039;demo&#039;/&#039;dlpchild&#039;. &amp;lt;fw&amp;gt;=&#039;kernel version minor&#039;.&lt;br /&gt;
| Use a template for [[Exheader|exheader/accessdesc]]. These are hard-coded, so not all firmwares have a template. A value from 1-7 can be used in place of &#039;kernel version minor&#039;. A template shouldn&#039;t be used if the title needs &amp;quot;special&amp;quot; permissions, the RSF must be configured fully.&lt;br /&gt;
|-&lt;br /&gt;
| -exefslogo&lt;br /&gt;
| none&lt;br /&gt;
| Include logo in ExeFS. Required for usage on &amp;lt;5.0 systems.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Arguments useful for rebuilding a NCCH file:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -code &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify decompressed/plaintext exefs code binary.&lt;br /&gt;
|-&lt;br /&gt;
| -exheader &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify plaintext exheader binary.&lt;br /&gt;
|-&lt;br /&gt;
| -logo &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify logo.&lt;br /&gt;
|-&lt;br /&gt;
| -plainrgn &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify NCCH plain-region.&lt;br /&gt;
|-&lt;br /&gt;
| -romfs &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify an unencrypted RomFS binary.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CCI Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -content &amp;lt;path&amp;gt;:&amp;lt;index&amp;gt;&lt;br /&gt;
| &amp;lt;path&amp;gt;=Valid file path. &amp;lt;index&amp;gt;=Any value between 0-7 (inclusive)&lt;br /&gt;
| Include a built NCCH file in the CCI container. &amp;quot;-i&amp;quot; can be used instead of &amp;quot;-content&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -devcci&lt;br /&gt;
| none&lt;br /&gt;
| Build a debug CCI?&lt;br /&gt;
|-&lt;br /&gt;
| -nomodtid&lt;br /&gt;
| none&lt;br /&gt;
| Don&#039;t modify the TitleIds of NCCH files included to match NCCH0&lt;br /&gt;
|-&lt;br /&gt;
| -alignwr&lt;br /&gt;
| none&lt;br /&gt;
| Align the offset for the Card2 writable region to the end of the last NCCH in the CCI.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CIA Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -content &amp;lt;path&amp;gt;:&amp;lt;index&amp;gt;:&amp;lt;id&amp;gt;&lt;br /&gt;
| &amp;lt;path&amp;gt;=Valid file path. &amp;lt;index&amp;gt;=Any value between 0x0-0xFFFF (inclusive). &amp;lt;id&amp;gt;=Any value between 0x0-0xFFFFFFFF (inclusive)&lt;br /&gt;
| Include a built NCCH file in the CIA container. If &amp;lt;id&amp;gt; isn&#039;t specified, it will be generated randomly. &amp;quot;-i&amp;quot; can be used instead of &amp;quot;-content&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -major &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-63 (inclusive)&lt;br /&gt;
| Specify the version major for the title. This cannot be used with &amp;quot;-dver&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -minor &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-63 (inclusive)&lt;br /&gt;
| Specify the version minor for the title. This cannot be used with &amp;quot;-dver&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -micro &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-15 (inclusive)&lt;br /&gt;
| Specify the version micro for the title.&lt;br /&gt;
|-&lt;br /&gt;
| -dver &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-4095 (inclusive)&lt;br /&gt;
| Specify the data-title version for the title. This cannot be used with &amp;quot;-major&amp;quot; or &amp;quot;-minor&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -dlc&lt;br /&gt;
| none&lt;br /&gt;
| Specify this flag when building a DLC CIA.&lt;br /&gt;
|-&lt;br /&gt;
| -rand&lt;br /&gt;
| none&lt;br /&gt;
| Use a random title key to encrypt CIA content.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
General examples:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CXI&#039;&#039;&#039;&lt;br /&gt;
 makerom -o sample.cxi -rsf sample.rsf -target t -elf sample.elf -icon sample.icn -banner sample.bnr -desc app:4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CFA&#039;&#039;&#039;&lt;br /&gt;
 makerom -o sample.cfa -rsf sample.rsf -target t&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CCI&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cci -o sample.cci -target t -i sample.cxi:0 -i sample.cfa:1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CIA&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cia -o sample.cia -target t -i sample.cxi:0:0 -i sample.cfa:1:1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Makerom supports building a NCCH file and including it automatically (as index 0) into a NCCH container:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CCI and CXI at the same time and include a CFA&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cci -o sample.cci -rsf sample.rsf -target t -elf sample.elf -icon sample.icn -banner sample.bnr -desc app:4 -i sample.cfa:1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CIA and CXI at the same time and include a CFA&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cia -o sample.cia -rsf sample.rsf -target t -elf sample.elf -icon sample.icn -banner sample.bnr -desc app:4 -i sample.cfa:1:1&lt;br /&gt;
&lt;br /&gt;
Rebuilding CXI:&lt;br /&gt;
 makerom -o rebuild.cxi -rsf rebuild.rsf -target t -code rebuild/code.bin -exheader rebuild/exheader.bin -icon rebuild/icon.bin -banner rebuild/banner.bin -romfs rebuild/romfs.bin&lt;br /&gt;
&lt;br /&gt;
=== Creating RSF files ===&lt;br /&gt;
Inspired by Nintendo&#039;s format for their makerom, a yaml configuration file is required for creating NCCH files. CIA/CCI can be created without using a RSF file, but default settings will be used.&lt;br /&gt;
&lt;br /&gt;
For CXI, RSF files can be used to specify permissions, and access control settings. Makerom can use default settings by use of the &amp;quot;-desc&amp;quot; option, which removes the requirement for specifying them in the RSF file.&lt;br /&gt;
&lt;br /&gt;
Sample RSF to be used with &amp;quot;-desc&amp;quot;: [https://gist.githubusercontent.com/3DSGuy/83e12e0ae3dcccb9827f/raw/sample0.rsf download] (link broken)&lt;br /&gt;
&lt;br /&gt;
Sample RSF to be used without &amp;quot;-desc&amp;quot;: [https://gist.githubusercontent.com/3DSGuy/83e12e0ae3dcccb9827f/raw/sample1.rsf download] (link broken)&lt;br /&gt;
&lt;br /&gt;
=== Creating ELF files ===&lt;br /&gt;
DevKitARM used in conjunction with [https://github.com/smealum/ctrulib ctrulib] can create ELF files compatible with makerom, provided they are linked with  [https://gist.github.com/yellows8/6da7984a80a825b10294 this linker script], and striped.&lt;br /&gt;
&lt;br /&gt;
ELF files that are created using the official SDK are also supported by makerom. &lt;br /&gt;
&lt;br /&gt;
== Compiling Source ==&lt;br /&gt;
For Windows a MinGW/MSYS build setup is required. &lt;br /&gt;
&lt;br /&gt;
For Linux, gcc/g++/make must be installed.&lt;br /&gt;
&lt;br /&gt;
All additional libraries used by makerom (polarssl/libyaml) are included in the source, and are linked statically.&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
* RomFS hasn&#039;t been completely implemented (but valid pre-built RomFS can be used as substitute)&lt;/div&gt;</summary>
		<author><name>Idunoe</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Makerom&amp;diff=10884</id>
		<title>Makerom</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Makerom&amp;diff=10884"/>
		<updated>2014-11-27T15:04:39Z</updated>

		<summary type="html">&lt;p&gt;Idunoe: Added relevant cli argument explainations.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox homebrew&lt;br /&gt;
| title       = makerom&lt;br /&gt;
| type        = pc utility&lt;br /&gt;
| author      = [[User:3dsguy|3dsguy]]&lt;br /&gt;
| download = https://anonfiles.com/file/865643f366d17771aa907d467f00826f&lt;br /&gt;
| source = https://github.com/profi200/Project_CTR/tree/master/makerom&lt;br /&gt;
| version     = 0.13&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
makerom is a tool which can be used to create [[NCCH]], [[NCSD|CCI]], and [[CIA]] files.&lt;br /&gt;
&lt;br /&gt;
== Format Overviews ==&lt;br /&gt;
=== NCCH ===&lt;br /&gt;
The native format storing code binaries and data archives for the 3DS is [[NCCH]]. [[NCCH]] files are comprised of:&lt;br /&gt;
* code/exheader/plainregion (used for code execution) (plainregion just lists included SDK library add-ons)&lt;br /&gt;
* icon (app title text, icon, homemenu settings, see [[SMDH|here]]&lt;br /&gt;
* banner (cbmd + cwav, i.e. the upper screen banner/sound shown on the homemenu)&lt;br /&gt;
* logo (the splash screen displayed after an application is launched from the homemenu)&lt;br /&gt;
* romfs (read-only filesystem used to store resources)&lt;br /&gt;
&lt;br /&gt;
Typical uses for NCCH files include:&lt;br /&gt;
* Executable image (code+exheader+icon+banner+logo+romfs)&lt;br /&gt;
* e-Manual archive (accessed from homemenu) (romfs)&lt;br /&gt;
* [[Download Play|DLP]] child CIA archive (accessed from application) (romfs)&lt;br /&gt;
* Update Data archive (romfs)&lt;br /&gt;
* Standalone data archive (romfs)&lt;br /&gt;
* DLC index archive (icon+romfs)&lt;br /&gt;
* DLC archive (romfs)&lt;br /&gt;
&lt;br /&gt;
=== CCI ===&lt;br /&gt;
The native format for gamecard images is [[NCSD|CCI]] and is a NCCH container format. CCI files are limited to containing 8 NCCH files, and can contain NCCH files for applications titles only.&lt;br /&gt;
==== NCCH configuration for CCI ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| e-Manual archive&lt;br /&gt;
| NO&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| DLP child CIA archive&lt;br /&gt;
| NO&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| Update Data archive&lt;br /&gt;
| NO&lt;br /&gt;
| 7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CIA ===&lt;br /&gt;
The native format for packaging NCCH files for install is [[CIA]], which is also a NCCH container format. CIA files are limited to containing 65535 NCCH files and can be used to contain NCCH files for any title type. CIA files also contain &#039;&#039;&#039;signed&#039;&#039;&#039; data used by the 3DS for general title management and DRM. Installing custom CIA files on a 3DS which also uses eShop/SysUpdates is unwise as conflicts will likely occur.&lt;br /&gt;
&lt;br /&gt;
==== NCCH configurations for CIA ====&lt;br /&gt;
Applications (Application/DlpChild/Demo/Patch/SystemApplication):&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| e-Manual archive&lt;br /&gt;
| NO&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| DLP child CIA archive&lt;br /&gt;
| NO&lt;br /&gt;
| 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System Applet/Module:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System Data Archives:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Data archive&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
DLC:&lt;br /&gt;
&lt;br /&gt;
The number of DLC data archives in DLC varies for each DLC.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| DLC index archive&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| DLC data archive&lt;br /&gt;
| YES&lt;br /&gt;
| Varies&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Makerom ==&lt;br /&gt;
&lt;br /&gt;
=== Command line ===&lt;br /&gt;
&lt;br /&gt;
 makerom [general args] [rsf args] [crypto args] [ncch 0 build args] [cci args] [cia args]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;General Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -f &amp;lt;format&amp;gt;&lt;br /&gt;
| &#039;ncch&#039;/&#039;cxi&#039;/&#039;cfa&#039;/&#039;cci&#039;/&#039;cia&#039;&lt;br /&gt;
| Specify the output file format. &#039;ncch&#039;/&#039;cxi&#039;/&#039;cfa&#039; has no affect, probably parsed without error for legacy support.&lt;br /&gt;
|-&lt;br /&gt;
| -o &amp;lt;path&amp;gt;&lt;br /&gt;
| Valid file path.&lt;br /&gt;
| Specify name/path for output file. Makerom will decided a name if this is not specified.&lt;br /&gt;
|-&lt;br /&gt;
| -v&lt;br /&gt;
| not required&lt;br /&gt;
| Enables verbose output.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;RSF Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -rsf &amp;lt;path&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify the path to Rom Specification File(RSF). See below for creating RSF.&lt;br /&gt;
|-&lt;br /&gt;
| -D&amp;lt;NAME&amp;gt;=&amp;lt;VALUE&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
| This is used to substitute where &amp;quot;$(&amp;lt;NAME&amp;gt;)&amp;quot; exists in the RSF files with &amp;quot;&amp;lt;VALUE&amp;gt;&amp;quot;. (Uppercase isn&#039;t a requirement)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Crypto Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -target &amp;lt;target&amp;gt;&lt;br /&gt;
| &#039;t&#039;/&#039;d&#039;/&#039;p&#039;&lt;br /&gt;
| Specify key-chain. This affects encryption, signing and &#039;-desc&#039; template availability. t=test, suitable for homebrew. d=devkit(incomplete), suitable for devkits. p=retail(unusable), suitable for signing retail software?&lt;br /&gt;
|-&lt;br /&gt;
| -ckeyid &amp;lt;index&amp;gt;&lt;br /&gt;
| Any value between 0-255 (inclusive).&lt;br /&gt;
| Overrides the default common key used to encrypt CIA title keys.&lt;br /&gt;
|-&lt;br /&gt;
| -showkeys&lt;br /&gt;
| none&lt;br /&gt;
| Dumps loaded key-chain to stdout.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NCCH Build Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -elf &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify ELF. See below for creating ELF.&lt;br /&gt;
|-&lt;br /&gt;
| -icon &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify [[SMDH|icon]].&lt;br /&gt;
|-&lt;br /&gt;
| -banner &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify banner.&lt;br /&gt;
|-&lt;br /&gt;
| -desc &amp;lt;apptype&amp;gt;:&amp;lt;fw&amp;gt;&lt;br /&gt;
| &amp;lt;apptype&amp;gt;=&#039;app&#039;/&#039;ecapp&#039;/&#039;demo&#039;/&#039;dlpchild&#039;. &amp;lt;fw&amp;gt;=&#039;kernel version minor&#039;.&lt;br /&gt;
| Use a template for [[Exheader|exheader/accessdesc]]. These are hard-coded, so not all firmwares have a template. A value from 1-7 can be used in place of &#039;kernel version minor&#039;. A template shouldn&#039;t be used if the title needs &amp;quot;special&amp;quot; permissions, the RSF must be configured fully.&lt;br /&gt;
|-&lt;br /&gt;
| -exefslogo&lt;br /&gt;
| none&lt;br /&gt;
| Include logo in ExeFS. Required for usage on &amp;lt;5.0 systems.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Arguments useful for rebuilding a NCCH file:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -code &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify decompressed/plaintext exefs code binary.&lt;br /&gt;
|-&lt;br /&gt;
| -exheader &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify plaintext exheader binary.&lt;br /&gt;
|-&lt;br /&gt;
| -logo &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify logo.&lt;br /&gt;
|-&lt;br /&gt;
| -plainrgn &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify NCCH plain-region.&lt;br /&gt;
|-&lt;br /&gt;
| -romfs &amp;lt;file&amp;gt;&lt;br /&gt;
| Valid file path&lt;br /&gt;
| Specify an unencrypted RomFS binary.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CCI Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -content &amp;lt;path&amp;gt;:&amp;lt;index&amp;gt;&lt;br /&gt;
| &amp;lt;path&amp;gt;=Valid file path. &amp;lt;index&amp;gt;=Any value between 0-7 (inclusive)&lt;br /&gt;
| Include a built NCCH file in the CCI container. &amp;quot;-i&amp;quot; can be used instead of &amp;quot;-content&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -devcci&lt;br /&gt;
| none&lt;br /&gt;
| Build a debug CCI?&lt;br /&gt;
|-&lt;br /&gt;
| -nomodtid&lt;br /&gt;
| none&lt;br /&gt;
| Don&#039;t modify the TitleIds of NCCH files included to match NCCH0&lt;br /&gt;
|-&lt;br /&gt;
| -alignwr&lt;br /&gt;
| none&lt;br /&gt;
| Align the offset for the Card2 writable region to the end of the last NCCH in the CCI.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CIA Arguments&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Argument&lt;br /&gt;
! Acceptable values&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| -content &amp;lt;path&amp;gt;:&amp;lt;index&amp;gt;:&amp;lt;id&amp;gt;&lt;br /&gt;
| &amp;lt;path&amp;gt;=Valid file path. &amp;lt;index&amp;gt;=Any value between 0x0-0xFFFF (inclusive). &amp;lt;id&amp;gt;=Any value between 0x0-0xFFFFFFFF (inclusive)&lt;br /&gt;
| Include a built NCCH file in the CIA container. If &amp;lt;id&amp;gt; isn&#039;t specified, it will be generated randomly. &amp;quot;-i&amp;quot; can be used instead of &amp;quot;-content&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -major &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-63 (inclusive)&lt;br /&gt;
| Specify the version major for the title. This cannot be used with &amp;quot;-dver&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -minor &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-63 (inclusive)&lt;br /&gt;
| Specify the version minor for the title. This cannot be used with &amp;quot;-dver&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -micro &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-15 (inclusive)&lt;br /&gt;
| Specify the version micro for the title.&lt;br /&gt;
|-&lt;br /&gt;
| -dver &amp;lt;version&amp;gt;&lt;br /&gt;
| Any value between 0-4095 (inclusive)&lt;br /&gt;
| Specify the data-title version for the title. This cannot be used with &amp;quot;-major&amp;quot; or &amp;quot;-minor&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| -dlc&lt;br /&gt;
| none&lt;br /&gt;
| Specify this flag when building a DLC CIA.&lt;br /&gt;
|-&lt;br /&gt;
| -rand&lt;br /&gt;
| none&lt;br /&gt;
| Use a random title key to encrypt CIA content.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
General examples:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CXI&#039;&#039;&#039;&lt;br /&gt;
 makerom -o sample.cxi -rsf sample.rsf -target t -elf sample.elf -icon sample.icn -banner sample.bnr -desc app:4&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CFA&#039;&#039;&#039;&lt;br /&gt;
 makerom -o sample.cfa -rsf sample.rsf -target t&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CCI&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cci -o sample.cci -target t -i sample.cxi:0 -i sample.cfa:1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CIA&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cia -o sample.cia -target t -i sample.cxi:0:0 -i sample.cfa:1:1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Makerom supports building a NCCH file and including it automatically (as index 0) into a NCCH container:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CCI and CXI at the same time and include a CFA&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cci -o sample.cia -rsf sample.rsf -target t -elf sample.elf -icon sample.icn -banner sample.bnr -desc app:4 -i sample.cfa:1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create CIA and CXI at the same time and include a CFA&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cia -o sample.cia -rsf sample.rsf -target t -elf sample.elf -icon sample.icn -banner sample.bnr -desc app:4 -i sample.cfa:1:1&lt;br /&gt;
&lt;br /&gt;
Rebuilding CXI:&lt;br /&gt;
 makerom -o rebuild.cxi -rsf rebuild.rsf -target t -code rebuild/code.bin -exheader rebuild/exheader.bin -icon rebuild/icon.bin -banner rebuild/banner.bin -romfs rebuild/romfs.bin&lt;br /&gt;
&lt;br /&gt;
=== Creating RSF files ===&lt;br /&gt;
Inspired by Nintendo&#039;s format for their makerom, a yaml configuration file is required for creating NCCH files. CIA/CCI can be created without using a RSF file, but default settings will be used.&lt;br /&gt;
&lt;br /&gt;
For CXI, RSF files can be used to specify permissions, and access control settings. Makerom can use default settings by use of the &amp;quot;-desc&amp;quot; option, which removes the requirement for specifying them in the RSF file.&lt;br /&gt;
&lt;br /&gt;
Sample RSF to be used with &amp;quot;-desc&amp;quot;: [https://gist.githubusercontent.com/3DSGuy/83e12e0ae3dcccb9827f/raw/sample0.rsf download] (link broken)&lt;br /&gt;
&lt;br /&gt;
Sample RSF to be used without &amp;quot;-desc&amp;quot;: [https://gist.githubusercontent.com/3DSGuy/83e12e0ae3dcccb9827f/raw/sample1.rsf download] (link broken)&lt;br /&gt;
&lt;br /&gt;
=== Creating ELF files ===&lt;br /&gt;
DevKitARM used in conjunction with [https://github.com/smealum/ctrulib ctrulib] can create ELF files compatible with makerom, provided they are linked with  [https://gist.github.com/yellows8/6da7984a80a825b10294 this linker script], and striped.&lt;br /&gt;
&lt;br /&gt;
ELF files that are created using the official SDK are also supported by makerom. &lt;br /&gt;
&lt;br /&gt;
== Compiling Source ==&lt;br /&gt;
For Windows a MinGW/MSYS build setup is required. &lt;br /&gt;
&lt;br /&gt;
For Linux, gcc/g++/make must be installed.&lt;br /&gt;
&lt;br /&gt;
All additional libraries used by makerom (polarssl/libyaml) are included in the source, and are linked statically.&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
* RomFS hasn&#039;t been completely implemented (but valid pre-built RomFS can be used as substitute)&lt;/div&gt;</summary>
		<author><name>Idunoe</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Main_Page/Navigation&amp;diff=10837</id>
		<title>Main Page/Navigation</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Main_Page/Navigation&amp;diff=10837"/>
		<updated>2014-11-24T05:32:43Z</updated>

		<summary type="html">&lt;p&gt;Idunoe: Undo revision 10835 by Trollinteemo (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main page box|Navigation|Main Page/Navigation}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: -.3em -1em -1em -1em;&amp;quot;&amp;gt;&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; bgcolor=&amp;quot;#fff&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2px&amp;quot; cellspacing=&amp;quot;2px&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#e7eef6&amp;quot;&lt;br /&gt;
! width=&amp;quot;25%&amp;quot; | &#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
! width=&amp;quot;25%&amp;quot; | &#039;&#039;&#039;3DS hardware&#039;&#039;&#039;&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;3DS software&#039;&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot; style=&amp;quot;background: #F5FAFF;&amp;quot;&lt;br /&gt;
| &lt;br /&gt;
*[[Glossary]]&lt;br /&gt;
*[[FAQ]]&lt;br /&gt;
*[[Friend code]]&lt;br /&gt;
*[[Games]]&lt;br /&gt;
*[[Serials]]&lt;br /&gt;
*[[:Category:PC utilities|PC Utilities]]&lt;br /&gt;
*[[Homebrew Exploits]]&lt;br /&gt;
*[[Homebrew Applications]]&lt;br /&gt;
*[[3DS System Flaws]]&lt;br /&gt;
|&lt;br /&gt;
*[[Hardware]]&lt;br /&gt;
*[[Peripherals]]&lt;br /&gt;
*[[Gamecards]]&lt;br /&gt;
*[[Video Capture]]&lt;br /&gt;
|&lt;br /&gt;
*[[Nintendo Software]]&lt;br /&gt;
*[[3DS Development Unit Software]]&lt;br /&gt;
*[[Memory layout]] &lt;br /&gt;
*[[Services API]]&lt;br /&gt;
*[[SVC|List of systemcalls]] &lt;br /&gt;
*[[IO|List of IO registers]] &lt;br /&gt;
*[[:Category:Kernel_objects|Kernel objects]]&lt;br /&gt;
*[[3DS System Flaws]]&lt;br /&gt;
|&lt;br /&gt;
*[[:Category:File_formats|File Formats]] ([[NCSD|CCI]]/[[NCCH#CXI|CXI]]/[[CIA]])&lt;br /&gt;
*[[Title list]]&lt;br /&gt;
*[[Title metadata]]&lt;br /&gt;
*[[Update Data]]&lt;br /&gt;
*[[SD Filesystem]]&lt;br /&gt;
*[[Flash Filesystem]]&lt;br /&gt;
*[[Bootloader]]&lt;br /&gt;
*[[Savegames]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{box-footer-empty}}&lt;/div&gt;</summary>
		<author><name>Idunoe</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Makerom&amp;diff=10802</id>
		<title>Makerom</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Makerom&amp;diff=10802"/>
		<updated>2014-11-22T04:43:47Z</updated>

		<summary type="html">&lt;p&gt;Idunoe: Added brief format overview so people better understand what it is they&amp;#039;re making.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox homebrew&lt;br /&gt;
| title       = makerom&lt;br /&gt;
| type        = pc utility&lt;br /&gt;
| author      = [[User:3dsguy|3dsguy]]&lt;br /&gt;
| download = https://anonfiles.com/file/2e954a4b954778e8bcd0c317f071c272&lt;br /&gt;
| source = https://github.com/3DSGuy/Project_CTR/tree/master/makerom&lt;br /&gt;
| version     = 0.8&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
makerom is a tool which can be used to create [[NCCH]], [[NCSD|CCI]], and [[CIA]] files.&lt;br /&gt;
&lt;br /&gt;
== Format Overviews ==&lt;br /&gt;
=== NCCH ===&lt;br /&gt;
The native format storing code binaries and data archives for the 3DS is [[NCCH]]. [[NCCH]] files are comprised of:&lt;br /&gt;
* code/exheader/plainregion (used for code execution) (plainregion just lists included SDK library add-ons)&lt;br /&gt;
* icon (app title text, icon, homemenu settings, see [[SMDH|here]]&lt;br /&gt;
* banner (cbmd + cwav, i.e. the upper screen banner/sound shown on the homemenu)&lt;br /&gt;
* logo (the splash screen displayed after an application is launched from the homemenu)&lt;br /&gt;
* romfs (read-only filesystem used to store resources)&lt;br /&gt;
&lt;br /&gt;
Typical uses for NCCH files include:&lt;br /&gt;
* Executable image (code+exheader+icon+banner+logo+romfs)&lt;br /&gt;
* e-Manual archive (accessed from homemenu) (romfs)&lt;br /&gt;
* [[Download Play|DLP]] child CIA archive (accessed from application) (romfs)&lt;br /&gt;
* Update Data archive (romfs)&lt;br /&gt;
* Standalone data archive (romfs)&lt;br /&gt;
* DLC index archive (icon+romfs)&lt;br /&gt;
* DLC archive (romfs)&lt;br /&gt;
&lt;br /&gt;
=== CCI ===&lt;br /&gt;
The native format for gamecard images is [[NCSD|CCI]] and is a NCCH container format. CCI files are limited to containing 8 NCCH files, and can contain NCCH files for applications titles only.&lt;br /&gt;
==== NCCH configuration for CCI ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| e-Manual archive&lt;br /&gt;
| NO&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| DLP child CIA archive&lt;br /&gt;
| NO&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| Update Data archive&lt;br /&gt;
| NO&lt;br /&gt;
| 7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== CIA ===&lt;br /&gt;
The native format for packaging NCCH files for install is [[CIA]], which is also a NCCH container format. CIA files are limited to containing 65535 NCCH files and can be used to contain NCCH files for any title type. CIA files also contain data used by the 3DS for general title management and DRM. Installing custom CIA files on a 3DS which also uses eShop/SysUpdates is unwise as conflicts will likely occur.&lt;br /&gt;
&lt;br /&gt;
==== NCCH configurations for CIA ====&lt;br /&gt;
Applications (Application/DlpChild/Demo/Patch/SystemApplication):&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| e-Manual archive&lt;br /&gt;
| NO&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| DLP child CIA archive&lt;br /&gt;
| NO&lt;br /&gt;
| 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System Applet/Module:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Executable image&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
System Data Archives:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| Data archive&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
DLC:&lt;br /&gt;
&lt;br /&gt;
The number of DLC data archives in DLC varies for each DLC.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NCCH&lt;br /&gt;
! Required&lt;br /&gt;
! Index&lt;br /&gt;
|-&lt;br /&gt;
| DLC index archive&lt;br /&gt;
| YES&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| DLC data archive&lt;br /&gt;
| YES&lt;br /&gt;
| Varies&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Makerom ==&lt;br /&gt;
&lt;br /&gt;
=== Command line ===&lt;br /&gt;
Since CCI and CIA are NCCH containers, makerom was built so CXIs could be built stand alone or straight into a container format. It is also possible rebuild CXIs from an ELF file. As a result there are many combinations which can be used; for simplicity, specific functions will be explained by breaking them up into argument groups:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating CXIs from scratch:&#039;&#039;&#039;&lt;br /&gt;
 -elf &amp;lt;elf path&amp;gt; -rsf &amp;lt;rsf path&amp;gt; [-icon &amp;lt;[[SMDH|icon]] path&amp;gt; -banner &amp;lt;banner path&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rebuilding CXIs:&#039;&#039;&#039;&lt;br /&gt;
 -code &amp;lt;decompressed exefs .code&amp;gt; -exheader &amp;lt;exheader from original CXI&amp;gt; -rsf &amp;lt;rsf path&amp;gt; [-icon &amp;lt;[[SMDH|icon]] path&amp;gt; -banner &amp;lt;banner path&amp;gt; -romfs &amp;lt;cleartext romfs binary&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating CFAs:&#039;&#039;&#039;&lt;br /&gt;
 -f cfa -rsf &amp;lt;rsf path&amp;gt; [-icon &amp;lt;[[SMDH|icon]] path&amp;gt; -romfs &amp;lt;romfs binary&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating CCIs:&#039;&#039;&#039;&lt;br /&gt;
 -f cci [-content &amp;lt;path&amp;gt;:&amp;lt;index&amp;gt; ...]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating CIAs:&#039;&#039;&#039;&lt;br /&gt;
 -f cia [-content &amp;lt;path&amp;gt;:&amp;lt;index&amp;gt;:&amp;lt;id&amp;gt; ...]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using Desc presets:&#039;&#039;&#039;&lt;br /&gt;
 -desc &amp;lt;app type&amp;gt;:&amp;lt;firm version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;app type&#039; can be SDApp / ECApp / Demo / DlpChild&lt;br /&gt;
* &#039;firm version&#039; is the target kernel version minor for the intended 3DS system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Examples:&#039;&#039;&#039;&lt;br /&gt;
Create a CCI, using a manual CFA, and a desc preset:&lt;br /&gt;
 makerom -f cci -elf homebrew.elf -rsf app.rsf -desc sdapp:33 -icon homebrew.icn -banner homebrew.bnr -content manual.cfa:1 -o homebrew.cci&lt;br /&gt;
&lt;br /&gt;
Create a CIA using an already built application CXI and manual CFA:&lt;br /&gt;
 makerom -f cia -content homebrew.cxi:0:0 -content manual.cfa:1:1 -o homebrew.cia&lt;br /&gt;
&lt;br /&gt;
Rebuild a CXI:&lt;br /&gt;
 makerom -code code.bin -exheader exheader.bin -icon icon.bin -banner banner.bin -romfs romfs.bin -rsf app.rsf -desc sdapp:33 -o rebuild.cxi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Creating RSF files ===&lt;br /&gt;
Inspired by Nintendo&#039;s format for their makerom, a yaml configuration file is required for creating NCCH files. CIA/CCI can be created without using a RSF file, but default settings will be used.&lt;br /&gt;
&lt;br /&gt;
For CXI, RSF files can be used to specify permissions, and access control settings. Makerom can use default settings by use of the &amp;quot;-desc&amp;quot; option, which removes the requirement for specifying them in the RSF file.&lt;br /&gt;
&lt;br /&gt;
Sample RSF to be used with &amp;quot;-desc&amp;quot;: [https://gist.githubusercontent.com/3DSGuy/83e12e0ae3dcccb9827f/raw/sample0.rsf download]&lt;br /&gt;
&lt;br /&gt;
Sample RSF to be used without &amp;quot;-desc&amp;quot;: [https://gist.githubusercontent.com/3DSGuy/83e12e0ae3dcccb9827f/raw/sample1.rsf download]&lt;br /&gt;
&lt;br /&gt;
=== Creating ELF files ===&lt;br /&gt;
DevKitARM used in conjunction with [https://github.com/smealum/ctrulib ctrulib] can create ELF files compatible with makerom, provided they are linked with  [https://gist.github.com/yellows8/6da7984a80a825b10294 this linker script], and striped.&lt;br /&gt;
&lt;br /&gt;
ELF files that are created using the official SDK are also supported by makerom. &lt;br /&gt;
&lt;br /&gt;
== Compiling Source ==&lt;br /&gt;
For Windows a MinGW/MSYS build setup is required. &lt;br /&gt;
&lt;br /&gt;
For Linux, gcc/g++/make must be installed.&lt;br /&gt;
&lt;br /&gt;
All additional libraries used by makerom (polarssl/libyaml) are included in the source, and are linked statically.&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
* RomFS hasn&#039;t been completely implemented (but valid pre-built RomFS can be used as substitute)&lt;/div&gt;</summary>
		<author><name>Idunoe</name></author>
	</entry>
</feed>