From 67e62debeff0cb5f4b0b704bd49674252beec11e Mon Sep 17 00:00:00 2001 From: ihaveamac Date: Tue, 19 Apr 2016 18:17:48 -0700 Subject: [PATCH] fix ncchinfo.bin gen (flip title ID for counter), readme stuffs --- 3dsconv.py | 2 +- README.md | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/3dsconv.py b/3dsconv.py index 59fcfe8..3ac2f7e 100755 --- a/3dsconv.py +++ b/3dsconv.py @@ -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 diff --git a/README.md b/README.md index 93120d2..907a57c 100644 --- a/README.md +++ b/README.md @@ -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 `.Main.exheader.xorpad`. @@ -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=` 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=` if it's not the current working directory) ## Usage ```bash @@ -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