Skip to content

Commit

Permalink
Update to 0.89 from beta
Browse files Browse the repository at this point in the history
  • Loading branch information
julesontheroad committed Jul 29, 2019
2 parents 90fc897 + 0e4742d commit f14a59c
Show file tree
Hide file tree
Showing 14 changed files with 494 additions and 46 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ py/ztools/pythac
py/ztools/hactool.exe
py/ztools/nstool.exe
py/badfiles.txt
py/mlist.txt
16 changes: 16 additions & 0 deletions py/English CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ Luca Fraga's github: https://github.com/LucaFraga
---------------
0. Changelog
---------------
v0.89- Adds patcher for linked account requirement:
- Added patcher for linked-account flag in control nacp
* Patcher was added to Advanced mode, option 5 "patch a linked account requirement"
* The file is patched directly without generating a copy or any extraction
* The patcher can patched several files in batch
* The patcher will skip files that don't need a linked account
* You can see if a file needs a linked account in the nacp reader:
If "StartupUserAccount==RequiredWithNetworkServiceAccountAvailable"
* Patcher patches this value to take an unlinked account:
(StartupUserAccount==Required)
* If "RequiredNetworkServiceLicenseOnLaunch" is enabled it will also patched
- Take into account that current verification will ping the control nca as modified
- For now files with this patch won't be included in the verification and upcoming
restore mode due to the small number of games with this patching requirement
- Fixed issue that impeded raw-extaction from working properly
- Added <,<>,> to the list of banned characters for filenames
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.
Expand Down
75 changes: 48 additions & 27 deletions py/English Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,59 @@ https://github.com/julesontheroad/NSC_BUILDER

NSC_Builder is the merged Project that continues xci_builder and Nut_Batch_Cleaner.

NSC_Builder is based both in the works of Blawars nut.py and Luca Fragas hacbuild and powered by squirrel a nuts 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 doesnt rely on hacbuild for xci generation and new code was made for a better integration on squirrel.
NSC_Builder is based both in the works of Blawars nut.py and Luca Fragas hacbuild and powered by squirrel a nuts 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 doesnt 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 its own repository at the end of NSCB beta phase after some cleanup its done on its 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 its own repository at the end of NSCB beta phase after some cleanup its done on its code.

## 2. Whats 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 arent sending telemetry data to Nintendo.
## 2. Whats 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 arent 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.

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�

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 @@ -47,23 +68,23 @@ The batch has 2 modes:

- 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.
The behavior of the auto-mode is configured trough the Configuration menu in manual mode.

## 5. Manual mode options:

- MODE 0: Configuration mode. Lets you configure the way the program works in both auto and manual mode.
- MODE 1: Indidual packing. Lets you process a list of files and pack them individually
- MODE 0: Configuration mode. Lets you configure the way the program works in both auto and manual mode.
- MODE 1: Indidual packing. Lets 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. Lets you pack a list of files in a single xci or nsp file.
- MODE 2: Multi packing. Lets 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. Lets you separate content to nsp and xci files.
- MODE 4: File-Info. Lets you see and export several info about nsp and xci files
- MODE 3: Multi-Content-Splitter. Lets you separate content to nsp and xci files.
- MODE 4: File-Info. Lets 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
Expand All @@ -72,7 +93,7 @@ The behavior of the auto-mode is configured trough the
* 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. Lets you mass output information
- MODE 5: Database Mode. Lets 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
Expand All @@ -90,25 +111,25 @@ The behavior of the auto-mode is configured trough the
- Repack folder's files individually (single-content file)
- Repack folder's files together (multi-content file)
#### RSV patching configuration
- Patch Required System Version if its bigger than encryption
- Dont patch Required System Version if its bigger than encryption
- Patch Required System Version if its bigger than encryption
- Dont patch Required System Version if its bigger than encryption
#### KEYGENERATION configuration
- Set the maximum keygeneration (encryption) the files are allowed to have.
### Global options. (Affects how the program works globally)
#### Text and background COLOR
- Lets you choose the colours of the cmd window
- Lets you choose the colours of the cmd window
#### WORK FOLDER's name
- Lets you choose the name of the work folder
- Lets you choose the name of the work folder
#### OUTPUT FOLDER's name
- Lets you choose the name and location of the output folder
- Lets you choose the name and location of the output folder
#### DELTA files treatment
- Lets you choose if youre going to pack delta NCA files or not. Set to false by default.
- Lets you choose if youre going to pack delta NCA files or not. Set to false by default.
#### ZIP configuration (currently unused)
- Lets you choose if you want to create a zip storing some file information. Set to false by default.
- Lets you choose if you want to create a zip storing some file information. Set to false by default.
#### AUTO-EXIT configuration
- Lets you choose if the cmd window closes after completing the job.
- Lets you choose if the cmd window closes after completing the job.
#### KEY-GENERATION PROMPT
- Lets you choose if you want to see a prompt asking you to patch RSV and keygeneration in manual mode.
- Lets you choose if you want to see a prompt asking you to patch RSV and keygeneration in manual mode.
#### File stream BUFFER
- Buffer for file-stream operations
#### file FAT32\EXFAT options
Expand Down Expand Up @@ -140,9 +161,9 @@ 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
- Blawars tinfoil:
- Blawars tinfoil:
https://github.com/digableinc/tinfoil
- Blawars lithium:
- Blawars lithium:
https://github.com/blawar/lithium

## 8. Requirements
Expand All @@ -156,7 +177,7 @@ https://github.com/blawar/lithium

## 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.
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.

## 7. Thanks and credits to
Expand Down Expand Up @@ -187,4 +208,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 ;)
6 changes: 3 additions & 3 deletions py/NSCB.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set "prog_dir=%~dp0"
set "bat_name=%~n0"
set "ofile_name=%bat_name%_options.cmd"
Title NSC_Builder v0.88 -- Profile: %ofile_name% -- by JulesOnTheRoad
Title NSC_Builder v0.89 -- Profile: %ofile_name% -- by JulesOnTheRoad
set "list_folder=%prog_dir%lists"
::-----------------------------------------------------
::EDIT THIS VARIABLE TO LINK OTHER OPTION FILE
Expand Down Expand Up @@ -2732,8 +2732,8 @@ ECHO ---------------------------------------------------------------------------
ECHO ============================= BY JULESONTHEROAD =============================
ECHO -------------------------------------------------------------------------------------
ECHO " POWERED BY SQUIRREL "
ECHO " BASED IN THE WORK OF BLAWAR AND LUCA FRAGA "
ECHO VERSION 0.88 (NEW)
ECHO " BASED ON THE WORK OF BLAWAR AND LUCA FRAGA "
ECHO VERSION 0.89 (NEW)
ECHO -------------------------------------------------------------------------------------
ECHO Program's github: https://github.com/julesontheroad/NSC_BUILDER
ECHO Blawar's github: https://github.com/blawar
Expand Down
38 changes: 36 additions & 2 deletions py/ztools/ADV.bat
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ echo Input "1" to extract all files from nsp\xci
echo Input "2" for raw extraction (Use in case a nca gives magic error)
echo Input "3" to extract all nca files as plaintext
echo Input "4" to extract nca contents from nsp\xci
echo Input "5" to patch a linked account requirement
echo.
ECHO ******************************************
echo Or Input "b" to return to the list options
Expand All @@ -187,12 +188,16 @@ if /i "%bs%"=="1" goto extract
if /i "%bs%"=="2" goto raw_extract
if /i "%bs%"=="3" goto ext_plaintext
if /i "%bs%"=="4" goto ext_fromnca
if /i "%bs%"=="5" goto patch_lnkacc
if %vrepack%=="none" goto s_cl_wrongchoice


:extract
cls
call :program_logo
echo ********************************************************
echo EXTRACT ALL FILES FROM A NSP\XCI
echo ********************************************************
CD /d "%prog_dir%"
for /f "tokens=*" %%f in (advlist.txt) do (

Expand All @@ -210,6 +215,9 @@ goto s_exit_choice
:raw_extract
cls
call :program_logo
echo ********************************************************
echo EXTRACT ALL FILES FROM A NSP\XCI IN RAW MODE
echo ********************************************************
CD /d "%prog_dir%"
for /f "tokens=*" %%f in (advlist.txt) do (

Expand All @@ -227,6 +235,9 @@ goto s_exit_choice
:ext_plaintext
cls
call :program_logo
echo ********************************************************
echo EXTRACT ALL FILES FROM A NSP\XCI AS PLAINTEXT
echo ********************************************************
CD /d "%prog_dir%"
for /f "tokens=*" %%f in (advlist.txt) do (

Expand All @@ -244,6 +255,9 @@ goto s_exit_choice
:ext_fromnca
cls
call :program_logo
echo ********************************************************
echo EXTRACT INTERNAL NCA FILES FROM A NSP\XCI
echo ********************************************************
CD /d "%prog_dir%"
for /f "tokens=*" %%f in (advlist.txt) do (

Expand All @@ -258,6 +272,26 @@ ECHO *********** ALL FILES WERE PROCESSED! *************
ECHO ---------------------------------------------------
goto s_exit_choice

:patch_lnkacc
cls
call :program_logo
echo ********************************************************
echo PATCH A LINKED ACCOUNT REQUIREMENT
echo ********************************************************
CD /d "%prog_dir%"
for /f "tokens=*" %%f in (advlist.txt) do (

%pycommand% "%nut%" %buffer% -tfile "%prog_dir%advlist.txt" --remlinkacc ""

more +1 "advlist.txt">"advlist.txt.new"
move /y "advlist.txt.new" "advlist.txt" >nul
call :contador_NF
)
ECHO ---------------------------------------------------
ECHO *********** ALL FILES WERE PROCESSED! *************
ECHO ---------------------------------------------------
goto s_exit_choice


:s_exit_choice
if exist advlist.txt del advlist.txt
Expand Down Expand Up @@ -320,8 +354,8 @@ ECHO ---------------------------------------------------------------------------
ECHO ============================= BY JULESONTHEROAD =============================
ECHO -------------------------------------------------------------------------------------
ECHO " POWERED BY SQUIRREL "
ECHO " BASED IN THE WORK OF BLAWAR AND LUCA FRAGA "
ECHO VERSION 0.88
ECHO " BASED ON THE WORK OF BLAWAR AND LUCA FRAGA "
ECHO VERSION 0.89
ECHO -------------------------------------------------------------------------------------
ECHO Program's github: https://github.com/julesontheroad/NSC_BUILDER
ECHO Blawar's github: https://github.com/blawar
Expand Down
3 changes: 1 addition & 2 deletions py/ztools/Fs/Nacp.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ def par_getStartupUserAccount(self, data, feed =''):
StartupUserAccount = 'Unknown'
message=('- StartupUserAccount: ' + str(StartupUserAccount));print(message);feed+=message+'\n'
return feed



def getStartupUserAccount(self):
self.seek(0x3025)
b = self.readInt8('little')
Expand Down
Loading

0 comments on commit f14a59c

Please sign in to comment.