Homebrew RELEASE XCI-to-Split-NSP

nuvandibe

Active Member
OP
Newcomer
Joined
Mar 19, 2007
Messages
43
Trophies
1
XP
550
Country
United States
tl;dr: Useful for those with FAT32 SD cards. Install XCI files larger than 4GB on Switch.

XCI-to-Split-NSP

Sometimes software is only available in .xci format. Many people are saying to just copy that to a Micro SD card and use existing tools to convert it to NSP and install it on the fly. This is great and useful, but if the Micro SD card is formatted as FAT32, and the .xci file is larger than 4GiB, it becomes a much more complicated matter.

FAT32 has a maximum file size of 4GiB, so either only the first part of the file will be copied, or the operating system will complain about the file being too large for the destination file system.

The solution would be to first convert the file from XCI to NSP, and then split that NSP into 4GiB chunks which can fit on the Micro SD card. Then, set the Archive attribute on the folder and files so that NSP install tools can read the converted software and install it.

This script uses The-4n's 4NXCI (based on SciresM's hactool) and AnalogMan151's splitNSP to get the job done in one drag-and-drop operation.

Instructions
One of the tools, splitNSP, requires Python3. Install Python3, if you haven't already.

If you haven't already installed Python, make sure you check the option to "Add Python 3.x to PATH" on the first screen of the installer.


Copy 4nxci.exe, splitNSP.py, and your keys.dat file (you're on your own here) into the same directory as the ConvertAndSplit.bat file.

Then, just drag your .xci file onto ConvertAndSplit.bat, and wait.

Prerequisites
Don't forget, you need Python3, 4NXCI and splitNSP. Get them from their repositories here:

https://www.python.org/downloads/windows/
https://github.com/The-4n/4NXCI
https://github.com/AnalogMan151/splitNSP

Download

https://github.com/NuVanDibe/XCI-to-Split-NSP/releases/
 
Last edited by nuvandibe,

Dark_Entrophy

Member
Newcomer
Joined
Feb 9, 2017
Messages
13
Trophies
0
Age
33
XP
108
Country
Canada
Would anyone be willing to make a step by step guide to dumping a cart and using this program to convert it to a fat32 nsp? I've been trying to puzzle it out for the last while without much success.
 

nuvandibe

Active Member
OP
Newcomer
Joined
Mar 19, 2007
Messages
43
Trophies
1
XP
550
Country
United States
Would anyone be willing to make a step by step guide to dumping a cart and using this program to convert it to a fat32 nsp? I've been trying to puzzle it out for the last while without much success.
This is more of a script that uses other peoples' programs. I understand that WAIN Card Dumper NX can dump game cards to .xci, but it's a moot point if you don't have FAT32. Then again, I think that tool might support dumping .xci to a USB drive? I haven't looked into it.
 

bawzy

Active Member
Newcomer
Joined
Dec 15, 2014
Messages
44
Trophies
0
Age
44
XP
252
Country
United States
Thanks for the release of this! I've tested it and I think there may still be bugs with the current release (12/9/18). I converted an XCI over 4gb, and it generated about 6 nsp files, varying sizes. I tried installing them via the original tinfoil via USB mode, they failed to install the tickets but proceed to install the content, but afterwards the game wouldn't load.

I tried it on another 14gb XCI, it created 20+ nsp files, varying sizes, and also there was a folder named GAME_split.nsp with four equally sized 4gb files named 00, 01, 02, 03 inside. I couldn't determine which ones of all these to install, so I scraped the whole thing. It seems like the script is not finishing some steps?
 

nuvandibe

Active Member
OP
Newcomer
Joined
Mar 19, 2007
Messages
43
Trophies
1
XP
550
Country
United States
Thanks for the release of this! I've tested it and I think there may still be bugs with the current release (12/9/18). I converted an XCI over 4gb, and it generated about 6 nsp files, varying sizes. I tried installing them via the original tinfoil via USB mode, they failed to install the tickets but proceed to install the content, but afterwards the game wouldn't load.

I tried it on another 14gb XCI, it created 20+ nsp files, varying sizes, and also there was a folder named GAME_split.nsp with four equally sized 4gb files named 00, 01, 02, 03 inside. I couldn't determine which ones of all these to install, so I scraped the whole thing. It seems like the script is not finishing some steps?

Strange. It shouldn't generate multiple NSP files at all. The script takes the input XCI and feeds it into 4NXCI and it only calls that program once. It then feeds the single output .nsp into splitNSP. I've seen a couple of times when it creates two NSP files, but it could be an issue with timing. I think that 4NXCI might very briefly put some temporary NSP files in the directory, and without a delay, those might get stuck. I'll investigate. If anyone else can provide details, let me know.
 

nuvandibe

Active Member
OP
Newcomer
Joined
Mar 19, 2007
Messages
43
Trophies
1
XP
550
Country
United States
I've been unable to track down the bug. Has anyone else had issues where the script outputs multiple NSP files?
 

Xul

Member
Newcomer
Joined
Dec 20, 2018
Messages
8
Trophies
0
Age
43
XP
69
Country
United States
So, I've been dealing with a ton of corruption issues on exfat. To the point that it's not even worth using - i've spent more time rebuilding my image... So I've formatted back to fat32 and am trying this script out to install nsp's. 4XCI works great already. I installed python and downloaded split nsp. I got the following errors from running the batch file. Any help appreciated as this is a nice allinone tool. I'm manually running splitnsp and seeing if that works but would love this to work. Appreciate your help!

Summary:
Game NSP 1: 01006a800016e000.nsp

Done!

Waiting for 4nxci.exe to finish. Press CTRL+C to abort if this hangs for a long time.

Done!

Splitting XCI into 4GB parts...
'python' is not recognized as an internal or external command,
operable program or batch file.
Done!

* There will be a couple harmless errors here if the .nsp file is already smaller than 4GiB.
* This is normal. The .nsp file will still work fine.

Setting Archive attribute on files...
The system cannot find the path specified.

Setting Archive attribute on directory...
File not found - v-ssbu_split.nsp

Done!

Press any key to continue . . .
 

nuvandibe

Active Member
OP
Newcomer
Joined
Mar 19, 2007
Messages
43
Trophies
1
XP
550
Country
United States
So, I've been dealing with a ton of corruption issues on exfat. To the point that it's not even worth using - i've spent more time rebuilding my image... So I've formatted back to fat32 and am trying this script out to install nsp's. 4XCI works great already. I installed python and downloaded split nsp. I got the following errors from running the batch file. Any help appreciated as this is a nice allinone tool. I'm manually running splitnsp and seeing if that works but would love this to work. Appreciate your help!

Summary:
Game NSP 1: 01006a800016e000.nsp

Done!

Waiting for 4nxci.exe to finish. Press CTRL+C to abort if this hangs for a long time.

Done!

Splitting XCI into 4GB parts...
'python' is not recognized as an internal or external command,
operable program or batch file.
Done!

* There will be a couple harmless errors here if the .nsp file is already smaller than 4GiB.
* This is normal. The .nsp file will still work fine.

Setting Archive attribute on files...
The system cannot find the path specified.

Setting Archive attribute on directory...
File not found - v-ssbu_split.nsp

Done!

Press any key to continue . . .

It sounds like the Python installer didn't add the program's working directory to Windows' path environment variable. What version of Windows are you using, and which version of Python did you install?
 

Xul

Member
Newcomer
Joined
Dec 20, 2018
Messages
8
Trophies
0
Age
43
XP
69
Country
United States
It sounds like the Python installer didn't add the program's working directory to Windows' path environment variable. What version of Windows are you using, and which version of Python did you install?

Running Windows 10, latest service pack. I just installed the latest python build -
Python 3.7.2 - 2018-12-24 installed the x86 web-based installer.
 

nuvandibe

Active Member
OP
Newcomer
Joined
Mar 19, 2007
Messages
43
Trophies
1
XP
550
Country
United States
Running Windows 10, latest service pack. I just installed the latest python build -
Python 3.7.2 - 2018-12-24 installed the x86 web-based installer.

Try reinstalling Python.
  • If Python 3.7.1 is already installed, use Programs and Features to remove it.
  • On the first screen of the installer, make sure you're checking the option "Add Python 3.7 to PATH" or else it will give you the error you mentioned.
  • Proceed through the rest of the installer as normal.
View attachment 153414
 
Last edited by nuvandibe,

Xul

Member
Newcomer
Joined
Dec 20, 2018
Messages
8
Trophies
0
Age
43
XP
69
Country
United States
Try reinstalling Python.
  • If Python 3.7.1 is already installed, use Programs and Features to remove it.
  • On the first screen of the installer, make sure you're checking the option "Add Python 3.7 to PATH" or else it will give you the error you mentioned.
  • Proceed through the rest of the installer as normal.
View attachment 153414

That worked. I didnt have that first checkmark added when i did the original install. Thank you!
 

laramie

Well-Known Member
Member
Joined
Dec 15, 2014
Messages
911
Trophies
0
XP
1,387
Country
United States
Could this by chance be made into a nsp? It'd be nice to dump my games from xci to my sd card in nsp format split into 4GB files or even a HB.
 

nuvandibe

Active Member
OP
Newcomer
Joined
Mar 19, 2007
Messages
43
Trophies
1
XP
550
Country
United States
Could this by chance be made into a nsp? It'd be nice to dump my games from xci to my sd card in nsp format split into 4GB files or even a HB.
Sorry for the late, late reply. I'm not around much.

This relies on other devs' Windows-based tools. It's just a script for them, not even a frontend, that makes them easier to use. Plus, it'd be kinda pointless even if it were possible, since the whole point is that you need to start from a file that is larger than what will fit on a FAT32 partition, and if you don't have a FAT32 partition, you won't need this tool.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @Psionic Roshambo, Thats pretty cool.