ROM Hack Need help extracting Tetris 99 patch V2.0 files

appleb

Active Member
OP
Newcomer
Joined
Nov 20, 2006
Messages
32
Trophies
0
XP
171
Country
Canada
I'm trying to extract the files for Tetris 99 along with the V2.0 patch.
I have two files
v-tetris99.nsp (base game)
v-tetris99_v262144.nsp (v2.0 update patch)

I am able to extract the base game without issue using the following commands, so I'm certain my keys are okay:
hactool -t pfs0 --pfs0dir=output_nca v-tetris99.nsp
hactool -t nca -k keys.dat --titlekey=44xxxx00 --romfsdir=output_romfs output_nca/cc0d3c145987b75b18ec84f37b9f362b.nca
This works fine and i am able to see the files in output_romfs

But when using the the same command to extract files from the update:
hactool -t pfs0 --pfs0dir=output_nca v-tetris99_v262144.nsp
hactool -t nca -k keys.dat --titlekey=2CxxxxF2 --romfsdir=output_romfs output_nca/4902e99a47f2f5d3ef468abad1a52367.nca

i get this error:
BKTR section seems to be corrupted.
Error: section 0 is corrupted!
Note: cannot save BKTR section without base romfs.

Can someone tell me what I'm doing wrong? My main interest is just getting access to the bfstm music files in the update.
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,973
Country
Poland
Update doesn't contain files. It contains diffs.
So you need to make plaintext of Program NCA from Base and use it as --basenca for update.
 

appleb

Active Member
OP
Newcomer
Joined
Nov 20, 2006
Messages
32
Trophies
0
XP
171
Country
Canada
Update doesn't contain files. It contains diffs.
So you need to make plaintext of Program NCA from Base and use it as --basenca for update.

Hmm, well I tried this...

hactool -t pfs0 --pfs0dir=output_nca v-tetris99.nsp
hactool -t nca -k keys.dat --titlekey=44xxxx00 --plaintext=newbase.nca output_nca/cc0d3c145987b75b18ec84f37b9f362b.nca

hactool says "Saving Decrypted NCA to newbase.nca..." and I get a file of size 152,846,336 bytes, so that looks okay up to here.

Then trying to extract the update:

hactool -t pfs0 --pfs0dir=output_nca v-tetris99_v262144.nsp
hactool -t nca -k keys.dat --titlekey=2CxxxxF2 --basenca newbase.nca --romfsdir=output_romfs output_nca/4902e99a47f2f5d3ef468abad1a52367.nca

The second line gives me the same error as before...
BKTR section seems to be corrupted.
Error: section 0 is corrupted!
Error: section 1 is corrupted!
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,973
Country
Poland
Hmm, well I tried this...

hactool -t pfs0 --pfs0dir=output_nca v-tetris99.nsp
hactool -t nca -k keys.dat --titlekey=44xxxx00 --plaintext=newbase.nca output_nca/cc0d3c145987b75b18ec84f37b9f362b.nca

hactool says "Saving Decrypted NCA to newbase.nca..." and I get a file of size 152,846,336 bytes, so that looks okay up to here.

Then trying to extract the update:

hactool -t pfs0 --pfs0dir=output_nca v-tetris99_v262144.nsp
hactool -t nca -k keys.dat --titlekey=2CxxxxF2 --basenca newbase.nca --romfsdir=output_romfs output_nca/4902e99a47f2f5d3ef468abad1a52367.nca

The second line gives me the same error as before...
BKTR section seems to be corrupted.
Error: section 0 is corrupted!
Error: section 1 is corrupted!
--basenca=newbase.nca
 

appleb

Active Member
OP
Newcomer
Joined
Nov 20, 2006
Messages
32
Trophies
0
XP
171
Country
Canada
--basenca=newbase.nca

I appear to be still getting the same error =(

hactool -t pfs0 --pfs0dir=output_nca v-tetris99.nsp
hactool -t nca -k keys.dat --titlekey=44xxxx00 --plaintext=newbase.nca output_nca/cc0d3c145987b75b18ec84f37b9f362b.nca

hactool -t pfs0 --pfs0dir=output_nca v-tetris99_v262144.nsp
hactool -t nca -k keys.dat --titlekey=2CxxxxF2 --basenca=newbase.nca --romfsdir=output_romfs output_nca/4902e99a47f2f5d3ef468abad1a52367.nca

output:
BKTR section seems to be corrupted.
Error: section 0 is corrupted!
Error: section 1 is corrupted!

I think i'm almost there... probably something silly missing.
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,243
Trophies
3
XP
11,973
Country
Poland
Try to delete
Code:
 -t nca

take --titlekey after --basenca

If still is not working, then NCA is wrong or you have outdated keys.
 

appleb

Active Member
OP
Newcomer
Joined
Nov 20, 2006
Messages
32
Trophies
0
XP
171
Country
Canada
I finally got it working using these two commands:

hactool -t nca -k keys.dat --titlekey=44xxxxxx00 --exefsdir=exefs --romfsdir="romfs.bin" base.nca --plaintext=NCAID_PLAIN.nca
hactool -t nca -k keys.dat --titlekey=2CxxxxxxF2 --basenca="NCAID_PLAIN.nca" --romfsdir="romfs.bin" update2.nca
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    LeoTCK @ LeoTCK: yes for nearly a month i was officially a wanted fugitive, until yesterday when it ended