Line 9: |
Line 9: |
| | | |
| makerom is a tool which can be used to create [[NCCH]], [[NCSD|CCI]], and [[CIA]] files. | | makerom is a tool which can be used to create [[NCCH]], [[NCSD|CCI]], and [[CIA]] files. |
| + | |
| + | == Format Overviews == |
| + | === NCCH === |
| + | The native format storing code binaries and data archives for the 3DS is [[NCCH]]. [[NCCH]] files are comprised of: |
| + | * code/exheader/plainregion (used for code execution) (plainregion just lists included SDK library add-ons) |
| + | * icon (app title text, icon, homemenu settings, see [[SMDH|here]] |
| + | * banner (cbmd + cwav, i.e. the upper screen banner/sound shown on the homemenu) |
| + | * logo (the splash screen displayed after an application is launched from the homemenu) |
| + | * romfs (read-only filesystem used to store resources) |
| + | |
| + | Typical uses for NCCH files include: |
| + | * Executable image (code+exheader+icon+banner+logo+romfs) |
| + | * e-Manual archive (accessed from homemenu) (romfs) |
| + | * [[Download Play|DLP]] child CIA archive (accessed from application) (romfs) |
| + | * Update Data archive (romfs) |
| + | * Standalone data archive (romfs) |
| + | * DLC index archive (icon+romfs) |
| + | * DLC archive (romfs) |
| + | |
| + | === CCI === |
| + | 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. |
| + | ==== NCCH configuration for CCI ==== |
| + | {| class="wikitable" |
| + | |- |
| + | ! NCCH |
| + | ! Required |
| + | ! Index |
| + | |- |
| + | | Executable image |
| + | | YES |
| + | | 0 |
| + | |- |
| + | | e-Manual archive |
| + | | NO |
| + | | 1 |
| + | |- |
| + | | DLP child CIA archive |
| + | | NO |
| + | | 2 |
| + | |- |
| + | | Update Data archive |
| + | | NO |
| + | | 7 |
| + | |} |
| + | |
| + | === CIA === |
| + | 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. |
| + | |
| + | ==== NCCH configurations for CIA ==== |
| + | Applications (Application/DlpChild/Demo/Patch/SystemApplication): |
| + | {| class="wikitable" |
| + | |- |
| + | ! NCCH |
| + | ! Required |
| + | ! Index |
| + | |- |
| + | | Executable image |
| + | | YES |
| + | | 0 |
| + | |- |
| + | | e-Manual archive |
| + | | NO |
| + | | 1 |
| + | |- |
| + | | DLP child CIA archive |
| + | | NO |
| + | | 2 |
| + | |} |
| + | |
| + | System Applet/Module: |
| + | {| class="wikitable" |
| + | |- |
| + | ! NCCH |
| + | ! Required |
| + | ! Index |
| + | |- |
| + | | Executable image |
| + | | YES |
| + | | 0 |
| + | |} |
| + | |
| + | System Data Archives: |
| + | {| class="wikitable" |
| + | |- |
| + | ! NCCH |
| + | ! Required |
| + | ! Index |
| + | |- |
| + | | Data archive |
| + | | YES |
| + | | 0 |
| + | |} |
| + | |
| + | DLC: |
| + | |
| + | The number of DLC data archives in DLC varies for each DLC. |
| + | {| class="wikitable" |
| + | |- |
| + | ! NCCH |
| + | ! Required |
| + | ! Index |
| + | |- |
| + | | DLC index archive |
| + | | YES |
| + | | 0 |
| + | |- |
| + | | DLC data archive |
| + | | YES |
| + | | Varies |
| + | |} |
| | | |
| == Using Makerom == | | == Using Makerom == |
Line 57: |
Line 167: |
| | | |
| === Creating ELF files === | | === Creating ELF files === |
− | ELF files that are created using the official SDK can be used with makerom. ELF files created using [https://github.com/smealum/ctrulib ctrulib] can be used, provided they are linked with this linker script: [https://gist.github.com/yellows8/6da7984a80a825b10294 download]
| + | 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. |
| + | |
| + | ELF files that are created using the official SDK are also supported by makerom. |
| | | |
| == Compiling Source == | | == Compiling Source == |
− | For Windows use MinGW, 64bit versions of MinGW are supported also. | + | For Windows a MinGW/MSYS build setup is required. |
| | | |
| For Linux, gcc/g++/make must be installed. | | For Linux, gcc/g++/make must be installed. |
| | | |
− | All additional libraries used by makerom are included in the source, and are linked statically. | + | All additional libraries used by makerom (polarssl/libyaml) are included in the source, and are linked statically. |
| | | |
| == Issues == | | == Issues == |
| | | |
− | * Proper ticket index generation isn't complete (CIA tickets are valid for only one content)
| |
| * RomFS hasn't been completely implemented (but valid pre-built RomFS can be used as substitute) | | * RomFS hasn't been completely implemented (but valid pre-built RomFS can be used as substitute) |