BCWAV

Revision as of 15:13, 13 February 2012 by Elisherer (talk | contribs) (bcwav file...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This document is about the format of Banner's CTR Wave files (BCWAV).

The structure is very similar to Microsoft's Wave file.

Overview

Microsoft's Wave structure is RIFF Header which defines the data inside which is WAVE.

then the media player expects "fmt " chunk and a "data" chunk.

Nintendo's format uses a CWAV Header (no need for a general structure for media, only wave)

Which points to an INFO struct (the equivalent to fmt) and a DATA struct (the equivalent to data).

Header

OFFSET SIZE DESCRIPTION
0x000 4 Magic (CWAV)
0x004 2 Endianess (0xFEFF=LE / 0xFFFE=BE)
0x006 2 Struct Length
0x008 4 Unknown 0
0x00C 4 File's size
0x010 4 Number of chunks (= 2 (INFO & DATA))
0x014 4 Info Chunk Flags (0x7000)
0x018 4 Info Chunk Offset
0x01C 4 Info Chunk Length
0x020 4 Data Chunk Flags (0x7000)
0x024 4 Data Chunk Offset
0x028 4 Data Chunk Length
0x02C 0x20 Reserved (for more chunks offsets)

INFO Header

OFFSET SIZE DESCRIPTION
0x000 4 Magic (INFO)
0x004 4 Length
0x008 4 Type
0x00C 4 Sample Rate
0x010 4 Unknown 1
0x014 4 Number or samples
0x018 4 Unknown 2
0x01C 4 Channels
0x020 X The Channels' Data Pointers
X X The Channels' Data
 * The channels data pointers are pointers to another struct that points to the actual data (this stucture has flags as well)
OFFSET SIZE DESCRIPTION
0x000 4 Flags
0x004 4 Offset (from 0x5C, INFO's channels field)
 * The channels data are pointers to the actual data (this stucture has flags as well)
OFFSET SIZE DESCRIPTION
0x000 4 Flags
0x004 4 Offset (inside the DATA block data)
0x008 4 FFs (0xFFFFFFFF)
0x00C 4 Padding (Zero)


DATA Header

OFFSET SIZE DESCRIPTION
0x000 4 Magic (DATA)
0x004 4 Length