Skip to content

Commit

Permalink
fix ncchinfo.bin gen (flip title ID for counter), readme stuffs
Browse files Browse the repository at this point in the history
  • Loading branch information
ihaveamac committed Apr 20, 2016
1 parent 1add79b commit 67e62de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 3dsconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def ncchinfoadd(rom):
tid = romf.read(8)
romf.seek(0x4000)
keyY = romf.read(16)
ncchinfolist.extend([tid + "\x01\x00\x00\x00\x00\x00\x00\x00" + keyY + "\x01\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + tid + ("/%s.Main.exheader.xorpad" % binascii.hexlify(tid[::-1]).upper()).ljust(112, "\x00")])
ncchinfolist.extend([tid[::-1] + "\x01\x00\x00\x00\x00\x00\x00\x00" + keyY + "\x01\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + tid + ("/%s.Main.exheader.xorpad" % binascii.hexlify(tid[::-1]).upper()).ljust(112, "\x00")])
romf.close()

# used from http://stackoverflow.com/questions/4566498/python-file-iterator-over-a-binary-file-with-newer-idiom
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 3dsconv
`3dsconv.py` is a Python script that "converts" a Nintendo 3DS rom (.3ds, .cci) to an installable CIA.
`3dsconv.py` is a Python script that "converts" a Nintendo 3DS rom (.3ds, .cci) to an installable CIA (CTR Importable Archive).

It supports using only an ExHeader XORpad, as well as decrypted roms. The ExHeader XORpad name format is `<TITLEID>.Main.exheader.xorpad`.

Expand All @@ -8,7 +8,13 @@ It requires [make_cia](https://github.com/ihaveamac/ctr_toolkit) in the PATH.
This does not work with Python 3.x.

## Generating XORpads
If your rom is encrypted, you must generate ExHeader XORpads with a 3DS system and the ability to use Decrypt9. Use `--gen-ncchinfo` with the roms you want to generate them for. 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)
If your rom is encrypted, you must generate ExHeader XORpads with a 3DS system and the ability to use Decrypt9.

1. Use `--gen-ncchinfo` with the roms you want to generate them for.
2. Place `ncchinfo.bin` at the root or `/Decrypt9` on your 3DS SD card.
3. 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)

## Usage
```bash
Expand All @@ -20,7 +26,7 @@ python2 3dsconv.py [options] game.3ds [game.3ds ...]
* `--gen-ncchinfo` - generate `ncchinfo.bin` for roms that don't have a valid xorpad
* `--gen-ncch-all` - use with `--gen-ncchinfo` to generate an `ncchinfo.bin` for all roms
* `--noconvert` - don't convert roms, useful if you just want to generate `ncchinfo.bin`
* `--force` - run even if make_cia aren't found
* `--force` - run even if make_cia isn't found
* `--nocleanup` - don't remove temporary files once finished
* `--verbose` - print more information

Expand Down

0 comments on commit 67e62de

Please sign in to comment.