Kingdom Hearts Dream Drop Distance BCSAR Tool

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Some1fromthedark, Jun 4, 2017.

  1. Some1fromthedark
    OP

    Some1fromthedark Newbie

    Newcomer
    6
    5
    May 27, 2017
    United States
    California
    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.
     
  2. Slattz

    Slattz Easygoing Fairy

    Member
    1,181
    1,288
    Nov 21, 2015
    Ireland
    This is pretty awesome!
    @Jouzai & @Stjinchan , this works with ACNL, you could start changing the smaller sounds now in your packs! :)
     
  3. Stjinchan

    Stjinchan Member

    Newcomer
    36
    41
    Mar 12, 2016
    Netherlands
    Monte 'd Or
    Ayy! Will take a look at it when I have time
     
  4. Slattz

    Slattz Easygoing Fairy

    Member
    1,181
    1,288
    Nov 21, 2015
    Ireland
    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 :(
     
    FlappyFalco likes this.
  5. shaneod

    shaneod GBAtemp Fan

    Member
    351
    258
    Mar 3, 2011
    Works with Flipnote Studio 3D, thanks :)
     
    Last edited by shaneod, Jun 16, 2017
  6. DeoNaught

    DeoNaught ¯\_(ツ)_/¯

    Member
    1,616
    1,723
    Aug 22, 2016
    United States
    Constant Fear
    This changes sound affects?
     
  7. Some1fromthedark
    OP

    Some1fromthedark Newbie

    Newcomer
    6
    5
    May 27, 2017
    United States
    California
    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.
     
    DeoNaught likes this.
  8. Bungee_Cord

    Bungee_Cord Advanced Member

    Newcomer
    51
    11
    Apr 29, 2017
    United States
    I can finally change the item jingle in ACNL!
     
  9. Kafkakama

    Kafkakama Member

    Newcomer
    19
    2
    Apr 15, 2017
    Belgium
    Awake when nobody else is.
    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 Kafkakama, Jul 15, 2017
  10. dahacker2017

    dahacker2017 GBAtemp Regular

    Member
    171
    26
    Jun 1, 2016
    United States
  11. Some1fromthedark
    OP

    Some1fromthedark Newbie

    Newcomer
    6
    5
    May 27, 2017
    United States
    California
    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.
     
  12. dahacker2017

    dahacker2017 GBAtemp Regular

    Member
    171
    26
    Jun 1, 2016
    United States
    yes it was brain dumped and romfsed

    — Posts automatically merged - Please don't double post! —

    pm me for more
     
  13. DeathChaos25

    DeathChaos25 Unmei wo kaeru!

    Member
    1,312
    672
    Oct 21, 2015
    So I tried using this with the Ultra Moon bcsar file, and this was the result;
    [​IMG]

    Which is odd considering it DOES say FILE on the BCSAR, multiple times, this is just an example of one of them;
    [​IMG]

    Any ideas what this could be?
     
  14. Some1fromthedark
    OP

    Some1fromthedark Newbie

    Newcomer
    6
    5
    May 27, 2017
    United States
    California
    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, Dec 6, 2017
  15. DeathChaos25

    DeathChaos25 Unmei wo kaeru!

    Member
    1,312
    672
    Oct 21, 2015
  16. Some1fromthedark
    OP

    Some1fromthedark Newbie

    Newcomer
    6
    5
    May 27, 2017
    United States
    California
    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.
     
  17. DeathChaos25

    DeathChaos25 Unmei wo kaeru!

    Member
    1,312
    672
    Oct 21, 2015
    Ah I see, thanks for letting me know!
     
  18. Some1fromthedark
    OP

    Some1fromthedark Newbie

    Newcomer
    6
    5
    May 27, 2017
    United States
    California
    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.
     
  19. DeathChaos25

    DeathChaos25 Unmei wo kaeru!

    Member
    1,312
    672
    Oct 21, 2015
    Seems to work so far, and I should've specified from the start, that it's Pokemon Ultra Moon.