• Stars
    star
    499
  • Rank 87,743 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created over 8 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python script to convert Nintendo 3DS CCI (".cci", ".3ds") files to the CIA format

3dsconv

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.

Decrypt9WIP and GodMode9 can dump game cards to CIA directly now, rendering this tool partially obsolete. It can still be used for existing game dumps, however.

Usage

Basic use

On Windows, CCIs can be dragged on top of 3dsconv.exe. See Encryption for details about encrypted files.

Advanced options

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 output-directory
  • --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
  • --ignore-encryption - Ignore the encryption header value, assume the ROM as unencrypted
  • --verbose - Print more information
  • --dev-keys - Use developer-unit keys

Encryption

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= or variable boot9_path, if set
  • boot9.bin (full) in current working directory
  • boot9_prot.bin (protected) in current working directory
  • ~/.3ds/boot9.bin (full)
  • ~/.3ds/boot9_prot.bin (protected)

boot9strap is required to dump. Setup can be found at 3DS Guide. Hold START+SELECT+X at boot to dump to sdmc:/boot9strap/boot9.bin.

boot9 SHA256: 2f88744feed717856386400a44bba4b9ca62e76a32c715d4f309c399bf28166f
boot9_prot SHA256: 7331f7edece3dd33f2ab4bd0b3a5d607229fd19212c10b734cedcaf78c1a7b98

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 ~/.3ds/certchain-dev.bin.

To extract from a dev CIA, use ctrtool --certs=certchain-dev.bin title.cia.

SHA256: 7921ae82c9dcf411351314f2fe2c67378c6a872d2524f71b3c002b4d4a56846f

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.

  1. Clone or download the repository, or the latest release.
  2. Open the Windows Command Prompt (cmd.exe) in the current directory.
  3. Run py -3.4 -m py2exe.build_exe 3dsconv.py -b 0. See the py2exe page for more options.
  4. 3dsconv.exe will be in dist after it finishes. If anything but 0 was used for -b/--bundle-files, dependencies will also be saved.

License / Credits

  • 3dsconv.py and pyaes are under the MIT license.

For versions older than "2.0", see this Gist.

More Repositories

1

custom-install

Installs a title directly to an SD card for the Nintendo 3DS
Python
545
star
2

ninfs

FUSE filesystem Python scripts for Nintendo console files
Python
429
star
3

3DS-rom-tools

Tools and guides for working with Nintendo 3DS games and applications
Python
316
star
4

ctr-no-timeoffset

Sets the time offset in Config Savegame to 0
Makefile
128
star
5

faketik

Generates fake tickets to make missing titles re-appear on 3DS.
Makefile
90
star
6

wiiu-things

some Wii U scripts and things
Python
51
star
7

switchfs

FUSE (Filesystem in Userspace) scripts for Nintendo Switch files
Python
49
star
8

nusserver

Custom Nintendo Update Server
Python
35
star
9

pyctr

Python library to interact with Nintendo 3DS files
Python
28
star
10

nuspacker

hard fork of https://bitbucket.org/timogus/nuspacker
Java
28
star
11

9.6-dbgen-xmls

XMLs for 3DS 9.6-crypto titles, for use with *hax 2.7+
20
star
12

discord-mod-mail

Simple mod-mail system for Discord
Python
15
star
13

mashers-gl-updater

program to download and update mashers's grid launcher thing
Lua
15
star
14

ctrnand-title-cia-gen

CIA generator for installed CTRNAND titles
Python
15
star
15

hardmod-b9s-installer

Installs boot9strap through hardmod
Python
13
star
16

screenshot-merge

screenshot merging tool for Nintendo 3DS
Lua
12
star
17

ez3ds

Nintendo 3DS hax helper for noobs
PHP
10
star
18

rebuild-title-database

Rebuilds the contents of title.db for Nintendo 3DS
Python
10
star
19

videoinject

crappy video injector for moflex videos
Python
10
star
20

GM9-lua-attempt

Fork of d0k3/GodMode9 with super experimental Lua support.
C
9
star
21

cmd-gen

Experimental script to generate CMD files for Nintendo 3DS SD titles
Python
9
star
22

panopticon

Log messages in Discord, a la IRC
Python
8
star
23

rc-nand-cleanup

Cleans up NAND titles after an old-style region-swap on Nintendo 3DS
C
7
star
24

dumptik

Dump all tickets from a Nintendo 3DS console
C
6
star
25

save-crypto-finder

Finds and tries to decrypt save files for Nintendo 3DS using a list of Title IDs
Python
6
star
26

panopticon-2

Discord message logger
Python
6
star
27

3DSFlow-downloader

download 3DSFlow banners for mashers's Grid Launcher
Lua
6
star
28

save-data-copy-tool

Copy save data between gamecard and digital versions of games on Nintendo 3DS
Makefile
6
star
29

firmbuilder-docker

Docker image to build Nintendo 3DS FIRM images
Dockerfile
5
star
30

steamos-docker

SteamOS Docker image base
Makefile
5
star
31

firmswap

Nintendo 3DS FIRM partition switcher in Python 3
Python
5
star
32

snes-vc-stuff

Python
4
star
33

seedhelper

A tool to assist users of the seedminer method in communicating. https://seedhelper.figgyc.uk
JavaScript
3
star
34

random-tools

random scripts
Python
3
star
35

gw-save-export-helper

Gateway Save Export Helper
Lua
3
star
36

search-3ds

Nintendo 3DS file searcher in Python
Python
3
star
37

Kurisu-Vita

Bot for Vita Hacking on Discord
Python
3
star
38

another-file-manager

file manager thing for Nintendo 3DS
Lua
3
star
39

mediawiki-extensions-BulkPageCreate

Create multiple pages at once
PHP
2
star
40

test812784

test
2
star
41

gen-title-info-entry

Experimental script to generate the Title Info Entry for title.db
Python
2
star
42

github-actions-sandbox

Python
2
star
43

FAIL

a stupid simple file container
Python
2
star
44

lumatest

2
star
45

downgrade-check

(outdated) check if you have downgraded your Nintendo 3DS properly
Lua
2
star
46

dynarmic

hard fork
C++
1
star
47

nur-packages

my NUR packages
Nix
1
star
48

nix-fusepy-context-test

Python
1
star
49

overwrite-wiiu-titlehash

Overwrite Wii U titlehash to force a system update
Python
1
star
50

ianburgwin.net

PHP
1
star
51

dockerhub-tagging-test

Shell
1
star
52

Mayuri

Tuturu~Discord moderation bot thing
Python
1
star
53

ninjhax2.5-less_services_test

hard fork of smealum's ninjhax2.x repo, testing service removal for boot rate
C
1
star
54

mediawiki-extensions-DownloadWithFilename

Download a file with a different name automatically while saving
PHP
1
star
55

discussion-test

Testing stuff
1
star