Skip to content

Commit 67cf587

Browse files
committed
fixed ncchinfo.bin gen not happening sometimes
1 parent a446b96 commit 67cf587

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

3dsconv.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
workdir = "work" # temporary folder to store files in
2424

2525
#################
26-
version = "2.14"
26+
version = "2.15"
2727

2828
helptext = """3dsconv.py ~ version %s
2929
"convert" a Nintendo 3DS ROM to a CIA (CTR Importable Archive)
@@ -125,6 +125,7 @@ def docleanup(tid_dc):
125125
# so I think I can get away with hard-coding some things
126126
def ncchinfoadd(rom_ncchinfo):
127127
if rom_ncchinfo not in ncchinfolist:
128+
print_v("- adding %s to ncchinfo.bin" % rom_ncchinfo)
128129
romf_ncchinfo = open(rom_ncchinfo, "rb")
129130
romf_ncchinfo.seek(0x108)
130131
tid_ncchinfo = romf_ncchinfo.read(8)
@@ -227,12 +228,16 @@ def bytes2int(string):
227228
if cleanup:
228229
docleanup(tid)
229230
romf.close()
231+
if genncchinfo:
232+
ncchinfoadd(rom[0])
230233
continue
231234
if not decrypted:
232235
if not os.path.isfile(xorpad):
233236
print("! %s couldn't be found." % xorpad)
234237
if not genncchinfo:
235238
print(" use --gen-ncchinfo with this rom.")
239+
else:
240+
ncchinfoadd(rom[0])
236241
romf.close()
237242
continue
238243

@@ -368,9 +373,6 @@ def bytes2int(string):
368373
if cleanup:
369374
docleanup(tid)
370375

371-
if genncchinfo and genncchall:
372-
ncchinfoadd(rom[0])
373-
374376
processedroms += 1
375377

376378
if totalroms == 0:

0 commit comments

Comments
 (0)