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" | |
There is no real solid script. Like quickemu. That does this. Just type by hand and wait for hours. It's disk bound. IOPS
nstool --fstree diablo3c.nsp
[PartitionFs]
Type: PFS0
FileNum: 2
[PartitionFs/Tree]
Root:/
a5bf6d6bf266646c1b6d8d5129ad1a1c.nca
448d8ff40bce53176e29dd1e458f863a.cnmt.nca
nstool --fstree diablo3.nsp
[PartitionFs]
Type: PFS0
FileNum: 8
[PartitionFs/Tree]
Root:/
01001b300b9be0000000000000000005.cert
01001b300b9be0000000000000000005.tik
244b84153edddf42407aa2a03572202a.nca
ade5aee315b23e0d209fc8b3bb7965eb.nca
93a483f1d8853d85ac98071070f5a547.nca
87812cfdcc986b599d340eda9746d428.cnmt.nca
87812cfdcc986b599d340eda9746d428.cnmt.xml
e0197ee7f5aa5837643e8d982d4e3344.nca
Tons of stuff missing in this repack. Would be surprised if it runs. How can it run without tik etc
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
Massive disk usage