ROM Hack Kingdom Hearts Dream Drop Distance BCSAR Tool

Some1fromthedark

Member
OP
Newcomer
Joined
May 27, 2017
Messages
7
Trophies
0
Age
30
Location
California
Website
bitbucket.org
XP
94
Country
United States
Hello Everyone,

This is my first post here on GBATemp, and I would like to kick it off with a bang by showing off a tool that I made.
This tool is a .bcsar extractor and rebuilder allowing you to extract files from a .bcsar file as well as rebuild a new .bcsar from modified files.

The tool is open source, and the code is available at my bitbucket account: https://bitbucket.org/Some1fromthedark/kh_ddd_bcsar_tool

Version 1.0.0 is currently available there, and in the Release folder there is a .exe that has already been compiled if you don't wish to compile the code yourself.

I also created a Youtube video demonstrating how to use the tool, as well as showcasing a proof of concept where I replaced Sora's blizzard sound effect in DDD with the one he has in Kingdom Hearts 1:

Disclaimer: This tool was specifically developed for Kingdom Hearts DDD, and I offer no guarantee that it will work on bcsar files from other games. If you are having issues with files from other games, you can post about the problems you are encountering, and I may or may not update the tool in the future to support other games.
 

Slattz

Easygoing Fairy
Member
Joined
Nov 21, 2015
Messages
1,259
Trophies
1
XP
1,787
Country
Ireland
This is pretty awesome!
@Jouzai & @Stjinchan , this works with ACNL, you could start changing the smaller sounds now in your packs! :)
Ayy! Will take a look at it when I have time
I just took a look at the bcwavs in foobar (vgmstream extension) it seems KK songs are broken up into pieces :/ And really small piece, the pitch for each bcwav doesn't change or anything. So the game must stitch them together :(
 
  • Like
Reactions: FlappyFalco

Some1fromthedark

Member
OP
Newcomer
Joined
May 27, 2017
Messages
7
Trophies
0
Age
30
Location
California
Website
bitbucket.org
XP
94
Country
United States
This changes sound affects?

Yes, this tool allows you to extract the sounds from the somnium.bcsar file. If you replace the .bcwav files it extracts with your own custom sounds, and them rebuild the .bcsar as shown in the tutorial, then you can change the sounds in the game.
 
  • Like
Reactions: DeoNaught

pgaFZTGBSp

Member
Newcomer
Joined
Apr 15, 2017
Messages
19
Trophies
0
Age
31
Location
Awake when nobody else is.
XP
49
Country
Belgium
If the BCWAV I'd like to use to replace a sound is bigger in size than the original BCWAV, am I just stuck or is there something I may be able to do?

EDIT

I think I have an inkling on the sort of process it would be. I'm replacing a whole bunch of voices for a character, and luckily the final size of the replaced files is less than the original size.

I can pad the last file in the group to match the original size of the files, but the pointers would be wrong for every other voice file in the group. I would have to go around and change the pointers myself individually.

Any input on this would be great.
 
Last edited by pgaFZTGBSp,

Some1fromthedark

Member
OP
Newcomer
Joined
May 27, 2017
Messages
7
Trophies
0
Age
30
Location
California
Website
bitbucket.org
XP
94
Country
United States
If the BCWAV I'd like to use to replace a sound is bigger in size than the original BCWAV, am I just stuck or is there something I may be able to do?

EDIT

I think I have an inkling on the sort of process it would be. I'm replacing a whole bunch of voices for a character, and luckily the final size of the replaced files is less than the original size.

I can pad the last file in the group to match the original size of the files, but the pointers would be wrong for every other voice file in the group. I would have to go around and change the pointers myself individually.

Any input on this would be great.

When combining the BCWAV files into a BCWAR file, the tool already corrects the pointers for you. In my limited testing that I did before I released the tool, I found that even with the corrected pointers, if the file sizes of the BCWAV files was changed KH DDD would not run correctly. I have not yet determined the cause of this issue, but in future updates to the tool I hope to support all file sizes.


The first number is the value of the length field in the .bcsar header, the second value is the actual length of the .bcsar file. As you can see there is a discrepancy. Without knowing more details, I can only give you ideas for what the problem might be. Are you sure the .bcsar file was extracted properly? It might be missing the second half of the file.
 

dahacker2017

Well-Known Member
Member
Joined
Jun 1, 2016
Messages
171
Trophies
0
XP
145
Country
United States
When combining the BCWAV files into a BCWAR file, the tool already corrects the pointers for you. In my limited testing that I did before I released the tool, I found that even with the corrected pointers, if the file sizes of the BCWAV files was changed KH DDD would not run correctly. I have not yet determined the cause of this issue, but in future updates to the tool I hope to support all file sizes.



The first number is the value of the length field in the .bcsar header, the second value is the actual length of the .bcsar file. As you can see there is a discrepancy. Without knowing more details, I can only give you ideas for what the problem might be. Are you sure the .bcsar file was extracted properly? It might be missing the second half of the file.
yes it was brain dumped and romfsed

--------------------- MERGED ---------------------------

pm me for more
 

DeathChaos

Unmei wo koeru!
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
28
XP
1,724
Country
Puerto Rico
So I tried using this with the Ultra Moon bcsar file, and this was the result;
QIqPt3o.png


Which is odd considering it DOES say FILE on the BCSAR, multiple times, this is just an example of one of them;
swmQUae.png


Any ideas what this could be?
 

Some1fromthedark

Member
OP
Newcomer
Joined
May 27, 2017
Messages
7
Trophies
0
Age
30
Location
California
Website
bitbucket.org
XP
94
Country
United States
Any ideas what this could be?

The screenshot of the hex is in fact the exact file identifier the program is complaining about.
You can tell, because the name of the file it mentions: 0000645696.file. When converted to hex, it is 0009DA40, the offset shown in your screenshot.
As you pointed out, the file identifier is actually correct. The tool seems to be incorrectly parsing Ultra Moon's bcsar file.
I will look into this a bit and provide an update if I learn any more information.

EDIT: I think we must be using two different versions of Ultra Moon, since I was able to successfully extract the somnium.bcsar
If you upload the bcsar file you are using somewhere and send me a link to it, I would be happy to try it out for you.
 
Last edited by Some1fromthedark,

Some1fromthedark

Member
OP
Newcomer
Joined
May 27, 2017
Messages
7
Trophies
0
Age
30
Location
California
Website
bitbucket.org
XP
94
Country
United States
I wouldn't rule out a faulty dump, I'll redump again just in case.

I think I know what's going on, and it doesn't seem to be your fault, so you shouldn't have to redump.
Your bcsar says it contains 3 files in its header, but the STRG file that is claims to have isn't there and the offset and file length fields are 0xFFFFFFFF
I'm making a quick fix now and will push v1.0.1 as soon as I verify my fix works. When I get some more free time, I'll implement a more robust fix in case it happens in any of the other containers as well.
 

Some1fromthedark

Member
OP
Newcomer
Joined
May 27, 2017
Messages
7
Trophies
0
Age
30
Location
California
Website
bitbucket.org
XP
94
Country
United States
Ah I see, thanks for letting me know!

No problem, I just pushed the updates to Bitbucket. I may have spoke prematurely about there not being a problem though. The tool now extracts the files fine, but when I attempted to convert one of the bcwav files to a wav, YATA+ failed. I also find it a bit odd that the bcsar you sent me is about 1/10th of the size of the one I extracted from Ultra Moon.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: Hello @realtimesave.