3dsconv.py is a Python 3 script that converts Nintendo 3DS CTR Cart Image files (CCI, ".cci", ".3ds") to the CTR Importable Archive format (CIA).
3dsconv can detect if a CCI is decrypted, encrypted using original NCCH (slot 0x2C), or encrypted using zerokey. Encryption requires pyaes (
pip install pyaes). Original NCCH encryption requires a copy of the protected ARM9 bootROM.
On Windows, CCIs can be dragged on top of
3dsconv.exe. See Encryption for details about encrypted files.
3dsconv can be used as a standalone script, or installed using
python3 setup.py install.
python3 3dsconv.py [options] game.3ds [game.3ds ...]
--output=<dir>- Save converted files in specified directory; default is current directory or value of variable
--boot9=<file>- Path to dump of protected ARM9 bootROM
--overwrite- Overwrite existing converted files
--ignore-bad-hashes- Ignore invalid hashes and CCI files and convert anyway
--verbose- Print more information
--dev-keys- Use developer-unit keys
3dsconv requires the Nintendo 3DS full or protected ARM9 bootROM to decrypt files using Original NCCH encryption (slot 0x2C). The file is checked for in the order of:
- Value of option
boot9_path, if set
boot9.bin(full) in current working directory
boot9_prot.bin(protected) in current working directory
boot9strap is required to dump. Setup can be found at 3DS Guide. Hold START+SELECT+X at boot to dump to
Developer titles (not fully tested)
Conversion for developer-unit systems is possible with
--dev-keys. This is required for titles encrypted using dev-unit keys (only seems to be used for SystemUpdater). Titles encrypted with retail keys can't be converted this way without external decryption.
This does not decrypt or change the encryption of the output file, therefore CIAs will still only work on dev-units without separate decryption or changing encryption.
The dev certchain must be provided. The file is searched for is
certchain-dev.bin in current working directory, or
To extract from a dev CIA, use
ctrtool --certs=certchain-dev.bin title.cia.
Pack into standalone executable for Windows
Using py2exe for Python 3, you can pack the script into a Windows executable, primarily for use on a computer without Python, or for easy use in the Windows Command Prompt. Python 3.4 is required, 3.5 or later is currently not supported.
- Clone or download the repository, or the latest release.
- Open the Windows Command Prompt (
cmd.exe) in the current directory.
py -3.4 -m py2exe.build_exe 3dsconv.py -b 0. See the py2exe page for more options.
3dsconv.exewill be in
distafter it finishes. If anything but
0was used for
--bundle-files, dependencies will also be saved.
License / Credits
3dsconv.pyand pyaes are under the MIT license.
For versions older than "2.0", see this Gist.