ROM Hack RELEASE NSPsplitty(GUI form nsp split tool)

Aionmagan

Active Member
OP
Newcomer
Joined
Dec 11, 2014
Messages
26
Trophies
0
Age
30
Location
Ciales
XP
125
Country
Puerto Rico
This is the first time i've ever learned about the switch hack scene,
a friend of mine hacked his Nintendo Switch (i don't own one sadly so all test were done on his),
he also told me about the

splitNSP tool that is used through command prompt
amazing work from AnalogMan151: link to his work

so my friend asked me to make a GUI version of this, essentially i ended up writing the thing from scratch
due to c#, but AnalogMan151's work made it that much easier;
i'm sure a program like this already exist somewhere but may as well share it.
a small disclaimer, this is my first program to ever share so i'm sure there are bugs to be found

this one requires windows (.NET4.7=>)

link to NSPsplitty (DOWNLOAD): https://github.com/Aionmagan/NSPsplitty/releases
(link to AnalogMan151's splitNSP can also be found in the readme.md section)

UPDATE v0.01
the tool just does one thing, which is split a .nsp file
that is bigger then 4gb to fit in the fat32 file system of the Nintendo Switch.
the difference is that no command prompt is needed and neither is installing python-3

a simple preview
preview(1).png


UPDATE V0.02-a
thanks to some input from this current comment section i have added
an all file (.) extension support for split of any file of your choice (.nsp is default)

preview2.png


UPDATE v0.02-b
added a 'merge files' checkbox
toggle it before you search for the files to be merged (00, 01, 02...)

also make sure that the folder where the files are located has an extension
i.e. gametitle_split.nsp (.nsp can be anything you wish such as .iso ect..)

preview(5).png


after 'Merge files' is checked just browse for the file '00' to be merged

preview(6).png


and hit the newly appearing 'Merge files' button (before named 'Split file' "name does change back and forth")

UPDATE v0.03-a
removed 'merge check box'
now to merge files just browse to file '00'
to the folder that contains it (folder must contain the extension you wish the file merge to select 'folder_split.nsp' where nsp is your choice)
Screenshot (42).png
 
Last edited by Aionmagan,

Aionmagan

Active Member
OP
Newcomer
Joined
Dec 11, 2014
Messages
26
Trophies
0
Age
30
Location
Ciales
XP
125
Country
Puerto Rico
I think instead of limiting it only to nsp you should allow to split any file. This method is working for every file.

could you elaborate a bit more ?

my knowledge on the file extension used for the nintendo switch is very limited
assuming that is what you mean by "this methods is working for every file"

thank you for the feedback, Regards Aionmagan
 

Clydefrosch

Well-Known Member
Member
Joined
Jan 2, 2009
Messages
6,022
Trophies
2
XP
4,619
Country
Germany
could you elaborate a bit more ?

my knowledge on the file extension used for the nintendo switch is very limited
assuming that is what you mean by "this methods is working for every file"

thank you for the feedback, Regards Aionmagan

i think what he means is you could use the program to split any file, like .avi or .mp4 or .zip.
But I honestly don't see the point in expanding this, because this, i assume, creates the split nsp in the format that tinfoil and other installers want it, i.e. split files named 00 01 02 etc. in a folder named something.nsp with the archive bit set.

And there's other programs that do just split anything you give them in a general way, like HJ-Split.
 
Last edited by Clydefrosch,

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,268
Trophies
3
XP
12,036
Country
Poland
i think what he means is you could use the program to split any file, like .avi or .mp4 or .zip.
But I honestly don't see the point in expanding this, because this, i assume, creates the split nsp in the format that tinfoil and other installers want it, i.e. split files named 00 01 02 etc. in a folder named something.nsp with the archive bit set.

And there's other programs that do just split anything you give them in a general way, like HJ-Split.
Not exactly. Splitting files, putting them to folder and assigning archive bit for this folder makes this folder read as file on Switch. I have used that f.e. to put 13GB file for Xenoblade 2 layeredfs to FAT32.

And Tinfoil, etc. Doesn't matter.
 
Last edited by masagrator,

Aionmagan

Active Member
OP
Newcomer
Joined
Dec 11, 2014
Messages
26
Trophies
0
Age
30
Location
Ciales
XP
125
Country
Puerto Rico
i think what he means is you could use the program to split any file, like .avi or .mp4 or .zip.
But I honestly don't see the point in expanding this, because this, i assume, creates the split nsp in the format that tinfoil and other installers want it, i.e. split files named 00 01 02 etc. in a folder named something.nsp with the archive bit set.

And there's other programs that do just split anything you give them in a general way, like HJ-Split.

oh thank you for the clarification, if that is so what the other user meant then yes i see no point
and yes it does exactly what tinfoil and alike are expecting

i will be studying other formats (file.extensions) and is if i will need to add those in as well, it would only be
5 to 10 lines of extra code but it's good practice

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

Not exactly. Splitting files, putting them to folder and assigning archive bit for this folder makes this folder read as file on Switch. I have used that f.e. to put 13GB file for Xenoblade 2 layeredfs to FAT32.

And Tinfoil, etc. Doesn't matter.

so what exactly do you mean for every file, could you elaborate a bit more ?
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,268
Trophies
3
XP
12,036
Country
Poland
Filesystem on Switch works as this:
Put splitted files to one folder
Rename files in that way they will be sorted in correct order (f.e. 00, 01, 02)
Set archive bit for this folder

And Switch will read this folder as file. NSP, zip, MP4 - doesn't matter.

Tinfoil is using Switch filesystem to read files, so it's not about compability with homebrew, but compability with Switch filesystem.
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,283
Trophies
4
Location
Space
XP
13,837
Country
Norway
i think what he means is you could use the program to split any file, like .avi or .mp4 or .zip.
But I honestly don't see the point in expanding this, because this, i assume, creates the split nsp in the format that tinfoil and other installers want it, i.e. split files named 00 01 02 etc. in a folder named something.nsp with the archive bit set.

And there's other programs that do just split anything you give them in a general way, like HJ-Split.
You could, but zip and rar already support splitting into multiple parts, and there would not be much point in splitting a video file for example, over just archiving it in multiple parts with "store" compression, as you wouldn't be able to play it while it's split up. Plus, numerous generic tools for splitting files likely already exist, no point in reinventing the wheel.
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
This is the first time i ever know about the switch hack scene,
a friend of mine hacked his Nintendo Switch (i don't own one sadly so all test where done on his),
he also told me about the

splitNSP tool that is used through command prompt
amazing work from AnalogMan151: https://github.com/AnalogMan151/splitNSP

so my friend ask me to make a GUI version of this, essentially i ended up writing the thing from scratch
due to c# but AnalogMan151 work made it that much more easy
and i'm sure a program like this already exist somewhere but may as well share it
a small disclaimer, this is my first program to ever share so i'm sure there's bugs to be found

this one requires windows 10 (.NET4.7=>)

link to my tool: https://github.com/Aionmagan/NSPsplitty
(link to AnalogMan151 splitNSP can also be found in the readme.md section)

the tool just does one thing, which is split a .nsp file
that is bigger then 4gb to fit in the fat32 file system of the nintendo swich
the difference is that no command prompt is needed and no installing python 3

a simple preview
View attachment 184876
This is great, thanks for the mention. If you want to make the app a little more friendly, consider setting the folder's archive bit so the user doesn't need to do so manually:
Code:
File.SetAttributes(dir, FileAttributes.Archive);
 

Aionmagan

Active Member
OP
Newcomer
Joined
Dec 11, 2014
Messages
26
Trophies
0
Age
30
Location
Ciales
XP
125
Country
Puerto Rico
Filesystem on Switch works as this:
Put splitted files to one folder
Rename files in that way they will be sorted in correct order (f.e. 00, 01, 02)
Set archive bit for this folder

And Switch will read this folder as file. NSP, zip, MP4 - doesn't matter.

Tinfoil is using Switch filesystem to read files, so it's not about compability with homebrew, but compability with Switch filesystem.


oh, this is awesome information thank you, i didn't know so
but wouldn't it be a bit confusing for a user tho ?

the reason i limited to .nsp was because of my friend (a user) being a monkey in essence

i could extend supported files but i first have to study standardized formats for the switch
or if you could pain a more open scenario where having any file be supported be a good idea (other then developer testing)
 

Clydefrosch

Well-Known Member
Member
Joined
Jan 2, 2009
Messages
6,022
Trophies
2
XP
4,619
Country
Germany
I guess removing the limitation to only .nsp would allow other files to be used in fat32.
I wasn't aware layerdfs files even came in such sizes, i always assumed that stuff would be split in 4gb parts during extraction anyways.

I guess if it ever came to that, this could be used to split, say, a large .iso file for some emulator?

I have no idea if this is easy or hard to implement, but some programs that allow you to import files give you that dropdown menu where the inital choice is a limited standard format, like .nsp, but you also get the chance to switch to 'show all'?

The average user would just go for the nsp then and anyone who knows this works for something else could go that way too.
 
Last edited by Clydefrosch,

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
You could, but zip and rar already support splitting into multiple parts, and there would not be much point in splitting a video file for example, over just archiving it in multiple parts with "store" compression, as you wouldn't be able to play it while it's split up. Plus, numerous generic tools for splitting files likely already exist, no point in reinventing the wheel.
You're missing the point. The Switch's file system will take any folder that has split contents (in the form of 00, 01, 02, etc) and the archive bit set and treat it as a normal file. This is unique to the Switch. So if you had a file, any file, be it a video or LayeredFS file or anything that's over 4GB, you can split it using this same method and the Switch will read it as a regular file. Typical splitting methods that are used for ZIPs or are made to eventually recombine files are not the same.
 

Aionmagan

Active Member
OP
Newcomer
Joined
Dec 11, 2014
Messages
26
Trophies
0
Age
30
Location
Ciales
XP
125
Country
Puerto Rico
This is great, thanks for the mention. If you want to make the app a little more friendly, consider setting the folder's archive bit so the user doesn't need to do so manually:
Code:
File.SetAttributes(dir, FileAttributes.Archive);

will do thank you, will take that advice
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,283
Trophies
4
Location
Space
XP
13,837
Country
Norway
You're missing the point. The Switch's file system will take any folder that has split contents (in the form of 00, 01, 02, etc) and the archive bit set and treat it as a normal file. This is unique to the Switch. So if you had a file, any file, be it a video or LayeredFS file or anything that's over 4GB, you can split it using this same method and the Switch will read it as a regular file. Typical splitting methods that are used for ZIPs or are made to eventually recombine files are not the same.
No, the person I was replying to was missing the point. What I was trying to say is that making this a more general purpose tool would be kind of pointless, and it makes more sense as a Switch-unique tool ;)
will do thank you, will take that advice
The archive bit should work for any file type on Switch, right? Although I am not sure if there is much purpose to using it for other file types right now as ROMs/ISOs for retro consoles don't get very big, there is not really a decent native video player for HOS yet, and TX have their own split XCI support.
But I could see it being useful for splitting up video files in the future, since ExFAT is not really recommended and a movie can easily be 10-20GB big.
 
Last edited by The Real Jdbye,

Aionmagan

Active Member
OP
Newcomer
Joined
Dec 11, 2014
Messages
26
Trophies
0
Age
30
Location
Ciales
XP
125
Country
Puerto Rico
You're missing the point. The Switch's file system will take any folder that has split contents (in the form of 00, 01, 02, etc) and the archive bit set and treat it as a normal file. This is unique to the Switch. So if you had a file, any file, be it a video or LayeredFS file or anything that's over 4GB, you can split it using this same method and the Switch will read it as a regular file. Typical splitting methods that are used for ZIPs or are made to eventually recombine files are not the same.

so by what i am understanding it could be possible to split a file of your choosing and use it normally on switch just by having an archive bit ? so like a movie a song and what not as long as it's a folder.extension with an archive bit ?
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
No, the person I was replying to was missing the point. What I was trying to say is that making this a more general purpose tool would be kind of pointless, and it makes more sense as a Switch-unique tool ;)
Still missing it. They want the tool to be able to split ANY file for use exclusively WITH THE SWITCH. Since it splits files in accordance to the Switch's filesystem behavior.

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

so by what i am understanding it could be possible to split a file of your choosing and use it normally on switch just by having an archive bit ? so like a movie a song and what not as long as it's a folder.extension with an archive bit ?
Correct. In fact, you can use this tool to split any file right now, just add '.nsp' to the end of the file name before splitting, then take the '.nsp' off from the folder name after splitting. Any file works including large romFS files for LayeredFS mods.
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,283
Trophies
4
Location
Space
XP
13,837
Country
Norway
Still missing it. They want the tool to be able to split ANY file for use exclusively WITH THE SWITCH. Since it splits files in accordance to the Switch's filesystem behavior.
Yeah, I just realized that was a possibility, if you read my edit. It was not really obvious from his post if he meant on the Switch, or for general use though.
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
Yeah, I just realized that was a possibility, if you read my edit. It was not really obvious from his post if he meant on the Switch, or for general use though.
I did not see your edit, but yes. The only other thing I use it for right now is LayeredFS stuff. Some games put their romFS files inside large 13GB+ archives. To modify the game you need to extract that archive, alter the files inside, repack the archive and then place that 13GB+ archive file on your SD for LayeredFS. Since I use Fat32, I have to split the file for it to work, but it does indeed work.
 
  • Like
Reactions: The Real Jdbye

Aionmagan

Active Member
OP
Newcomer
Joined
Dec 11, 2014
Messages
26
Trophies
0
Age
30
Location
Ciales
XP
125
Country
Puerto Rico
Correct. In fact, you can use this tool to split any file right now, just add '.nsp' to the end of the file name before splitting, then take the '.nsp' off from the folder name after splitting. Any file works including large romFS files for LayeredFS mods.

ok this is new information to me, i'll look into it, is very hard to create a useful tool without even owning the Switch system, so thank you very much for all this information, now one simple question, do you recommend it as a general switch purpose tool or have any limitations to it ?
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
ok this is new information to me, i'll look into it, is very hard to create a useful tool without even owning the Switch system, so thank you very much for all this information, now one simple question, do you recommend it as a general switch purpose tool or have any limitations to it ?
Honestly, keep it as it is, just make it so when you click on Browse and it opens the file dialog, change openFile.Multiselect to true and add a "All files (*.*)|*.*" file filter. That'll let people select any file if they choose while still keeping NSP as the default selection.
 
  • Like
Reactions: Aionmagan

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/WOppJ92RgGU?si=KE79L6A_3jESsGQM