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,268
Trophies
3
XP
12,034
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,268
Trophies
3
XP
12,034
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,268
Trophies
3
XP
12,034
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
  • SylverReZ @ SylverReZ:
    @Bunjolio, Proxy sites, not very effective.
  • Bunjolio @ Bunjolio:
    if ur on a Chromebook and cant change jack about the laptop that's what I gotta use
  • SylverReZ @ SylverReZ:
    One of the sites that weren't blocked on the school's network was some file uploading sites. I would upload some games, write down the URL and take it to school one day.
  • Bunjolio @ Bunjolio:
    lol
  • SylverReZ @ SylverReZ:
    I did it when the teachers werent looking ofc. I even managed to take in a USB stick that wasn't allowed.
  • Bunjolio @ Bunjolio:
    my school has a chrome extension called light speed filter agent and it legit blocks YouTube pfps since the file cdn(I think aka yt3.ggpht.com) is classed as mature
  • Bunjolio @ Bunjolio:
    mhm
  • Bunjolio @ Bunjolio:
    they have other stuff like goguardian too
  • SylverReZ @ SylverReZ:
    Ours mainly relied on the router, I believe.
  • Bunjolio @ Bunjolio:
    our school network and chrome policies block stuff too
  • Bunjolio @ Bunjolio:
    alot of yt to mp3 sites are blocked by light speed for "Security"
  • SylverReZ @ SylverReZ:
    It was easy to bypass some of the restrictions, as one of the admins left a registry key in the administrative shares drive, which allowed me to get around the blocking of some sites.
  • Bunjolio @ Bunjolio:
    tf does tta mean
  • Bunjolio @ Bunjolio:
    yeah this is chrome os
  • Bunjolio @ Bunjolio:
    cant do shit
  • SylverReZ @ SylverReZ:
    @Bunjolio, Wdym 'TTA'?
  • Bunjolio @ Bunjolio:
    that* as in why yt to mp3 sites are blocked for security
  • SylverReZ @ SylverReZ:
    @Bunjolio, Remember when YouTubetoMP3 was a thing back in the 2010s?
  • SylverReZ @ SylverReZ:
    Until YT updated some stuffs and broke the website.
  • Bunjolio @ Bunjolio:
    I was 2 in 2010
  • SylverReZ @ SylverReZ:
    Oh lol
  • Bunjolio @ Bunjolio:
    lol
  • SylverReZ @ SylverReZ:
    This was in the Minecraft-era.
    Bunjolio @ Bunjolio: a