RELEASE XCI-to-Split-NSP

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by nuvandibe, Dec 9, 2018.

  1. nuvandibe
    OP

    nuvandibe Member

    Newcomer
    3
    Mar 19, 2007
    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, Dec 27, 2018
  2. Dark_Entrophy

    Dark_Entrophy Member

    Newcomer
    1
    Feb 9, 2017
    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.
     
  3. nuvandibe
    OP

    nuvandibe Member

    Newcomer
    3
    Mar 19, 2007
    United States
    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.
     
  4. bawzy

    bawzy Member

    Newcomer
    2
    Dec 15, 2014
    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?
     
  5. nuvandibe
    OP

    nuvandibe Member

    Newcomer
    3
    Mar 19, 2007
    United States
    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.
     
  6. nuvandibe
    OP

    nuvandibe Member

    Newcomer
    3
    Mar 19, 2007
    United States
    I've been unable to track down the bug. Has anyone else had issues where the script outputs multiple NSP files?
     
  7. Xul

    Xul Member

    Newcomer
    1
    Dec 20, 2018
    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 . . .
     
  8. nuvandibe
    OP

    nuvandibe Member

    Newcomer
    3
    Mar 19, 2007
    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?
     
  9. Xul

    Xul Member

    Newcomer
    1
    Dec 20, 2018
    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.
     
  10. nuvandibe
    OP

    nuvandibe Member

    Newcomer
    3
    Mar 19, 2007
    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
     
    Last edited by nuvandibe, Dec 27, 2018
  11. Xul

    Xul Member

    Newcomer
    1
    Dec 20, 2018
    United States
    That worked. I didnt have that first checkmark added when i did the original install. Thank you!
     
  12. nuvandibe
    OP

    nuvandibe Member

    Newcomer
    3
    Mar 19, 2007
    United States
    Ayyy
     
  13. laramie

    laramie GBAtemp Advanced Fan

    Member
    4
    Dec 15, 2014
    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.
     
  14. nuvandibe
    OP

    nuvandibe Member

    Newcomer
    3
    Mar 19, 2007
    United States
    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.
     
Loading...