BAMTA (File Format)

From Wexos's Wiki
(Redirected from BAMTA)
Jump to navigationJump to search

BAMTA (Binary Audio MeTA data), also known as BAMETA is a file format used on Wii U games like Super Mario Maker and Nintendo Switch games like Mario Kart 8 Deluxe and The Legend of Zelda: Breath of the Wild, normally included into BARS files. It contains audio information.

File Format

Header

The file starts with a header that is 0x1C bytes long.

Offset Type Description
0x00 Char[4] File magic. Always AMTA in ASCII.
0x04 UInt16 Byte-order-mark. FE FF for big endian, FF FE for little endian.
0x06 UInt16 Version number.
0x08 UInt32 File size in bytes.
0x0C UInt32 DATA offset.
0x10 UInt32 MARK offset.
0x14 UInt32 EXT_ offset.
0x18 UInt32 STRG offset.

DATA

This section contains audio parameters, as well as stream information for BFSTP files.

Offset Type Description
0x00 Char[4] Section magic. Always DATA in ASCII.
0x04 UInt32 Section size in bytes.
0x08 UInt32 Sound name offset.
0x0C UInt32 Unknown. Only seen as 0.
0x10 Byte Audio type: 0 = wave, 1 = prefetch stream.
0x11 Byte Number of channels.
0x12 Byte Number of used stream informations.
0x13 Byte Flag: xxAx xBCC.
  • A: File type. 0 = BFWAV/BFSTP, 1 = BWAV
  • B: Loop flag.
  • C: Unknown. Always 2 for stream, 3 for prefetch stream.
0x14 Float Volume.
0x18 UInt32 Sample rate in hertzs.
0x1C UInt32 Loop start in frames.
0x20 UInt32 Loop end in frames.
0x24 Float Loudness.
0x28 Stream Information Stream information 1.
0x30 Stream Information Stream information 2.
0x38 Stream Information Stream information 3.
0x40 Stream Information Stream information 4.
0x48 Stream Information Stream information 5.
0x50 Stream Information Stream information 6.
0x58 Stream Information Stream information 7.
0x60 Stream Information Stream information 8.
0x68 Float Amplitude peak value.

Stream Information

Stream information is only used by the game if the metadata points to a BFSTP file, although it's always present.

Offset Type Description
0x00 Int32 Stream channel count.
0x04 Float Stream influence.

MARK

This section contains unknown data.

Offset Type Description
0x00 Char[4] Section magic. Always MARK in ASCII.
0x04 UInt32 Section size in bytes.
0x08 Int32 Number of entries.

MARK Entry

Offset Type Description
0x00 UInt32 Entry index.
0x04 UInt32 Entry name offset.
0x08 UInt32 Entry value.
0x0C UInt32 Unknown, probably padding. Only seen as 0.

EXT_

This section contains unknown data.

Offset Type Description
0x00 Char[4] Section magic. Always EXT_ in ASCII.
0x04 UInt32 Section size in bytes.
0x08 Int32 Number of entries.

EXT_ Entry

Offset Type Description
0x00 UInt32 String offset.
0x04 UInt32 Unknown.

STRG

This section contains null-terminated strings which are linked by other sections.

Offset Type Description
0x00 Char[4] Section magic. Always STRG in ASCII.
0x04 UInt32 Section size in bytes.

Null-terminated strings follow the section header. The strings are linked by a section using an offset, which is relative to the end of the STRG header.

Version List

Version Found in
1.0
4.0
5.0

Tools

The following tools can handle BAMTA files:

  • (none)