Mario Kart Wii Gecko Codes, Cheats, & Hacks
DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots - Printable Version

+- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com)
+-- Forum: Other & Non-Hacking MKW Stuff (https://mariokartwii.com/forumdisplay.php?fid=12)
+--- Forum: General Discussion (https://mariokartwii.com/forumdisplay.php?fid=13)
+--- Thread: DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots (/showthread.php?tid=2052)



DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots - Seedonator - 06-18-2023

Hey so I've been working on a mod for BT3 on Wii which is coming together really nicely. One of the features that'll be part of it is adding 43 new music slots to be selected before a battle or in the BGM Test menu which I've figured out how to achieve however there is a problem. So basically Sparking! Meteor which is the JP version of BT3 has 4 songs in the game which can be unlocked through the story mode making a total of 24 tracks in that version. The NTSC/PAL version which have their own soundtrack only have 20 tracks in the game and so there wasn't any need to mess with the code for locked music. Now the problem here is that the locking functionality is still carried over for all the hidden slots past track 20 in BT3 which means my mod for unlocking and adding extra music won't work because it'll show the "???" text over the song (meaning locked). 

After a while of banging rocks together, I've isolated some hex values in the save game file that determines the locked state of majority of the tracks however there are still a total of 10 locked. I should also clarify that the maximum additional slots you can add is 43 as far as I'm aware, so I really want to be able to unlock these last slots to get the most of this mod. Also someone has already made this mod for the PS2 version who helped me figure out how to port it to Wii however he told me he doesn't have a code to unlock the hidden slots on Wii.

[Image: image.png]

The values at C30 00-03 are the ones that can unlock majority of the slots. What I've noticed is each individual 'F' is able to unlock 4 tracks at a time in sections however the reason I put a 'B' in there was due to the fact that going above corrupts the data. Also on a blank save file, I can't even use 'BF' cause that also corrupts the save so this is dependant on other parts of the save file which is a headache. (btw I'm new to hex editing and this stuff so cut me some slack if what I'm doing makes no logical sense)
So now I'm kinda at a dead end, can someone help me figure out how to make a Gecko or Action Replay code to do this or to find the rest of the hex values? I saw this https://mariokartwii.com/nonmkwcodes/dbzbt3/unlockliterallyeverything.txt code that was able to unlock everything on both Budokai Tenkaichi 3 and also Sparking! Meteor (except the 4 unlockable tracks in SM since obviously it wasn't made for that game in the first place) so maybe its possible to get it to also unlock the music slots.

The current locked track slots with my save file are songs 29-35, 59, 61-63 for a total of 10 slots locked as stated above.
My save file and mod patch with instructions is provided below.
Here's a little demo of how this mod is going to work and look if I'm able to unlock the other 10 tracks:



RE: DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots - Seedonator - 06-18-2023

Save and mod files can be downloaded here: https://cdn.discordapp.com/attachments/768723380789575704/1120074397219303544/Cool_BT3_Files_yay.zip

In order to patch the game to add the extra track slots to the BGM Test menu, you'll need to extract the iso and get the file called wzs3us1.afs, then import it into this program called AFS Explorer which you can find online (version I use is 3.7) and load the AFL file as a file name list in the program to let you properly browse the contents of the AFS and import the .pak over Options_US.pak


RE: DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots - Vega - 06-18-2023

First, if you can get anything to work by "raw/plain" editing on Dolphin (or Dolphin-memory-engine), or on the Save File, then it can always be made in Code form.

Second, the Hex values would make more sense to you if you know Binary.

Each Hex digit (0 thru F) can be written in a Binary 4-digit number
0 = 0000
1 = 0001
2 = 0010
3 = 0011
.. ..
E = 1110
F = 1111

Even though this is a chapter from my ARMv8 tut, it explains Binary perfectly - https://mariokartwii.com/armv8/ch2.html

The game is using each bit "slot" for each music track. Some "slots" may be unused/reserved.

https://mariokartwii.com/nonmkwcodes/dbzbt3/savemap.txt

I'm sure you've already taken a look at this. Now if you take a look at C30 thru C33 on that page (which I had labeled as Unknown), we see the value..

000FFFFF

Since each Hex digit represents 4 slots, and there are 5 F's, we come to a simple conclusion that 5 x 4 = 20. 20 music slots. Binary value of 0 = locked. 1 = unlocked.

The next 4 slots for the JP game should be "on" the 3rd digit. Which would result as a value of 00FFFFFF. 6 x 4 = 24 music slots.

I have no idea why the game crashes when going above "BFFFFFFF".

I'll try to look more into later, I'm literally walking out the house, about to drive out of town due to work.


RE: DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots - Seedonator - 06-18-2023

(06-18-2023, 07:58 PM)Vega Wrote: First, if you can get anything to work by "raw/plain" editing on Dolphin (or Dolphin-memory-engine), or on the Save File, then it can always be made in Code form.

Second, the Hex values would make more sense to you if you know Binary.

Each Hex digit (0 thru F) can be written in a Binary 4-digit number
0 = 0000
1 = 0001
2 = 0010
3 = 0011
.. ..
E = 1110
F = 1111

Even though this is a chapter from my ARMv8 tut, it explains Binary perfectly - https://mariokartwii.com/armv8/ch2.html

The game is using each bit "slot" for each music track. Some "slots" may be unused/reserved.

https://mariokartwii.com/nonmkwcodes/dbzbt3/savemap.txt

I'm sure you've already taken a look at this. Now if you take a look at C30 thru C33 on that page (which I had labeled as Unknown), we see the value..

000FFFFF

Since each Hex digit represents 4 slots, and there are 5 F's, we come to a simple conclusion that 5 x 4 = 20. 20 music slots. Binary value of 0 = locked. 1 = unlocked.

The next 4 slots for the JP game should be "on" the 3rd digit. Which would result as a value of 00FFFFFF. 6 x 4 = 24 music slots.

I have no idea why the game crashes when going above "BFFFFFFF".

I'll try to look more into later, I'm literally walking out the house, about to drive out of town due to work.
Yeah for the binary stuff, I'm using 010 hex editor which has a field that I can manually increase or decrease the binary and convert it to hex and also change the unsigned byte size.
Yep I'm aware of the reserved slots, I can list 'em here if needed. As stated in the original post, putting BFFFFFFF in a empty save file also causes a data corruption error so there's some other stuff values that need to be changed in order for that to work. That also probably means that if I can find those values, I may be able to change the B to and F which might be able to unlock the rest of the slots. I know normally one F is for 4 slots however it seems as though using a value other than F or 0 causes weird combinations for locked/unlocked, so that could be related to why 59, 61, 62, 63 are locked but not 60 (using B instead of 0 or F) but that's just a hunch. Thanks for replying btw, already made my day Smile


RE: DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots - Seedonator - 06-18-2023

Okay I just reviewed everything that's needed for adding these extra music slots and have learned some stuff (as I mentioned before this was originally a port from another mod someone made for the ps2 version which can be found here if you're interested https://www.youtube.com/watch?v=z6-PJriGGXw). I will try to document the entire process and how everything works according to my knowledge soon after I check a few more things, I'm pretty sure this is heavily related to the supposedly random slots that are locked.


RE: DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots - Vega - 06-19-2023

Regarding documentation, try to find out which bit slot represents each particular music/track/slot in game.

Btw, here's a code I clobbered up really quick. There's an ASM version and Non-ASM version. Untested ofc, may not work.



Music Slot Unlock Modifier [Seedonator / Vega]

XXXXXXXX = Value to used on Music Slots

In Binary, 0 = unlocked, 1 = locked. Use online Binary to Hex converter if necessary.

00FFFFFF = Unlock all 24 songs in NTSC-J version of game (not applicable for this code ofc since code is for NTSC-U)
000FFFFF = Unlock all 20 songs in NTSC-U/PAL version of game; default value for game
FFFFFFFF = Unlock all slots? May crash game?

NTSC-U ASM
C2191E28 00000003
806D93C0 3CC0XXXX
60C6XXXX 90C30C30
60000000 00000000

NTSC-U Non-ASM
42000000 90000000
230EA800 00000000
04E52390 XXXXXXXX
E0000000 80008000

Code creators: Seedonator & Vega

Source for ASM version~
#START ASSEMBLY

#Address Port
#NTSC-U = 0x80191E28

#r0, r6 thru r12, and CTR is safe
#LR is NOT safe

#Default Instruction, r3 will point to start of Data Save
lwz r3, -0x6C40 (r13)

#Set Music Slot Unlocks
lis r6, 0x00FF
ori r6, r6, 0xFFFF

#Write to Memory
stw r6, 0x0C30 (r3)


RE: DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots - Seedonator - 06-19-2023

Just tested both codes with FFFFFFFF and although it didn't cause data corruption, didn't seem to have any effect even after trying the load save data option, exiting the menu and even restarting the game. Btw I've been writing down the bit values and stuff already for all the songs, just finished a few minutes ago. I'm going to make a very big reply following this one explaining the entire process and how this mod works.

edit: to clarify, the save file did update after I saved the game and the B changed to an F so I know the code is working


RE: DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots - Vega - 06-19-2023

Ye I should have mentioned that the ASM version requires to save the game before the code takes effect.

Anyway, looking forward to your reply.


RE: DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots - Seedonator - 06-19-2023

Alright here we go. First off huge credit to ViveTheModder for figuring out all this stuff for the PS2 version and then assisting me in porting it to Wii.

So as you know, BT3 stores its data inside of .AFS files in the iso. The 2 most important ones are wzs3us1.afs and wzs3us2.afs which contain basically everything a modder will care about afaik. The modding community has made AFL files to name everything inside there so we actually understand what we're modifiying. wzs3us2.afs is exclusively .ADX sound files for voice lines, ambience/sfx and music. wzs3us1.afs contains what the modding community calls .PAK's which inside them have various different things (also including sound effects for anything not found in wzs3us2, I don't know what the actual codec is or how to rip them). Now the important PAKs for this mod are the ones labelled Options_US.pak, Versus_US.pak and Ultimate_Training.pak. This is because these are the 3 game modes/menus which allow you to select custom music in a scroll box. There's a tool out there called Sparking Studio (probably very difficult to find without going to an actual modding server or something) which I used to unpack these files. For now let's just focus on Options_US.pak since if we can get the mod to work there, then it'll take 3 seconds to get it working on the other 2 modes.

Inside of Options_US.pak, theres a bunch of stuff for the menu however only 3 of the files are relevant for this mod:
03_songs_names_active.dbt
04_songs_names_inactive.dbt
36_songs_order.dat

The DBT files are basically the image container files that have the textures for the song text, for both selected and deselected states.
songs_order.dat is what links this song selection menu to wzs3us2.afs (where majority of the sounds are in the iso)
The way this mod works is by utilising the unused ADX files inside of the game.
All the relevant hex values for said files were found by Vive, and I double checked to make sure they line up correctly on the Wii version.
Code:
0x14 - zs3_20_US - Custom Track 1
0x15 - zs3_21_US - Custom Track 2
0x16 - zs3_22_US - Custom Track 3
0x17 - zs3_23_US - Custom Track 4

0x18 is used for Random (the option is omitted from the BGM Test Menu regardless, however appears in Ultimate Training and Versus)
0x19 is reserved for the Locked slot itself, however if you import a song here it is possible to use it in a specific menu or story scenario but you wont be able to select it ingame as battle music

0x1A - zs3_26_US - Custom Track 5
0x1B - zs3_27_US - Custom Track 6
0x1C - zs3_28_US - Custom Track 7
0x1D - zs3_29_US - Custom Track 8


151 ADX files in between (Announcer voice lines for JP and EN, Map SE and first 4 jingles starting from Jingle_0)


0xB5 - Jingle_04 - Custom Track 9 [Currently Locked]

2 more used Jingles

0xB8 - Jingle_07 - Custom Track 10 [Currently Locked]
0xB9 - Jingle_08 - Custom Track 11 [Currently Locked]
0xBA - Jingle_09 - Custom Track 12 [Currently Locked]
0xBB - Jingle_10 - Custom Track 13 [Currently Locked]

2 more used Jingles

0xBE - Jingle_13 - Custom Track 14 [Currently Locked]
0xBF - Jingle_14 - Custom Track 15 [Currently Locked]
0xC0 - Jingle_15 - Custom Track 16
0xC1 - Jingle_16 - Custom Track 17
0xC2 - Jingle_17 - Custom Track 18
0xC3 - Jingle_18 - Custom Track 19
0xC4 - Jingle_19 - Custom Track 20


7 "Menu Sound Effects" in between (they are actually ambience in the menu locations plus the music used in sim dragon minigames)


0xCC - MnuSe_07 - Custom Track 21
0xCD - MnuSe_08 - Custom Track 22
0xCE - MnuSe_09 - Custom Track 23
0xCF - MnuSe_10 - Custom Track 24
0xD0 - MnuSe_11 - Custom Track 25
0xD1 - MnuSe_12 - Custom Track 26
0xD2 - MnuSe_13 - Custom Track 27
0xD3 - MnuSe_14 - Custom Track 28
0xD4 - MnuSe_15 - Custom Track 29
0xD5 - MnuSe_16 - Custom Track 30
0xD6 - MnuSe_17 - Custom Track 31
0xD7 - MnuSe_18 - Custom Track 32
0xD8 - MnuSe_19 - Custom Track 33
0xD9 - MnuSe_20 - Custom Track 34
0xDA - MnuSe_21 - Custom Track 35
0xDB - MnuSe_22 - Custom Track 36
0xDC - MnuSe_23 - Custom Track 37
0xDD - MnuSe_24 - Custom Track 38
0xDE - MnuSe_25 - Custom Track 39
0xDF - MnuSe_26 - Custom Track 40
0xE0 - MnuSe_27 - Custom Track 41 [Currently Locked]
0xE1 - MnuSe_28 - Custom Track 42 [Currently Locked]
0xE2 - MnuSe_29 - Custom Track 43 [Currently Locked]

The hex values provided here can be used inside of the songs_order.dat like so:
[Image: image.png]
The first byte here (44) is to determine the total amount of songs in this menu so you can scroll to them, 44 will allow you to go all the way to the bottom and make the maximum usage out of the available slots. The final byte (18) represents the random slot as stated above, this must always be at the end of the file. The rest you can play around with the order afaik and it doesn't really matter, here they're listed in what order they'll show up inside of the AFS itself.

Now if you just edit the songs_order.dat and then reimport the pack and load up the BGM Test menu, you will get a panic handler error cause the game will try to load the DBT files which do not contain textures for the new song ids. Now you can just turn the panic handler warnings off in Dolphin settings and functionally this will work and just show yellow rectangles instead of text. The PAK that I provided in my first reply though contains custom DBTs for this mod to avoid this issue entirely, however making these is a whole new mission I don't really want to explain here unless someone actually needs to know.

So anyway we have all the available slots showing up inside the BGM Test menu, and if we import our own ADX files respectively over the correct files then we can get them to play in game perfectly fine (at 48000hz as well instead of the usual 24000hz which is awesome). However here comes the problem I'm stuck at: Budokai Tenkaichi 3 has a left over locked music slot feature from Sparking! Meteor which results in all the additional music slots being locked. The code that Vega posted here should be able to unlock majority of them except for 10 as listed above.

Honestly though +33 tracks is still pretty awesome but it's not enough for my mod since I'll be including several tracks from other Dragon Ball games that I love which I showed in the demo video in the original post.


RE: DBZ Budokai Tenkaichi 3 NTSC Unlocking hidden music slots - Seedonator - 07-10-2023

Thought I'd test something out, didn't get any useful results so far but:
I added a bunch of new .adx files to the end of wzs3us2.afs using AFSPacker and edited the songs_order.dat to contain the new entries. After checking ingame it seems as though these new entries actually showed up but they're all locked. I'm not actually sure if these locked songs are the ones I added or if its just random sounds or blank since I can't play them back, however if they actually are the new .adx files then that means you could theoretically add as many songs to the game as you'd like and not just be limited to 43 which is pretty awesome. But yeah it looks like the only way around this hurdle is to actually find out how to unlock these slots