ROM Hack [Release] .Net 3DS Toolkit - Extract and Repack 3DS ROMs (and CIAs)

TheShadowRunner

I'm like you, I have no name.
Member
Joined
Mar 14, 2009
Messages
727
Trophies
1
XP
1,102
Country
United States
Yes, it worked! But I had to build to Decrypted CXI (.3ds), then "verify and fix" in GM9, before it allowed me to convert it to cia and finally install it.
Building directly to Decrypted cia (shouldn't it be Encrypted..?) generates an invalid cia that cannot be salvaged.
 

evandixon

PMD Researcher
OP
Developer
Joined
May 29, 2009
Messages
1,725
Trophies
0
Website
projectpokemon.org
XP
2,313
Country
United States
In the past, I've never had any problems building CIA files with these tools. But I'm glad that you found a workaround.
(shouldn't it be Encrypted..?)
Best we can do is encrypt CIAs with a zero-key or a development key for panda units, as Nintendo's private key is private. CFW should make decrypted CIAs not be a problem, but it's been quite a while since I've checked. Thanks to Luma 3DS's Layered FS, building custom CIAs is pretty much obsolete, but I don't think it would work for custom banners.
 

TheShadowRunner

I'm like you, I have no name.
Member
Joined
Mar 14, 2009
Messages
727
Trophies
1
XP
1,102
Country
United States
Yes as long as it works
A question, if I modify files in the "decrypted banner" folder, are the changes taken into account when I rebuild the game?
Or is that folder just for convenience and not used on rebuild?
 

Hyoretsu

Itosugi Masahiro's Loyal Reader
Member
Joined
Jan 17, 2016
Messages
1,599
Trophies
0
XP
702
Country
Brazil
Is there a way to repack it as decrypted CXI? I just dumped all my games/updates/DLCs on 3DS to use with Citra, so I'm trying to merge all of them (CXI would be preferrable since its an exclusive format)
 

botik

Well-Known Member
Member
Joined
Sep 22, 2017
Messages
138
Trophies
0
XP
2,171
Country
Russia
Is there a way to repack it as decrypted CXI? I just dumped all my games/updates/DLCs on 3DS to use with Citra, so I'm trying to merge all of them (CXI would be preferrable since its an exclusive format)

There is a version for Python3 from the quick installation tool. Any .3ds or .cia file we will drag on the _citra.py and in the _citra folder will appear .cxi files
 
Last edited by botik,

Hyoretsu

Itosugi Masahiro's Loyal Reader
Member
Joined
Jan 17, 2016
Messages
1,599
Trophies
0
XP
702
Country
Brazil
There is a version for Python3 from the quick installation tool. Any .3ds or .cia file we will drag on the _citra.py and in the _citra folder will appear .cxi files

https://github.com/BpyH64/QuickSetup3DS/releases
No luck, the program closes as soon as I drag a file or folder (Tried with .cxi and renamed them to .cia, no use to at least throw an error) into _citra.py/_install.py.
DotNet 3DS Toolkit also thinks something's missing and doesn't allow me to rebuild to any format, not even rebuilding to .cia and re-extracting on the 3DS. I get "open file X:\!Emulators\!Updates\Super Smash Bros\game/HeaderExeFS.bin failed", same error for Header NCCH1.bin, NCCH2.bin, NCCH6.bin and NCCH7.bin. When trying to rebuild as .cxi/.3ds I get "NCCH header not found. This can happen if you extracted a CXI and are trying to rebuild a decrypted CCI. Try rebuilding as a key-0 encrypted CCI instead" which is exactly the case, but how'd I go about converting key-0 .3ds to .cxi? Or do I re-extract all games as .CIA and try rebuilding as .cxi instead?
Here's what my folder looks like:
R4mFjW3.png
 
Last edited by Hyoretsu,

eqagunn

Active Member
Newcomer
Joined
Jun 8, 2020
Messages
35
Trophies
0
XP
142
Country
Ireland
turns out this tool chokes on unpacking Update files since they lack a banner.bin and the extraction never finishes after giving an error.
when I tried to extract an update patch .CIA and a DCL (also as .CIA), neither would work. Both of these hung after popping up with exception error windows.
Updates and DLC are a little different than standard CIAs. Unfortunately the tool doesn't currently support these, not even the latest builds. If anyone happens to know the correct command-line tools to extract and rebuild updates and DLC, that'd be very helpful.

I hope someone can help out to have this amended.

For all the newbies looking into merging updates into the full game for usage in Citra I'd like to share my 24h-newbie findings.
Btw, yes, I know Citra can install .cia updates.

Regardless of the error and hang when handling updates tool seems to extract all the files.
I have successfully extracted .3ds ROM and .cia update and merged them afterwords following instructions here:
community.citra-emu. org /t/need-help-trying-to-rebuild-cxi-file-along-with-game-update/2910/5
Those were the only instructions I was able to find for this goal.

My only change was renaming ExeFS\icon.icn to icon.bin and copying it over along with code.bin so icon gets updated as well, as it's the case with Pokemon Ultra Sun v1.2 EUR.
My other working example was TriForce Heroes v2.1.0 EUR. Regarding the Title ID part, after following instructions at:
github. com /ihaveamac/3DS-rom-tools/wiki/Edit-title-ID-with-extracted-NCCH-header-and-ExHeader
Title ID turned out to be the same in the .3ds and .cia files for both games so I had nothing to do with it.

Both newly built .3ds files boot fine in Citra, with proper version number displayed in-game.
I've got no clue if any of the remaining files should be carried over as well.

@evandixon Would be great if you could implement option for trimming.
 
Last edited by eqagunn,

Shieldo

New Member
Newbie
Joined
Sep 23, 2020
Messages
1
Trophies
0
Age
24
XP
39
Country
Korea, South
i want to repack Pokemon X, but i got an error:
ERROR: open file C:\Users\john\Desktop\STORAGE\3DS Editor\Pokemon X\HeaderNCCH2.bin failed
ERROR: create file failed
ERROR: open file C:\Users\john\Desktop\STORAGE\3DS Editor\Pokemon X\HeaderNCCH6.bin failed
ERROR: create file failed
 

LkgFate

New Member
Newbie
Joined
Sep 23, 2020
Messages
1
Trophies
0
Age
24
XP
51
Country
Germany
How long does it take to build a file as Decrypted CCI. The folder from which im building is solidly big (5.8 GB) but i feel like it takes way to long. It also showed me this error. Previously the Error /Exheader.bin was not found occured. I added said file but it clearly sparked a new problem. Should i remove all of these files? Is it just fine like it is and will just take some time?
Exception Details:
System.IO.FileNotFoundException: Die Datei "C:\Users\leonb\OneDrive\Desktop\fates randomizer\Fates Randomizer Beta 5-1\StoreFE\ExeFS\banner.bin" konnte nicht gefunden werden.
 

evandixon

PMD Researcher
OP
Developer
Joined
May 29, 2009
Messages
1,725
Trophies
0
Website
projectpokemon.org
XP
2,313
Country
United States
i want to repack Pokemon X, but i got an error:
ERROR: open file C:\Users\john\Desktop\STORAGE\3DS Editor\Pokemon X\HeaderNCCH2.bin failed
ERROR: create file failed
ERROR: open file C:\Users\john\Desktop\STORAGE\3DS Editor\Pokemon X\HeaderNCCH6.bin failed
ERROR: create file failed
These errors are more like warnings than errors, and it's likely Pokémon X was repacked successfully.
 

botik

Well-Known Member
Member
Joined
Sep 22, 2017
Messages
138
Trophies
0
XP
2,171
Country
Russia
CCI/3DS it has maximum 5 NCCH partitions

0 Game Executable (the most important!!!)
1 Manual
2 Download Play Child container
6 New3DS Update Data
7 Old3DS Update Data


ERROR: open HeaderNCCH2.bin
ERROR: open HeaderNCCH6.bin

Means that "Download Play Child container" and "New3DS Update Data" are not in this image CCI/3DS
 

newguy312

New Member
Newbie
Joined
Dec 6, 2022
Messages
1
Trophies
0
Age
33
XP
32
Country
Brazil
With the 3DS shop closing soon I was looking for a tool to patch my games with latest updates and dlc in a single file for archival and preservation purposes. This tool kinda works, it extracted the games fine, but extracting updates and dlcs always presents an error. It extracts some files but idk if those are all the files I would need. Anyway merging the files that I get with the base game and then rebuilding it works, the game runs on Citra with the updated version applied although I can't really tell if the full update was patched. One bad side effect from doing this is that the file size gets way bigger, for instance, F*** E***** A******** goes from 1.2gb to 2gb when applying a 100~ mbs dlc.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    He said he had 3 different doctors apt this week, so he prob there. Something about gerbal extraction, I don't know.
    +1
  • ZeroT21 @ ZeroT21:
    bored, guess i'll spread more democracy
  • LeoTCK @ LeoTCK:
    @K3Nv2 one more time you say such bs to @BakerMan and I'll smack you across the whole planet
  • K3Nv2 @ K3Nv2:
    Make sure you smack my booty daddy
    +1
  • LeoTCK @ LeoTCK:
    telling him that my partner is luke...does he look like someone with such big ne
    eds?
  • LeoTCK @ LeoTCK:
    do you really think I could stand living with someone like luke?
  • LeoTCK @ LeoTCK:
    I suppose luke has "special needs" but he's not my partner, did you just say that to piss me off again?
  • LeoTCK @ LeoTCK:
    besides I had bigger worries today
  • LeoTCK @ LeoTCK:
    but what do you know about that, you won't believe me anyways
  • K3Nv2 @ K3Nv2:
    @BigOnYa can answer that
  • BigOnYa @ BigOnYa:
    BigOnYa already left the chat
  • K3Nv2 @ K3Nv2:
    Biginya
  • BigOnYa @ BigOnYa:
    Auto correct got me, I'm on my tablet, i need to turn that shit off
  • K3Nv2 @ K3Nv2:
    With other tabs open you perv
  • BigOnYa @ BigOnYa:
    I'm actually in my shed, bout to cut 2-3 acres of grass, my back yard.
  • K3Nv2 @ K3Nv2:
    I use to have a guy for that thanks richard
  • BigOnYa @ BigOnYa:
    I use my tablet to stream to a bluetooth speaker when in shed. iHeartRadio, FlyNation
  • K3Nv2 @ K3Nv2:
    While the victims are being buried
  • K3Nv2 @ K3Nv2:
    Grave shovel
  • BigOnYa @ BigOnYa:
    Nuh those goto the edge of the property (maybe just on the other side of)
  • K3Nv2 @ K3Nv2:
    On the neighbors side
    +1
  • BigOnYa @ BigOnYa:
    Yup, by the weird smelly green bushy looking plants.
  • Xdqwerty @ Xdqwerty:
    Water park was quite fun
    Xdqwerty @ Xdqwerty: Water park was quite fun