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

botwpoking

Member
OP
Newcomer
Joined
Mar 14, 2017
Messages
22
Trophies
0
XP
60
Country
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.

unCxa2v.jpg


Thanks.
 

FlappyFalco

Smile, No Matter How Bad it Gets~
Member
Joined
Oct 11, 2015
Messages
234
Trophies
0
Location
The deepest recesses of my mind
XP
516
Country
Ireland
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.

unCxa2v.jpg


Thanks.

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.
 

botwpoking

Member
OP
Newcomer
Joined
Mar 14, 2017
Messages
22
Trophies
0
XP
60
Country
Check your padding that is used in the sarc portion. I think wiiuzip or my build of uwizzard have adjustable sarc padding.
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?
 

botwpoking

Member
OP
Newcomer
Joined
Mar 14, 2017
Messages
22
Trophies
0
XP
60
Country
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.
 

CaioCsarPereiraS

Angel333119
Newbie
Joined
Apr 1, 2012
Messages
4
Trophies
0
Age
35
Location
Patos de Minas - Minas Gerais
XP
165
Country
Brazil
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,
  • Like
Reactions: botwpoking

botwpoking

Member
OP
Newcomer
Joined
Mar 14, 2017
Messages
22
Trophies
0
XP
60
Country
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.
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.
 
  • Like
Reactions: FlappyFalco

1UPForever

New Member
Newbie
Joined
Mar 31, 2017
Messages
3
Trophies
0
Age
35
XP
41
Country
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?
 

CaioCsarPereiraS

Angel333119
Newbie
Joined
Apr 1, 2012
Messages
4
Trophies
0
Age
35
Location
Patos de Minas - Minas Gerais
XP
165
Country
Brazil
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.

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...

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?

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.
 
  • Like
Reactions: botwpoking

FlappyFalco

Smile, No Matter How Bad it Gets~
Member
Joined
Oct 11, 2015
Messages
234
Trophies
0
Location
The deepest recesses of my mind
XP
516
Country
Ireland
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.

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.
 

CaioCsarPereiraS

Angel333119
Newbie
Joined
Apr 1, 2012
Messages
4
Trophies
0
Age
35
Location
Patos de Minas - Minas Gerais
XP
165
Country
Brazil
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.

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.
 
  • Like
Reactions: FlappyFalco

botwpoking

Member
OP
Newcomer
Joined
Mar 14, 2017
Messages
22
Trophies
0
XP
60
Country
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...
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.
 

FlappyFalco

Smile, No Matter How Bad it Gets~
Member
Joined
Oct 11, 2015
Messages
234
Trophies
0
Location
The deepest recesses of my mind
XP
516
Country
Ireland
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.

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.
 
  • Like
Reactions: botwpoking

botwpoking

Member
OP
Newcomer
Joined
Mar 14, 2017
Messages
22
Trophies
0
XP
60
Country
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.
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.
Bp1kHx.jpg

KbLvsD.jpg
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.
C:\Layout>sarcpack.py asd 0x2000
SARCPack v0.2.1 by NWPlayer123
Generating file list....

anim/AkashiNum_00_Flash.bflan
Traceback (most recent call last):
File "C:\Layout\SARCPack.py", line 99, in <module>
main()
File "C:\Layout\SARCPack.py", line 94, in main
test.pack(sys.argv[1], sys.argv[2])
File "C:\Layout\SARCPack.py", line 27, in pack
if filesize % padding: filesize += (padding - (filesize % padding))
TypeError: unsupported operand type(s) for %: 'long' and 'str'

C:\Layout>sarcpack.py asd 8192
SARCPack v0.2.1 by NWPlayer123
Generating file list....

anim/AkashiNum_00_Flash.bflan
Traceback (most recent call last):
File "C:\Layout\SARCPack.py", line 99, in <module>
main()
File "C:\Layout\SARCPack.py", line 94, in main
test.pack(sys.argv[1], sys.argv[2])
File "C:\Layout\SARCPack.py", line 27, in pack
if filesize % padding: filesize += (padding - (filesize % padding))
TypeError: unsupported operand type(s) for %: 'long' and 'str'
 
Last edited by botwpoking,
  • Like
Reactions: FlappyFalco

FlappyFalco

Smile, No Matter How Bad it Gets~
Member
Joined
Oct 11, 2015
Messages
234
Trophies
0
Location
The deepest recesses of my mind
XP
516
Country
Ireland
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.
Bp1kHx.jpg

KbLvsD.jpg
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.
C:\Layout>sarcpack.py asd 0x2000
SARCPack v0.2.1 by NWPlayer123
Generating file list....

anim/AkashiNum_00_Flash.bflan
Traceback (most recent call last):
File "C:\Layout\SARCPack.py", line 99, in <module>
main()
File "C:\Layout\SARCPack.py", line 94, in main
test.pack(sys.argv[1], sys.argv[2])
File "C:\Layout\SARCPack.py", line 27, in pack
if filesize % padding: filesize += (padding - (filesize % padding))
TypeError: unsupported operand type(s) for %: 'long' and 'str'

C:\Layout>sarcpack.py asd 8192
SARCPack v0.2.1 by NWPlayer123
Generating file list....

anim/AkashiNum_00_Flash.bflan
Traceback (most recent call last):
File "C:\Layout\SARCPack.py", line 99, in <module>
main()
File "C:\Layout\SARCPack.py", line 94, in main
test.pack(sys.argv[1], sys.argv[2])
File "C:\Layout\SARCPack.py", line 27, in pack
if filesize % padding: filesize += (padding - (filesize % padding))
TypeError: unsupported operand type(s) for %: 'long' and 'str'

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.
 
  • Like
Reactions: botwpoking

botwpoking

Member
OP
Newcomer
Joined
Mar 14, 2017
Messages
22
Trophies
0
XP
60
Country
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.
I suppose it's working as the repacks aren't crashing, but none of the values I tried worked.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/o2TO5atI4rU?si=sOlJH6YDAUiakK0U