Need help extracting Tetris 99 patch V2.0 files

Discussion in 'Switch - ROM Hacking, Saves, Translations & Tools' started by appleb, Sep 11, 2019.

  1. appleb
    OP

    appleb Member

    Newcomer
    2
    Nov 20, 2006
    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.
     
  2. masagrator

    masagrator File digger

    Member
    10
    Oct 14, 2018
    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.
     
  3. appleb
    OP

    appleb Member

    Newcomer
    2
    Nov 20, 2006
    Canada
    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!
     
  4. masagrator

    masagrator File digger

    Member
    10
    Oct 14, 2018
    Poland
    --basenca=newbase.nca
     
  5. appleb
    OP

    appleb Member

    Newcomer
    2
    Nov 20, 2006
    Canada
    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.
     
  6. masagrator

    masagrator File digger

    Member
    10
    Oct 14, 2018
    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.
     
  7. appleb
    OP

    appleb Member

    Newcomer
    2
    Nov 20, 2006
    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
     
Quick Reply
Draft saved Draft deleted
Loading...