Last active
July 2, 2023 20:34
-
-
Save john-peterson/064c75803def76c88160aea903084408 to your computer and use it in GitHub Desktop.
Merge base and update NSP into a single file. We used to call it slipstream when we used windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir .switch base update exefs romfs nca nsp | |
basensp=diablo3.nsp | |
updatensp=diablo3u.nsp | |
cp .local/share/yuzu/keys/prod.keys .switch/ | |
sed 's/|[^|]*$//' .local/share/yuzu/keys/title.keys | sed 's/|/=/' > .switch/title.keys | |
hactool -t pfs0 $basensp --outdir base | |
hactool -t pfs0 $updatensp --outdir update | |
for i in base/*.nca; do type=$(hactool --disablekeywarns $i | grep -oP "(?<=Content Type:\s{23}).*"); echo $i $type; if [ $type == "Program" ]; then basenca=$i; fi; done | |
for i in update/*.nca; do type=$(hactool --disablekeywarns $i | grep -oP "(?<=Content Type:\s{23}).*"); echo $i $type; if [ $type == "Program" ]; then updatenca=$i; elif [ $type == "Control" ]; then controlnca=$i; fi; done | |
# parse Title ID from base program NCA | |
titleid=$(hactool --disablekeywarns $basenca | grep -oP "(?<=Title ID:\s{27}).*") | |
# extract base and update NCAs into romfs end exefs | |
hactool --basenca $basenca $updatenca --romfsdir romfs --exefsdir exefs | |
# pack romfs and exefs into one NCA | |
hacpack --type nca --ncatype program --plaintext --exefsdir=exefs --romfsdir romfs --titleid $titleid --outdir nca | |
patchednca=$(ls nca) | |
# generate meta NCA from patched NCA and control NCA | |
hacpack --type="nca" --ncatype="meta" --titletype="application" --programnca="nca/$patchednca" --controlnca="$controlnca" --titleid="$titleid" --outdir="nca" | |
# pack all three NCAs into an NSP | |
hacpack --type="nsp" --ncadir="nca" --titleid="$titleid" --outdir="nsp" | |
Should try this on a smaller file. Are there any updates for Touryst? What other small ones are there with seeders. And updates. And not strange packaging
Is all that bundled in the new NCA?? How does this work. Can s
./yuzu-mainline-20230623-3a991f3ae.AppImage -f -g /home/dev/diablo3c.nsp
Unhandled SIGSEGV at rip 0x00000000008d4023
Segmentation fault (core dumped)
SOMEHOW I suspected that
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tons of stuff missing in this repack. Would be surprised if it runs. How can it run without tik etc