Help needed repacking Breath of the Wild's Yaz0/SZS (sblarc)

Discussion in 'Wii U - Hacking & Backup Loaders' started by botwpoking, Mar 18, 2017.

  1. botwpoking
    OP

    botwpoking Member

    Newcomer
    22
    7
    Mar 14, 2017
    I'm new to Wii U modding and I'm looking to replace the game's logo with the original. From what I can tell it's located at "content\Pack\Bootup.pack\Layout\Common.sblarc\timg" as Logo2D_00_JPja^d.bflim and Logo3DGameTitle_00_JPja^d.bflim. Tried unpacking, replacing and repacking everything with Uwizard, but the game crashes at boot. Tested not replacing anything and SARC repacking works, but not Yaz0 (SZS). Uwizard seems to use yaz0enc and I can't find any replacement, any ideas? Here's the Common.sblarc header for reference.

    [​IMG]

    Thanks.
     
  2. botwpoking
    This message by botwpoking has been removed from public view by Issac, Mar 21, 2017.
    Mar 20, 2017
  3. FlappyFalco

    FlappyFalco Smile, No Matter How Bad it Gets~

    Member
    232
    132
    Oct 11, 2015
    Ireland
    The deepest recesses of my mind
    Have you tried using this?

    I haven't used it myself now, and it might still be based on Yaz0enc, but it's still worth a try.
     
  4. botwpoking
    OP

    botwpoking Member

    Newcomer
    22
    7
    Mar 14, 2017
    Yeah, it can't open it.
     
  5. mariosonicds

    mariosonicds GBAtemp Regular

    Member
    140
    143
    Oct 9, 2009
    United States
    Check your padding that is used in the sarc portion. I think wiiuzip or my build of uwizzard have adjustable sarc padding.
     
    botwpoking likes this.
  6. botwpoking
    OP

    botwpoking Member

    Newcomer
    22
    7
    Mar 14, 2017
    FlappyFalco suggested Wii U Zip, couldn't open these SZS. I don't think that's it, I've tested unpacking and repacking the files untouched and while SARC works, SZS doesn't. Either way, how would I check for padding?
     
  7. MeAndHax
    This message by MeAndHax has been removed from public view by Issac, Mar 21, 2017, Reason: Neither is posting only memes.
    Mar 21, 2017
  8. botwpoking
    OP

    botwpoking Member

    Newcomer
    22
    7
    Mar 14, 2017
    Okay, to give better context, these are the results with both the original Uwizard and mariosonicds':

    content\Pack\Bootup.pack (SARC)
    Layout\Common.sblarc (Yaz0 SARC)​

    Original Common.sblarc: 3.770 KB
    Untouched Repacked Common.sblarc by mariosonicds': 12.567 KB
    Untouched Repacked Common.sblarc by original Uwizard: 3.724 KB

    Both crash the game once repacked into Bootup.pack. I've tested repacking untouched .pack and it works. I'm going mostly blind here, so expect me to know less than I seem to. I can provide the file for testing if anyone wants to take a better look.
     
  9. CaioCsarPereiraS

    CaioCsarPereiraS Angel333119

    Newcomer
    4
    3
    Apr 1, 2012
    Brazil
    Patos de Minas - Minas Gerais
    Use this tool to rebuild .SARC or .PACK files... https://github.com/NWPlayer123/WiiUTools/blob/master/SARCTools/SARCPack.py

    If you want change the padding value... modify the line 96 with the value you want...
    example: line 96: test.pack(sys.argv[1], 0x100), the value of padding is 0x100.

    Zelda Breath of the Wild don't uses padding.

    to switch off padding, modify this lines to:


    line 49 datastart = padSFAT + filesize -1
    line 50 filesize += padSFAT + lenfiles -1
    line 74 #sarc.write("\x00" * padSFAT)
    line 96 test.pack(sys.argv[1], 0x01)

    Sorry for the bad english... I hope you can understand.
     
    Last edited by CaioCsarPereiraS, Mar 27, 2017
    botwpoking likes this.
  10. botwpoking
    OP

    botwpoking Member

    Newcomer
    22
    7
    Mar 14, 2017
    I've managed working SARC repacks with Uwizard, the problem are the Yaz0 compressed SARCs inside them. Game hangs on its initial loading. Thanks though, that script might come in handy.
     
    FlappyFalco likes this.
  11. 1UPForever

    1UPForever Newbie

    Newcomer
    3
    0
    Mar 31, 2017
    United States
    So I've been making attempts to repack the last undub files for Breath of the Wild and I can't seem to reliably create an unpadded .pack file with either UWizard or Wii U Zip. This tool looks promising, but I have practically no experience with Python. Am I missing something in the other tools? Or could you explain the process for using the python tools?
     
  12. CaioCsarPereiraS

    CaioCsarPereiraS Angel333119

    Newcomer
    4
    3
    Apr 1, 2012
    Brazil
    Patos de Minas - Minas Gerais
    Uwizard never repack 100% correct... If you compare original file and a rebuild file without modification you will see... make a test... In my tests I repacked Bootup_USen.pack Unmodified, and it don't works, game freeze.

    To YAZ0 I'm using yaz0enc.exe from here http://amnoid.de/gc/ - You only have to rename file after use the program...

    I'm trying translate the game... I doing much tests with the Bootup_USen.pack file... The game don't works with the modified file... But works with repacked Unmodified file...

    To rebuild files with SARCPack.py:

    First install python if you don't have it.

    Put the files in same folder, the SARCPack.py and the file that you want and open command prompt in the folder...

    If you don't know how to do this... http://www.techsupportalert.com/content/how-open-windows-command-prompt-any-folder.htm

    The command is:

    SARCPack.py folder name

    example:
    SARCPack.py TitleBG_USen

    You can also make a bat file if you want...

    Sorry bad english.
     
    botwpoking likes this.
  13. FlappyFalco

    FlappyFalco Smile, No Matter How Bad it Gets~

    Member
    232
    132
    Oct 11, 2015
    Ireland
    The deepest recesses of my mind
    So SARCPack.py works but Uwizard doesn't? I noticed that while Uwizard would give me a file a few KB bigger than the original, SARCPack.py would give me a file more or less the same size as the original.
     
  14. CaioCsarPereiraS

    CaioCsarPereiraS Angel333119

    Newcomer
    4
    3
    Apr 1, 2012
    Brazil
    Patos de Minas - Minas Gerais
    If you make the modifications that I have said in the SARCPack.py code... The unmodified SARC file will be identical to original.



    Sorry bad english.
     
    FlappyFalco likes this.
  15. botwpoking
    OP

    botwpoking Member

    Newcomer
    22
    7
    Mar 14, 2017
    I see. I've repacked with @mariosonicds' fork and it worked. I think we're stuck until someone knowledgeable takes a look at what makes this game's Yaz0 tick.
     
  16. FlappyFalco

    FlappyFalco Smile, No Matter How Bad it Gets~

    Member
    232
    132
    Oct 11, 2015
    Ireland
    The deepest recesses of my mind
    For SZS archives, try using Yaz0enc with the SARCPack.py mentioned above. You can still use Uwizard for unpacking, just not for packing. I did this and it gave me a file of the same size as the original.
     
    botwpoking likes this.
  17. botwpoking
    OP

    botwpoking Member

    Newcomer
    22
    7
    Mar 14, 2017
    I'm getting
    Which version of Python are you on?
     
  18. FlappyFalco

    FlappyFalco Smile, No Matter How Bad it Gets~

    Member
    232
    132
    Oct 11, 2015
    Ireland
    The deepest recesses of my mind
    I've the latest of both Python 2 and 3. I'm not sure which one the program uses. I just use the command "SARCPack foldername". Don't put in a value for padding.
     
    botwpoking likes this.
  19. botwpoking
    OP

    botwpoking Member

    Newcomer
    22
    7
    Mar 14, 2017
    Same here, strange. It returns that regardless of input, on both edited and original scripts. I'll try reinstalling, I guess.

    Edit: Never mind, copying and pasting it messed with formatting. I've managed a repack without crashing, but it's all garbled up in game. It's probably the padding value, don't think it's the unpacking as I've checked a few textures before and they were fine.
    Warning: Spoilers inside!
    I'm convinced that's not an emulation issue, but I'd rather keep NAND corruption risk to a minimum as I don't have an external drive on my Wii U to safely mess with files.

    Edit 2: SARCPack doesn't play along with padding values.
    Warning: Spoilers inside!
     
    Last edited by botwpoking, Apr 5, 2017
    FlappyFalco likes this.
  20. FlappyFalco

    FlappyFalco Smile, No Matter How Bad it Gets~

    Member
    232
    132
    Oct 11, 2015
    Ireland
    The deepest recesses of my mind
    Yep, I'm getting the exact same error on my end. I've looked for a solution to no avail. However, you might try hardcoding in the value you want like @CaioCsarPereiraS suggested above. Looking at the code, it appears that SARCPack.py will use the value specified at line 96 if you don't specify one yourself.
     
    botwpoking likes this.
  21. botwpoking
    OP

    botwpoking Member

    Newcomer
    22
    7
    Mar 14, 2017
    I suppose it's working as the repacks aren't crashing, but none of the values I tried worked.
     
  22. CaioCsarPereiraS

    CaioCsarPereiraS Angel333119

    Newcomer
    4
    3
    Apr 1, 2012
    Brazil
    Patos de Minas - Minas Gerais
    I think the files BootUp.sblarc and Common.sblarc have diferents vallues of padding in diferents places...

    I'm uses Python 2.7
     
    Last edited by CaioCsarPereiraS, Apr 13, 2017