ROM Hack RELEASE NSC_Builder. Nintendo Switch Cleaner and Builder. (Game+updates+dlc in a single xci)

  • Thread starter JRoad
  • Start date
  • Views 534,599
  • Replies 2,709
  • Likes 68

JRoad

Developer
OP
Developer
Joined
May 18, 2018
Messages
1,005
Trophies
0
XP
1,719
Country
Spain
NSC_Builder v1.01 (corrected)
https://github.com/julesontheroad/NSC_BUILDER/releases/tag/1.01-crr

Seems i forgot to add the bin folder on the x64 and x86 builds so mtp mode will crash or run with the older exe from 1.00, is recommended to redownload for thos using x86 or x64 releases.

1. Support for DBI 155 and 156 new mtp setup

2. Added option to backup saves for installed games only
3. Added xci and xcz installation from google drive remotes
4. Added fixed xci location configurations for mtp mode
5. Added option to MTP - AUTOUPDATE DEVICE FROM LIBRARY to check from game registry instead of installed
6. Fix issues installing certain files from google drive because of special characters
7. File Selector now allows to select multiple files at once
8. Added additional information on the "Files" tab on the interface
9. Corrected patched multiprogram files VERIFICATION
10. Ability to not autoupdate DATABASES
11. Other changes and bugfixes.
* Updated keygeneration strings to FW 10.2.0
* Tickets that don't follow the proper standard now issue a warning instead of preventing titlerights removal on some functions.
* Fixed hang on interface when a buildid is not readable on certain situations.
* Added better representation of xci certificates on nut info.
* Faster library calls on python version which should speed up the batch menus.
* Fix for #169 where some language combinations break correct language tag addition due to change on python semantics.
* Other small bugfixes

NSC_Builder 1.00b BugFixes
- Fixed issue where on some systems some search filters wouldn't show the message asking for an input.

- Fixed bug introduced by 1.00 that would stop the databases update in the middle of the process.
If you already have 1.00 setup you can just override ztools by the 1.00b version. There's no changes in the config files.

NSC_Builder v1.00

- 1. Added NSCB.exe
- 2. Direct xci and xcz installation over mtp from local sources
- 3. Direct nsp installation patching from local sources and standard crypto option
- 4. Direct xci and multi xci creation directly on the SD over mtp from local sources
- 5. Added folder-walker on all modes for local and remote Resources
- 6. Added local library support for all NSCB modes
- 7. Added server and interface trigger on the main NSCB bat
- 8. Bugfixing and small stuff

https://github.com/julesontheroad/NSC_BUILDER/releases/tag/v1.00

0.99- Introducing MTP Mode a mtp manager for DBI Installer
Codewise probably one of the biggest releases in a year. Since DBI installer gives good access to the switch itself i implemented:
I.- Installer. Local, google drive, 1fichier
II.- File transfer. Local, google drive, 1fichier. Including generate xci and multicontent xci and transfer
III.- Auto-updater. Checks content on device against your libraries and autoupdates the console via usb. Local, google drive
IV.- Uninstaller.
VI.- Content dumper.
VI.- Archived games cleaner.
VIII.- Information
IX.- Savegames
X.- Generate SX autoloader files


Also solves the issue of the windows explorer not tracking correctly the end of the mtp streams and since DBI can transfer files bigger than 4GB archived to fat32 cards NSCB can also generate and transfer those.

For full features read the changelog at:
https://github.com/julesontheroad/NSC_BUILDER/releases/tag/v0.99
It'll also gives you an understanding on how to setup the libraries.

Some things are missing, some are to come in the future. Probably the most important is the ability of generating new files (nsp to xci or patched files) on the fly but that'll require the implementation of patched streams which needs some work.

I'll be around this week and maybe the next since this was done in about a week, so even if i tested everything i kept stacking functions so this time specially i fear i may have missed some bug.

Anyway the gui also gained a support for some rough libraries, reading part of the info from google drive and reading splitted files.

IMPORTANT NOTES:
Get new version on:
https://github.com/julesontheroad/NSC_BUILDER/releases

Many errors are related of not having all the needed keys in your keys.txt or to have a wrong format for them. Please stick to the formate in the keys_template.txt
--> Just paste them like this: xci_header_key = FFFFFFFFFFFFFFFFFFFFFFFFFFFF (Not the real key)
Alternatively notepad++ has an option to convert end of lines in files from linux(UNIX) to windows format.
If you have issues getting a link detected try to change any weird characters in the file's name, for example "&" or '
If the program does something unexpected go to the configuration and input "d" I could let on some option in the config file when testing instead of the intended defaults.
If you use Atmosphere or Kosmos you'll need the patches from the4n:
https://gbatemp.net/threads/i-heard-that-you-guys-need-some-sweet-patches-for-atmosphere.521164/
To launch them download latest fusee-primary-0.8.2.bin and add this line to the config if you use kosmos -> payload=bootloader/payloads/fusee-primary-0.8.2.bin
To install multicontent nsp your best option is to use dz-tinfoil by blawar or SX OS Installer (rom-menu):
dz-tinfoil: https://github.com/digableinc/tinfoil
If you need to activate unsigned code in dz-tinfoil the password is the konami code.
For new SX installer is the same since is actually dz-tinfoil. You'll need to activate unsigned code with the konami code.
Always try to do conversions or file modifications yourself and to get originals from trusted sources.

NBA 2k19 goes above 32gb with the update. There aren't 64gb cartridges in the market currently or flags in the SDK so it won't work. Not sure if the limitation is actually in Horizon current capabilities or in SX OS code. The error is kinda the same as before they released they 32gb cartridges patch.

This one takes the mantle of Nut Cleaner and XCI_builder. Don't use XCI_Builder or any of it's variations anymore. The code is archived and outdated.

---END OF IMPORTANT NOTES---

Changelog: For changelogs see the second post in this thread.

1. Description
NSC_Builder is the merged Project that continues xci_builder and Nut_Batch_Cleaner.
NSC_Builder is based both in the works of Blawar’s nut.py and Luca Fraga’s hacbuild and powered by “squirrel” a nut’s fork with added functions that removes the CDN based functions from nut while tweaks the title-rights modification functions and adds some useful ones for file management.
From version v0.8 the program doesn’t rely on hacbuild for xci generation and new code was made for a better integration on squirrel.
Squirrel will get a new github repository soon and be packed as exe for NSCB from beta v0.8. Old squirrel code can be seen in the NSCB main repository, new code will be published in it’s own repository at the end of NSCB beta phase after some cleanup it’s done on it’s code.

2. What’s the meaning of “REMOVING TITLE RIGHTS”.
When you remove the titlerights encryption from nsp files you can install the games without any need of tickets, which leaves a smaller trackable footprint on your console, providing you aren’t sending telemetry data to Nintendo.
It also helps in the conversion from nsp to xci files allowing to not install tickets externally.

3. What can I do with this program?
Current version of the program allows you to:
1.- Make multi-content xci or nsp files.
2.- Erase titlerights encryption from nsp files.
3.- Build xci files without the “update partition” which means they take less space on your storage.
4.- Take off deltas from updates
5.- Split multi content back into xci or nsp files
6.- Change the packing of the content between xci and nsp
7.- Lower the Required System Version to the actual encryption of the game.
8.- Lower the masterkey needed to decrypt a game.
9.- Check out information from a xci and nsp, including the Firmware needed to be able to execute it, the game info, the size of the nca content…
10.- Check data from nacp and cnmt files without extracting them from nsp\xci
11.- Repack xci and nsp content in formats compatible with fat32
12.- Mass build xci files and nsp files in single and multi content format
13.- Rename nsp,xci files to match it's content
14.- Verify nsp, nsx, xci y nca files
15.- Output information in text format
16.- Extract content of nsp files and secure partition of xci files
17.- Set jobs for later in multi mode
18.- Separate jobs by based-titleid in multi mode
19.- Remove bad characters from filenames (sanitize) or convert asian names to romaji
20.- Extract nca file contents for base games and dlcs or extract ncas as plaintext
21.- Joiner for xc*,ns* and *0 fat32 files

4. Batch modes:
The program has 2 modes:
- auto mode: you drag nsp files individually or folders with several files over the batch to enter in auto mode.
- manual mode: you double click the batch and you can build a list of files to process.
The behavior of the auto-mode is configured trough the “Configuration menu in manual mode”.

5. Important
This program attempts to modify the minimum data possible in nsp and xci files, due to that reason it requires signature patches to ignore both signatures at NCA headers. Firmwares that already include them are:
- SX OS
- ReiNX
https://github.com/Reisyukaku/ReiNX/releases
- For Kosmos use joonie86 sigpatches and Hekate5.0 or joonie86 Hekate Mod "a.k.a J"
https://github.com/Joonie86/hekate/releases/tag/5.0.0J
- For atmosphere use the4n sigpatches
https://gbatemp.net/attachments/2-0-0-8-1-0-zip.170607/
To install multi-nsp you need a installer compatible with them. Reported compatible installers are:
- SX OS rom-menu
- SX OS installer
- Blawar’s tinfoil:
https://github.com/digableinc/tinfoil
- Blawar’s lithium:
https://github.com/blawar/lithium

6. Requirements
- A computer with a Window's OS is needed
- Fill keys_template.txt on the ztools folder and rename it to keys.txt
You can get a full keyset with Lockpick if your console is at FW6.2 or
A friend can lend you the needed keys.
If you want to add the xci_header_key a friend will need to lend it to you.
https://github.com/shchmue/Lockpick/releases

7. Limitations
- You can't make multi-content xci files with more than 8 games. It'll give error when loading in horizon. I suspect it may be a qlauncher limitation so it could work with theme mods but INTRO didn't test it.
Note: This means “games”, updates and dl car not hold by that limitation.
- Title-rights remove dlcs give a message prompt of incomplete content for some games from 6.0 onwards, that message can be skipped and the dlcs will work fine despite the prompt.
-- For more information read the changelogs and the updated readme --

8. Thanks and credits to
NSC_Builder is based on:
a.) Nut: Without the work of "blawar" one of the most talented Switch sceners nothing of this would be possible at this point.
https://github.com/blawar/nut
b.) Hacbuild: The xci repacking functions are based on hacbuild's code, made by LucaFraga
- Original hacbuild: https://github.com/LucaFraga/hacbuild) by LucaFraga
- Revised hacbuild by me: https://github.com/julesontheroad/hacbuild
c.) Big thx to 0Liam for his constant help.
d.) pyNCA3,pyNPDM,pyPFS0,pyRomFS libraries adapted from pythac (made by Rikikooo)
Also thanks to:
AnalogMan. He made splitNSP.py, figured the needed block size for Horizon format splitted nsps (wich differs from the splitted xci block size) and the need to archive the folders)
https://github.com/AnalogMan151/splitNSP/releases
Thx to MadScript77 his great suggestions,specially the idea of profiles for the batch.
Thx to 0mn0 and the old SH crew for always being helpful.
Thx to evOLved, Cinnabar and a certain dragon for their help and good suggestions.
Also thanks to all members from gbatemp, elotrolado.net and my friends at discord ;)

Video tutorials by @grabman
New video:
Old videos:
 
Last edited by JRoad,

JRoad

Developer
OP
Developer
Joined
May 18, 2018
Messages
1,005
Trophies
0
XP
1,719
Country
Spain
v0.95 - xcz format, fixes and other stuff:
- Added xcz format supertrimmed to compressor. This means that it won't pack the update partition (system firmware content), a lossless compressor that will compress that partion will be added at a later time.
- Added more compression presets
- Added nsz and xcz verification to both the file-info gui and the batch interface
- Added renaming for nsz and xcz.
- xcz and nsz support will be added slowly to all functions
- Added option to convert xci to nsz when compressing them in configuration. It is a highly unneeded thing to do since tinfoil would install xcz or nsz files but to each their own if you feel the need of converting at least do it in a restorable and verifiable way.
- Added more information options in the FILE-INFO mode for nsz\xcz
- Fixed user compression profile configuration.
- Added -1 threads as an option. This sets the threads depending on the cpu logic cores.
- Reduced nsz header size and change file order to standard cnmt order.
- Individual mode will now filter the extensions not supported for the selected function preprocessing.
- Added romaji conversion as optional when renaming files.
- Added option to select files and folders to add to list via filebrowser window.
- Changed Read_cnmt option in File-Info to reflect the improvements made to it in the gui.
- Fixed restoration for keygeneration10
- Fixed verification for files transformed from keygeneration10 to a lower one.

Note: All the building processes and verification of unmodified files were unafected the
issue was in header restoration to keygeneration10 since it must be specified in hex as
0A instead of 10.
- Added RSV for 9.01 to the RSV check and restoration.

Full changelog attached o the post:
 

Attachments

  • 2018102323125500-57B4628D2267231D57E0FC1078C0596D - copia.jpg
    2018102323125500-57B4628D2267231D57E0FC1078C0596D - copia.jpg
    74.6 KB · Views: 2,794
  • 2018102323132900-782E6464DEAB1C1935FD65F20DE423DF - copia.jpg
    2018102323132900-782E6464DEAB1C1935FD65F20DE423DF - copia.jpg
    84.8 KB · Views: 2,619
  • 2018102100481400-782E6464DEAB1C1935FD65F20DE423DF - copia.jpg
    2018102100481400-782E6464DEAB1C1935FD65F20DE423DF - copia.jpg
    134.9 KB · Views: 2,307
  • 2018102100480900-782E6464DEAB1C1935FD65F20DE423DF - copia.jpg
    2018102100480900-782E6464DEAB1C1935FD65F20DE423DF - copia.jpg
    136.9 KB · Views: 2,189
  • 2018102100480500-782E6464DEAB1C1935FD65F20DE423DF - copia.jpg
    2018102100480500-782E6464DEAB1C1935FD65F20DE423DF - copia.jpg
    135.3 KB · Views: 2,201
  • 2018102100475500-782E6464DEAB1C1935FD65F20DE423DF.jpg
    2018102100475500-782E6464DEAB1C1935FD65F20DE423DF.jpg
    130.2 KB · Views: 2,114
  • inicio.PNG
    inicio.PNG
    42.6 KB · Views: 823
  • 4.PNG
    4.PNG
    14 KB · Views: 736
  • 5.PNG
    5.PNG
    13.4 KB · Views: 873
  • info3.PNG
    info3.PNG
    22 KB · Views: 737
  • INFO1.PNG
    INFO1.PNG
    13.1 KB · Views: 745
  • info2.PNG
    info2.PNG
    13.2 KB · Views: 755
  • Linked Account Patchable Games.txt
    8.9 KB · Views: 675
  • FI15.PNG
    FI15.PNG
    190.3 KB · Views: 960
  • FI12.PNG
    FI12.PNG
    96.4 KB · Views: 893
  • FI11.PNG
    FI11.PNG
    174.7 KB · Views: 813
  • FI1.PNG
    FI1.PNG
    203.7 KB · Views: 756
  • FI14.PNG
    FI14.PNG
    172.8 KB · Views: 829
  • FI13.PNG
    FI13.PNG
    210.8 KB · Views: 870
  • FI10.PNG
    FI10.PNG
    40.4 KB · Views: 701
  • English CHANGELOG.txt
    43.9 KB · Views: 339
Last edited by JRoad,

JRoad

Developer
OP
Developer
Joined
May 18, 2018
Messages
1,005
Trophies
0
XP
1,719
Country
Spain
I think you should add to the title this (UPDATE+DLC+BASE merger) or something that is easy to tell people WHAT this does.
Ah, the think is you can put games in it. 8 games as maximum according to my tests.

But if you think it would be better to have that in the title we can do that. Thing is, do I need to ping a mod to change the title?
 
Last edited by JRoad,

huma_dawii

Well-Known Member
Member
Joined
Apr 3, 2014
Messages
3,841
Trophies
1
Age
30
Location
Planet Earth
XP
3,713
Country
United States
Ah, the think is you can put games in it. 8 games as maximum according to my tests.

But if you think it would be better to have that in the title we can do that. Thing is, do I need to ping a mod to change the title?
You probably do need to do that! :) People get confused by the title of the homebrew, I think is very important to be clear what your software does and the purpose, many people is very interested in the merging update + DLC to a base XCI and if the title of your thread doesn't mention any of that then it will get overlook and wont get as much attention (There are some people lost in the wild looking for this but they didn't even know you were working on it, you can contact @Quantumcat and see if you can get this in the FRONT PAGE because this is a BIG RELEASE for everyone).
 
  • Like
Reactions: Quantumcat and Moko

kingraa777

boom!
Member
Joined
Apr 17, 2015
Messages
1,241
Trophies
0
Age
38
XP
884
Country
ception: object of type 'NoneType' has no len()
The system cannot find the file C:\Users\PC\Downloads\switch\SWITCH.
The system cannot find the file C:\Users\PC\Downloads\switch\SWITCH.


is this normal ?

EDIT: the programme files need to be in this directory /SWITCH it seeems
 
Last edited by kingraa777,

Firemanx

Member
Newcomer
Joined
Nov 4, 2018
Messages
15
Trophies
0
Age
31
XP
805
Country
United States
@JRoad , first and foremost, tha I you so very much for your time on this project, it is very generous to the community.

Repackaging an nsp into an xci, when launching the xci for the first time, does the packed update run and install, or does the total package run as if it is a dummy updated cartridge which doesn't need to install any local files?
 

JRoad

Developer
OP
Developer
Joined
May 18, 2018
Messages
1,005
Trophies
0
XP
1,719
Country
Spain
ception: object of type 'NoneType' has no len()
The system cannot find the file C:\Users\PC\Downloads\switch\SWITCH.
The system cannot find the file C:\Users\PC\Downloads\switch\SWITCH.


is this normal ?

EDIT: the programme files need to be in this directory /SWITCH it seeems
Not really mine are in F:\NSCB. I don't really now what your issue is related to, you can try and set absolute routes in your config folder but that error seems from the input, do you have a dot in your folder named "SWITCH"?
 

huma_dawii

Well-Known Member
Member
Joined
Apr 3, 2014
Messages
3,841
Trophies
1
Age
30
Location
Planet Earth
XP
3,713
Country
United States
The games when you eject the card, the icon that stays in the system only shows the ORIGINAL VERSION without the update, is that normal? I merged XC2 Torna and when the XCI is loaded shows 1.0.1 and when I reboot the console it shows me the 1.0.0
 

JRoad

Developer
OP
Developer
Joined
May 18, 2018
Messages
1,005
Trophies
0
XP
1,719
Country
Spain
@JRoad , first and foremost, tha I you so very much for your time on this project, it is very generous to the community.

Repackaging an nsp into an xci, when launching the xci for the first time, does the packed update run and install, or does the total package run as if it is a dummy updated cartridge which doesn't need to install any local files?
Ah no, it's like a rev game. It just loads the content inside the xci as if it was in the installed in the sd. All revision games work like that.
 

kingraa777

boom!
Member
Joined
Apr 17, 2015
Messages
1,241
Trophies
0
Age
38
XP
884
Country
Not really mine are in F:\NSCB. I don't really now what your issue is related to, you can try and set absolute routes in your config folder but that error seems from the input, do you have a dot in your folder named "SWITCH"?

not dot in that directory i was getting this error when the programme was in a different directory now i put the programme files in tht directory in the error message i dont get the message also what would cause the output files to have either a blank logo when converted or the programme just to return a small kb file ?
 

AnalogMan

ultraSuMoFramework Dev
Member
Joined
Apr 20, 2007
Messages
3,002
Trophies
1
Age
34
XP
4,296
Country
United States
So, if I merge an update into an XCI, the system doesn’t install that update internally? I know with games that have updates on them, when you insert the game it prompts you to install the update that was included on the cart to either the SD card or NAND.
 

JRoad

Developer
OP
Developer
Joined
May 18, 2018
Messages
1,005
Trophies
0
XP
1,719
Country
Spain
The games when you eject the card, the icon that stays in the system only shows the ORIGINAL VERSION without the update, is that normal? I merged XC2 Torna and when the XCI is loaded shows 1.0.1 and when I reboot the console it shows me the 1.0.0
Torna as dlc or as game? If I understand you the meta loaded when the game is not mounted is the one from the game. Doesn't happen with mine really. If you have access to devmenu you can check if everything loaded correctly, also didn't check xenoblade yet, remember it had issues being cleaned.
I plan to add back the [lc].nsp method for those cases. Also as soon as I add tools.bat you will be able to generate placeholders, that can force your meta\control to update to last version.

--------------------- MERGED ---------------------------

also my converted games dont show logos?
edit now im getting 1kb files made with an nsp i know works?
Well it isn't working properly for you that's for sure. Can you make a logo? Do you remember how it was done?
CD \d "program folder"
NSCB.bat "ROUTE TO FILE\game.nsp" >log.txt 2>&1
 

huma_dawii

Well-Known Member
Member
Joined
Apr 3, 2014
Messages
3,841
Trophies
1
Age
30
Location
Planet Earth
XP
3,713
Country
United States
Torna as dlc or as game? If I understand you the meta loaded when the game is not mounted is the one from the game. Doesn't happen with mine really. If you have access to devmenu you can check if everything loaded correctly, also didn't check xenoblade yet, remember it had issues being cleaned.
I plan to add back the [lc].nsp method for those cases. Also as soon as I add tools.bat you will be able to generate placeholders, that can force your meta\control to update to last version.
Is the original XCI game + NSP update! D: unmounted shows just the 1.0 but when I mount it shows 1.0.1 I don't know if that affect in something, I don't have DevMenu don't know if it works on 6.0.1
 
General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Thinking about doing it... like 6 bucks I could be way further along lol