Go Back   FileForums > Game Backup > Nintendo > Wii Games

Reply
 
Thread Tools Display Modes
  #1  
Old 30-03-2022, 13:05
elit elit is offline
Registered User
 
Join Date: Jun 2017
Location: sun
Posts: 264
Thanks: 190
Thanked 321 Times in 118 Posts
elit is on a distinguished road
Switchtor - Nintendo Switch NSP repacker

[Admin, we need a nintendo switch thread ]

Switchtor is my new tool to help me (un)repack Nintendo Switch games. Features:
Code:
-scan nca|nsp|xci files(or whole dir) for information
-extract nca|nsp|xci files:
  -nca and nsp are extracted fully
  -xci are extracted into nca files it contain
-create nsp files from fully extracted game files
-automatic detection of titlekey and titleID
-use hacpack and hactool executables as a backend
-maintain its own text(editable) db file about extracted nca's
-one of the simplest tools out there for this task
To keep things simple, switchtor work with its own directory structure and a text db file. During unpacking of nsp, directory named "__extracted" and file named "__data_db.txt" are created inside newly created directory named same as nsp file minus extension. It is created in same dir as switchtor. Other files in that dir can be deleted.

When creating nsp, you point to a directory where this db file(and __extracted directory) are located. This directory can now be anywhere you prefer, so just point to the full path. Directories "__nsp_out" and "__nca_out" will be created. NCA's are just temporary files to create nsp and can be deleted. NSP inside "__nsp_out" is newly created nsp.

Key revision is maintained but can be simply overwritten in db file(as anything else there). Newly created nsp contain nca's created with '--plaintext' - unencrypted form and title key removed. These nsp's are intended for emulators.

During scan or extracting, titlekey is automatically detected, extracted and used, as well as title ID. Main point of switchtor is simplicity:
Code:
scan:
switchtor.exe -s file.(nca|nsp|xci) | dir

extract:
switchtor.exe -x file.(nca|xci)
switchtor.exe -x file.nsp [ --basenca=base_program.nca | --plaintext=plain_export.nca ]

repack:
switchtor.exe -c dir  (dir with '__data_db.txt' file and '__extracted' directory)
Switchtor works with DLC's and updates, for updates however same limitation apply as for hactool and hacpack which switchtor rely on. You first use --plaintext on a base nsp(the game v1.0) and then use --basenca when extracting update - pointing to previously created base plaintext nca file. Extracted update will be in fact full sized updated game because that is how it works. Refer to hactool documentation. Also you should delete 'fragment'(data) files(whole nca dirs and their references in db file).

This tool is extremely simple thanks to way it works, no need to type(and figuring out) which nca is what, no multi-command options etc. Just a simple -x -c -s and in case you dealing with updates also --plaintext and --basenca. Tool is mainly to deal with nsp, for xci its better to use another tool to convert it to nsp first. It is reliable, I already repacked 18 games with it + tested and working on both emulators.

switchtor_v1.0.7z

Last edited by elit; 30-03-2022 at 13:22.
Reply With Quote
The Following 2 Users Say Thank You to elit For This Useful Post:
Gehrman (28-06-2022), Masquerade (28-06-2022)
Sponsored Links
  #2  
Old 07-07-2022, 04:27
elit elit is offline
Registered User
 
Join Date: Jun 2017
Location: sun
Posts: 264
Thanks: 190
Thanked 321 Times in 118 Posts
elit is on a distinguished road
I need to clarify few things about dealing with updates, as I got PM about it:

After you unpack the update using basenca command(with conjunction of plaintext command you used on the original first version of the game), you get full new updated and extracted game as a result.

First thing you need to do is to rename ID in the database file to be same as original game. Usually updates end with something like 800 in last digits, say if original game was ending with something like ...A000, updated one could be ...A800. This is because ID of the update is(correctly) that, however, when packing back to nsp game again, it need to be ID of the original game, not an update!

Above only apply to updates, not DLC as those are standalone(and you don't use plaintext or basenca commands on them).

Furthermore, updated games will likely contain more than just control, logo and program nca's. Specifically they may contain data nca - even multiple. When you go to those unpacked nca's that are data(as pointed in database file), there should be single file called fragment. These nca's are useless and have to be removed: delete whole extracted data nca folder and also remove it from database file.

You should pretty much end up with only program, control and logo nca's(in 99% cases), with ID of the original game.
If you want you can also copy logo section from original version to updated version(and increase section number from 2 to 3 in database file), as original hactool do not do it. But is not mandatory.

@Masquerade let me know if it works for you now. Write me here about it.
Reply With Quote
The Following 2 Users Say Thank You to elit For This Useful Post:
Gehrman (08-07-2022), Masquerade (07-07-2022)
  #3  
Old 07-07-2022, 09:42
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,155
Thanks: 284
Thanked 1,346 Times in 610 Posts
Masquerade is on a distinguished road
Quote:
Originally Posted by elit View Post
@Masquerade let me know if it works for you now. Write me here about it.
Thanks for the help and posting this. Will give it a shot. Thanks.

Unsure why the plaintext command is needed though.

Thanks.
Reply With Quote
  #4  
Old 08-07-2022, 03:26
elit elit is offline
Registered User
 
Join Date: Jun 2017
Location: sun
Posts: 264
Thanks: 190
Thanked 321 Times in 118 Posts
elit is on a distinguished road
Quote:
Originally Posted by Masquerade View Post
Thanks for the help and posting this. Will give it a shot. Thanks.

Unsure why the plaintext command is needed though.

Thanks.
You need to learn how hactool works:
When you use --plaintext=file.nca during extraction of base game, that file.nca is created(in addition to unpacking of base game, which for update itself is not needed). You don't point to an existing file with that command! File created with --plaintext command is such that it is possible to create new updated game with it.

Then, when you use --basenca command during unpacking of update, now you actually point to an existing file.nca you just created with --plaintext. That is how whole new extracted and updated game is generated and not just update. You cannot extract update alone!

Hope that makes it clear.
Reply With Quote
The Following User Says Thank You to elit For This Useful Post:
Gehrman (08-07-2022)
  #5  
Old 03-07-2022, 14:31
elit elit is offline
Registered User
 
Join Date: Jun 2017
Location: sun
Posts: 264
Thanks: 190
Thanked 321 Times in 118 Posts
elit is on a distinguished road
Quote:
Originally Posted by Gehrman View Post
Hi elit
Thanks, this tool works well.
The KEYS.dat file for this tool?
Glad somebody found this thread already. It was empty and unvisited for some time due to it's location. As for keys, I don't know if I can provide them or not, that's the thing. Try to search the net or admin tell me if its ok or not.
Reply With Quote
The Following User Says Thank You to elit For This Useful Post:
Gehrman (08-07-2022)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KVM Switch frenchscottie Hardware 7 05-03-2006 18:02
Submini Toggle Switch question/problem spawn1980 XBox Games 14 01-09-2005 15:04
Adding on/off switch to Magic2.... rubber2k1 PS2 Games 5 26-02-2004 09:24
installing a switch on my messiah2ed ps2 modyouup PS2 Games 4 23-12-2003 06:08
Does it matter if you use a hub instead of a router?? devilsminion XBox Games 5 21-04-2003 14:05



All times are GMT -7. The time now is 08:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com