-
Notifications
You must be signed in to change notification settings - Fork 22
Extract a game or application in .cxi, .cfa or .ncch format
This guide explains how you can extract the contents out of a decrypted CTR Executable Image (CXI) or CTR File Archive (CFA), both NCCH containers.
If this NCCH container was extracted from another file, you should follow the respective guide instead.
This page is still a work in progress.
- A decrypted CXI or CFA
-
ctrtool
If you are not using a 64-bit operating system, you must build the source yourself for now. - 3dstool
- Basic knowledge of the Terminal/Command Line
- Put your NCCH in its own folder.
- Extract the contents of the NCCH. For example, to extract the ExeFS and RomFS:
ctrtool --exheader=exheader.bin --exefsdir=exefs --romfsdir=romfs --logo=logo.bcma.lz --plainrgn=plain.bin game.cxi
Explanation of possible arguments for this situation:
-
--exheader=file
- File to save the Extended Header to (does not exist for CFAs) -
--logo=file
- File to save the Logo to (does not exist for CFAs) -
--plainrgn=file
- File to save the Plain region to (does not exist for CFAs) -
--exefs=file
- File to save the ExeFS to -
--exefsdir=dir
- Directory to save the ExeFS contents to -
--romfs=file
- File to save the RomFS to -
--romfsdir=dir
- Directory to save the RomFS contents to -
--listromfs
- List RomFS contents
Note: ctrtool can't extract the NCCH header. You can save the first 0x200 (512) bytes of it to a file, or use 3dstool on the file.
3dstool -xvtf cxi game.cxi --header ncchheader.bin
Note: ctrtool can't extract the ExeFS header. You can save the first 0x200 (512) bytes of it to a file, use 3dstool on an extracted ExeFS file.
3dstool -xvtf exefs exefs --exefs-dir exefs --header exefsheader.bin
You must also extract the ExeFS contents or you might get a segfault.
- Put your NCCH in its own folder.
- Extract the contents the NCCH. For example, to extract the ExHeader, ExeFS and RomFS from the Game Executable:
3dstool -xvtf cxi game.cxi --header ncchheader.bin --exh exheader.bin --exefs exefs.bin --romfs romfs.bin --logo logo.bcma.lz --plain plain.bin
Explanation of possible arguments for this situation:
-
-x
or--extract
- Extract the file -
-v
or--verbose
- Print more information -
-t
or--type
- optional, Type of file -
-f
or--file
- required, Target file -
--romfs
- File to save the RomFS to -
--exefs
- File to save the ExeFS to -
--exh
or--extendedheader
- File to save the Extended Header to (does not exist for CFAs) -
--header
- File to save the NCCH header to -
--logo
or--logoregion
- File to save the Logo to (does not exist for CFAs) -
--plain
or--plainregion
- File to save the Plain region to (does not exist for CFAs)
- Extract the contents of the ExeFS and RomFS.
3dstool -xvtf romfs romfs.bin --romfs-dir romfs
3dstool -xvtf exefs exefs.bin --exefs-dir exefs --header exefsheader.bin
- Decompress the code.bin.
3dstool -uf exefs/code.bin --compress-type blz --compress-out decompressed_code.bin
Nintendo 3DS ROM Tools & Guides - create an issue or contact me if you have questions