From 67cf587447fa1c161a962b0cb9f66aaa2a8961da Mon Sep 17 00:00:00 2001 From: ihaveamac Date: Thu, 9 Jun 2016 15:58:21 -0700 Subject: [PATCH] fixed ncchinfo.bin gen not happening sometimes --- 3dsconv.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/3dsconv.py b/3dsconv.py index 55a0833..eaaf929 100755 --- a/3dsconv.py +++ b/3dsconv.py @@ -23,7 +23,7 @@ workdir = "work" # temporary folder to store files in ################# -version = "2.14" +version = "2.15" helptext = """3dsconv.py ~ version %s "convert" a Nintendo 3DS ROM to a CIA (CTR Importable Archive) @@ -125,6 +125,7 @@ def docleanup(tid_dc): # so I think I can get away with hard-coding some things def ncchinfoadd(rom_ncchinfo): if rom_ncchinfo not in ncchinfolist: + print_v("- adding %s to ncchinfo.bin" % rom_ncchinfo) romf_ncchinfo = open(rom_ncchinfo, "rb") romf_ncchinfo.seek(0x108) tid_ncchinfo = romf_ncchinfo.read(8) @@ -227,12 +228,16 @@ def bytes2int(string): if cleanup: docleanup(tid) romf.close() + if genncchinfo: + ncchinfoadd(rom[0]) continue if not decrypted: if not os.path.isfile(xorpad): print("! %s couldn't be found." % xorpad) if not genncchinfo: print(" use --gen-ncchinfo with this rom.") + else: + ncchinfoadd(rom[0]) romf.close() continue @@ -368,9 +373,6 @@ def bytes2int(string): if cleanup: docleanup(tid) - if genncchinfo and genncchall: - ncchinfoadd(rom[0]) - processedroms += 1 if totalroms == 0: