[RELEASE] BARS extractor for BOTW (also, a new unknown music format?)

Discussion in 'Wii U - Hacking & Backup Loaders' started by SamusAranX, May 31, 2017.

  1. SamusAranX
    OP

    SamusAranX Member

    Newcomer
    18
    9
    Apr 27, 2014
    Germany
    Since the only extractor for BOTW's .bars files I could find on this forum was Windows-only and I'm not a huge fan of that, I spent the last night reverse-engineering the BARS format used in BOTW and wrote a cross-platform extractor myself: https://gist.github.com/SamusAranX/6eb8b6fd1777b17afc3107a979c2409a
    I subsequently posted it here: http://gbatemp.net/threads/tutorial...reath-of-the-wild.463642/page-24#post-7357406, but created this new thread so it could get more eyes on it. Hope that's okay.

    While sifting through the data, I noticed there was another format with "FSTP" headers in the .bars files, and so far, it seems as if there's no converter for these yet. As I wrote in the information section below, I think they're 4 bit mono ADPCM files at 32000 Hz, but Audacity doesn't support importing that.
    bars_extractor.py will extract these as .bfstp files so they can be converted when someone comes up with a converter.

    If you want to have a crack at it, but lack the necessary files, try these:
    MusicianThemeBgm_Event_BGM_MusicianThemeE.bfstp (with all headers and information)
    MusicianThemeBgm_Event_BGM_MusicianThemeE.raw (headers and information stripped)
    MusicianThemeBgm_Event_BGM_MusicianThemeE.wav (VERY LOUD! The above, imported into Audacity and exported to WAV)
    As you can hear, there's definitely music in there, I just can't decode it into a proper format because I lack the tools.

    Usage information and examples can be found on the Gist's page, but I'll copy the gist of it (heh) so you can read it here.

     
    Last edited by SamusAranX, Jun 1, 2017
  2. Pokezuculento

    Pokezuculento GBAtemp Regular

    Member
    134
    30
    Jul 4, 2016
  3. AboodXD

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,694
    1,412
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    Hm... I thought BARs were SARC archives?

    Edit: all I can say that those FSTP files are veeery similar to FSTM.

    Since Foobar2000/vgmstream doesn't support this format, I might write a converter to BFSTM.
     
    Last edited by AboodXD, Jun 11, 2017
  4. AboodXD

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,694
    1,412
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    AHHHH.
    I almost got it...

     
    FlappyFalco likes this.
  5. AyanamiRei0

    AyanamiRei0 GBATemp's Resident Evangelion fanboy.

    Member
    GBAtemp Patron
    AyanamiRei0 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    1,256
    1,035
    Jan 4, 2016
    United Kingdom
    England I guess
    Would this tool also work with other formats?
     
  6. AboodXD

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,694
    1,412
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    I honestly don't think so... :(

    I already wrote a BFWAV to BFSTM tool, but it wasn't that great... :/

    Anyway, regarding BFSTP, it's the same as BFSTM, with some slight changes.

    For instance, "DATA" header has been renamed to "PDAT" and a few changes have been made to it... ._.
     
    Last edited by AboodXD, Jun 1, 2017
  7. SamusAranX
    OP

    SamusAranX Member

    Newcomer
    18
    9
    Apr 27, 2014
    Germany
  8. AboodXD

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,694
    1,412
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
  9. AboodXD

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,694
    1,412
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    I'm not sure about the 4 bit part, but they are definitely not mono.
     
  10. SamusAranX
    OP

    SamusAranX Member

    Newcomer
    18
    9
    Apr 27, 2014
    Germany
    Shows what I know about figuring out weird audio formats. :D
    I just assumed it would be 4 bits, based on the fact that all other audio files were as well.