3dsconv.py
is a Python 2.7 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 or encrypted, or zerokey-encrypted. Decrypted is preferred and does not require any extra files. Encrypted requires Extended Header (ExHeader) XORpads, with the filename <TITLEID>.Main.exheader.xorpad
. Zerokey encryption works only if PyCrypto is installed (can be installed with pip).
This does not work with Python 3.
Decrypt9WIP can dump game cards to CIA directly now, rendering this tool partially obsolete. It can still be used for existing game dumps, however.
On Windows, decrypted CCIs can be dragged on top of 3dsconv.exe
. Encrypted CCIs should be decrypted, or have the proper ExHeader XORpads in the same folder.
python2 3dsconv.py [options] game.3ds [game.3ds ...]
--xorpads=<dir>
- use XORpads in the specified directory
default is current directory or what is set asxorpad-directory
--output=<dir>
- save converted CIA files in the specified directory
default is current directory or what is set asoutput-directory
--overwrite
- overwrite any existing converted CIA, if it exists--gen-ncchinfo
- generatencchinfo.bin
for CCIs without a valid xorpad--gen-ncch-all
- generatencchinfo.bin
for all CCIs used with --gen-ncchinfo--noconvert
- don't convert CCIs, useful to generate justncchinfo.bin
--ignorebadhash
- ignore bad xorpad/corrupt rom and convert anyway--verbose
- print more information
If your CCI is encrypted, you must generate ExHeader XORpads with a 3DS system and the ability to use Decrypt9.
- Use
--gen-ncchinfo
with the CCIs you want to generate them for.
By default, only CCIs without valid XORpads will be added intoncchinfo.bin
. To add all given CCIs, add--gen-ncch-all
. - Place
ncchinfo.bin
at the root or/Decrypt9
on your 3DS SD card. - Run Decrypt9, and go to "XORpad Generator Options" and "NCCH Padgen".
XORpads can then be placed anywhere (use --xorpads=<dir>
if it's not the current working directory)
Using py2exe, you can pack the script into a Windows executable, for use on a computer without Python, or for easy use in the Windows command prompt.
- Clone or download the repository, or the latest release +
setup.py
from the repository. - Open the Windows command prompt (
cmd.exe
) in the current directory. - Edit
setup.py
to change any options, if wanted. - Run
python setup.py py2exe
. Make sure Python 2.7 is being used. 3dsconv.exe
and its dependencies will be indist
after it finishes.
3dsconv.py
is under the MIT license.ncchinfo.bin
generation is based on Decrypt9WIP'sncchinfo_gen.py
.- Zerokey crypto code is based off this ncchinfo padgen pastebin.
For versions older than "2.0", see this Gist.