Skip to content

Commit

Permalink
Update to 0.88 from beta
Browse files Browse the repository at this point in the history
  • Loading branch information
julesontheroad authored Jul 27, 2019
2 parents 5d9b798 + 5d7c26c commit 12d08c8
Show file tree
Hide file tree
Showing 29 changed files with 4,756 additions and 824 deletions.
18 changes: 18 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text

# Declare files that will always have CRLF line endings on checkout.
*.py text eol=crlf
*.bat text eol=crlf
*.cmd text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.exe binary
*.zip binary
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
py/ztools/keys.txt
py/INFO
py/NSCB_output
py/NSCB_extracted
py/extract
py/ztools/Fs/__pycache__
py/ztools/lib/__pycache__
py/list.txt
py/advlist.txt
py/ztools/pythac
py/ztools/hactool.exe
py/ztools/nstool.exe
py/badfiles.txt
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Current version of the program allows you to:
16.- Set jobs for later in multi mode
17.- Separate jobs by based-titleid in multi mode
18.- Remove bad characters from filenames (sanitize) or convert asian names to romaji
19.- Extract nca file contents for base games and dlcs or extract ncas as plaintext
20.- Joiner for xc*,ns* and *0 fat32 files

## 4. Batch modes:

Expand Down Expand Up @@ -68,9 +70,14 @@ The behavior of the auto-mode is configured trough the
* 4. Information about firmware requirements and other game data
* 5. Read cnmt file from meta nca
* 6. Read nacp file from control nca
* 7. Verify files with ability of detecting NSCB changes over them
* 7. Read npdm file from program nca
* 8. Verify files with ability of detecting NSCB changes over them
- MODE 5: Database Mode. Let’s you mass output information
- MODE 6: Advanced Mode. Currently extracts nca from xci\nsp (more to be added)
- MODE 6: Advanced Mode.
* 1. Extracts all contents from a nsp\xci
* 2. Extracts all contents from a nsp\xci in raw mode
* 3. Extracts all contents from a nsp\xci in plaintext
* 4. Extracts files from nca inside a nsp\xci
- L: Legacy Mode. Old functions

## 6. Configuration mode:
Expand Down Expand Up @@ -167,6 +174,8 @@ b.) Hacbuild: The xci repacking functions are based on hacbuild's code, made by

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)
Expand All @@ -178,4 +187,4 @@ 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 ;)
Also thanks to all members from gbatemp, elotrolado.net and my friends at discord ;)
30 changes: 30 additions & 0 deletions py/English CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,36 @@ Luca Fraga's github: https://github.com/LucaFraga
---------------
0. Changelog
---------------
v0.88- Bugfixes and new stuff
- Fixes direct creation of fat32 files, to reflect that the new modes create
split nsp or xci files for fat32 sd cards directly if set in the config.
Current implemented modes:
1. INDIVIDUAL MODE
* For now the pack options under "SPECIAL OPTIONS" are not supported
2. MULTI-PACK MODE
3. MULTI-CONTENT-SPLITTER MODE
- Added mode 7: FILE-JOINER mode to join fat32 .xc*,.ns* or *0
> For *0 files drop the folder if you have several *0 files to join to not
confuse the batch operations, for .xc* and .ns* files joins are grouped by filename
- Fixes bug in verification where RSV check bar stays after finishing RSV check on
unlockers
- Fixes bug in verification where hash verification gives a really slow speed on some files.
- Fixes bug in some modes with files that use keygeneration 2
- Fixes bug where info mode 1 doesn't show the total size of deltas
- Fix nacp reader for xci files
- Fix Language and nacp offset detection in some games
- Fixes titlekey verification on nsp and nsx dlcs
- Added main.npdm reader for nsp and xci files
- Add raw extraction option to advance mode so files with messed nca headers can be
extracted and verify the nca independently
- Added romaji option to db so outputting names in romaji can be turn off
- Added extraction of ncas in plaintext to advance mode
- Added extraction of nca contents to advance mode
NOTE: For now plaintext and extraction of ncas will skip program ncas in updates.
Process is done without extraction of ncas from nsp\xci with a fallback that
pre-extracts the nca if the the sections are not correctly detected.
NOTE2: Consider extraction and plaintext options on early stages.

v0.87c- Bugfixes
- Adds check for correct original titlekey for xci conversions from nsx files without
a titlekey.
Expand Down
103 changes: 67 additions & 36 deletions py/English Readme.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
__ _ __ __
____ _____ ____ / /_ __ __(_) /___/ /__ _____
/ __ \/ ___/ ___/ / __ \/ / / / / / __ / _ \/ ___/
/ / / (__ ) /__ / /_/ / /_/ / / / /_/ / __/ /
/_/ /_/____/\___/____/_.___/\__,_/_/_/\__,_/\___/_/
/_____/
-------------------------------------------------------------------------------------
NINTENDO SWITCH CLEANER AND BUILDER
(THE XCI MULTI CONTENT BUILDER AND MORE)
-------------------------------------------------------------------------------------
============================= BY JULESONTHEROAD =============================
-------------------------------------------------------------------------------------
" POWERED BY SQUIRREL "
" BASED IN THE WORK OF BLAWAR AND LUCA FRAGA "
-------------------------------------------------------------------------------------
Program's github: https://github.com/julesontheroad/NSC_BUILDER
Blawar's github: https://github.com/blawar
Blawar's tinfoil: https://github.com/digableinc/tinfoil
Luca Fraga's github: https://github.com/LucaFraga
-------------------------------------------------------------------------------------
# Nintendo Switch Cleaner and Builder (NSC_Builder)
https://github.com/julesontheroad/NSC_BUILDER

## 1. Description

Expand All @@ -26,13 +8,13 @@ NSC_Builder is the merged Project that continues xci_builder and Nut_Batch_Clean
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 down on it�s code.
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:
## 3. What can I do with this program?

Current version of the program allows you to:
1.- Make multi-content xci or nsp files.
Expand All @@ -44,7 +26,18 @@ Current version of the program allows you to:
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
10.- Repack xci and nsp content in formats compatible with fat32
11.- Mass build xci files and nsp files in single and multi content format
12.- Rename nsp,xci files to match it's content
13.- Verify nsp, nsx, xci y nca files
14.- Output information in text format
15.- Extract content of nsp files and secure partition of xci files
16.- Set jobs for later in multi mode
17.- Separate jobs by based-titleid in multi mode
18.- Remove bad characters from filenames (sanitize) or convert asian names to romaji
19.- Extract nca file contents for base games and dlcs or extract ncas as plaintext
20.- Joiner for xc*,ns* and *0 fat32 files

## 4. Batch modes:

Expand All @@ -60,10 +53,32 @@ The behavior of the auto-mode is configured trough the

- MODE 0: Configuration mode. Let�s you configure the way the program works in both auto and manual mode.
- MODE 1: Indidual packing. Let�s you process a list of files and pack them individually
* Pack as nsp\xci
* Supertrimm xci files
* Rename xci or nsp files
* Rebuild nsp files in cnmt order and add cnmt.xml
* Verify nsp,xci files
- MODE 2: Multi packing. Let�s you pack a list of files in a single xci or nsp file.
* Separate files by basedid
* Set up jobs for later
* Process previous jobs
- MODE 3: Multi-Content-Splitter. Let�s you separate content to nsp and xci files.
- MODE 4: Update mode. Let�s you erase previous updates or dlcs from a multi-content xci or nsp file and add new updates. NOTE: Always use it with multi-content files.
- MODE 5: File-Info. Let�s you see and export several info about nsp and xci files
- MODE 4: File-Info. Let�s you see and export several info about nsp and xci files
* 1. Data about included files in nsp\xci
* 2. Data about content ids in file
* 3. Nut info as implemented by nut by blawar
* 4. Information about firmware requirements and other game data
* 5. Read cnmt file from meta nca
* 6. Read nacp file from control nca
* 7. Read npdm file from program nca
* 8. Verify files with ability of detecting NSCB changes over them
- MODE 5: Database Mode. Let�s you mass output information
- MODE 6: Advanced Mode.
* 1. Extracts all contents from a nsp\xci
* 2. Extracts all contents from a nsp\xci in raw mode
* 3. Extracts all contents from a nsp\xci in plaintext
* 4. Extracts files from nca inside a nsp\xci
- L: Legacy Mode. Old functions

## 6. Configuration mode:
### Auto Mode options. (Affects only Auto-Mode)
Expand All @@ -88,7 +103,7 @@ The behavior of the auto-mode is configured trough the
- Let�s you choose the name and location of the output folder
#### DELTA files treatment
- Let�s you choose if you�re going to pack delta NCA files or not. Set to false by default.
#### ZIP configuration
#### ZIP configuration (currently unused)
- Let�s you choose if you want to create a zip storing some file information. Set to false by default.
#### AUTO-EXIT configuration
- Let�s you choose if the cmd window closes after completing the job.
Expand All @@ -101,36 +116,48 @@ Pack xci or nsp in fat32 compatible formats or exfat format.
- Change CARD FORMAT to exfat (Default)
- Change CARD FORMAT to fat32 for SX OS (xc0 and ns0 files)
- Change CARD FORMAT to fat32 for all CFW (archive folder)

#### How to ORGANIZE output files
#### How to ORGANIZE output files (currently unused for new modes)
- Organize files separetely (default)
- Organize files in folders set by content
#### Set New Mode or Legacy Mode
- Use new more advance methods (default)
- Use old file processing methods
#### ROMANIZE names when using direct-multi
- Convert names to romaji (default)
- Read names from file and keep asian namings when they're read

## 7. 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
- RShadowhand�s starter pack �Singularit�", wich is a preconfigured atmosphere, made to auto-launch via Hekate trough fusee primary including the needed patches and some homebrew starters.
https://github.com/RShadowhand/singularite/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

## 8. Requirements for 0.8 Beta
## 8. Requirements

- A computer with a Window's OS is needed
- If you get dll missing messages install �Visual C++ Redistributable for Visual Studio 2015�
https://www.microsoft.com/en-us/download/details.aspx?id=48145
- 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

## 9. 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 onwords, that message can be skipped and the dlcs will work fine despite the prompt.
- 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.

## 7. Thanks and credits to

Expand All @@ -145,15 +172,19 @@ b.) Hacbuild: The xci repacking functions are based on hacbuild's code, made by

- 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 Liam and 0mn0 from old SH discord for always being helpfull.
Thx to 0mn0 and the old SH crew for always being helpful.

Thx to XCI-Explorer's creator StudentBlake since his program made easier for me to came up with the fix for hacbuild.
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 ;)
Also thanks to all members from gbatemp, elotrolado.net and my friends at discord ;)
Loading

0 comments on commit 12d08c8

Please sign in to comment.