The VG Resource
The Nintendo Switch .bars file structure (with a small change regarding to finding) - Printable Version

+- The VG Resource (https://www.vg-resource.com)
+-- Forum: The Resources (https://www.vg-resource.com/forum-109.html)
+--- Forum: The Sounds Resource (https://www.vg-resource.com/forum-112.html)
+---- Forum: Ripping Help (https://www.vg-resource.com/forum-116.html)
+---- Thread: The Nintendo Switch .bars file structure (with a small change regarding to finding) (/thread-37562.html)



The Nintendo Switch .bars file structure (with a small change regarding to finding) - Grasterizer - 07-22-2020

So, i decided to reverse engineer the nintendo switch .bars files here... (i feel like i'm so amateur in reverse engineering file structures  Unsure )
i use a hex editor program to see the .bars file inside

So far, here's what i got:


The structure itself consists of:

-Header. This is obvious one. It begins with BARS

-Tags? (in QWORD format), used for some sort of, "sorting" file order, (but unfortunately i cannot figure out the hex representations of each byte in a QWORD)

It actually goes like this... (this is found in Keyboard_Boy_en.bars , a keyboard sound played when typing in english keyboard, as a boy in a game animal crossing new horizons)
[Image: 064b1c1883.png]
in Keyboard_Boy_en.bars, there are 36 AMTA tags, and the picture above contains 36 QWORDs of Tags(?), matching the number of AMTA tags contained within.

Example: (first QWORD)
Code:
C0 01 00 00 80 10 00 00


-File name (Begins with AMTA tag with certain format: AMTA <code> File_name)

-BWAV contents (all begins with BWAV tag, possibly unsorted for the orders)


notes
-it seems that some .bars files contain more AMTA tag than BWAV files (possibly have more than 1 AMTA tag to use the same BWAV files? Unused AMTA tags? no idea why...)


so, anyone else have tried reverse engineering nintendo switch .bars files?


UPDATE:

looks like figured out a bit more of the file structure, and changed the image to a simpler one