WSYS: Difference between revisions
(correct wsys juice) |
m (take casualness out) |
||
Line 5: | Line 5: | ||
This section contains all of the information required for decoding the [[AW|AW File]] as well as other information for melodic tuning, root key, and other various parts of JAudio. | This section contains all of the information required for decoding the [[AW|AW File]] as well as other information for melodic tuning, root key, and other various parts of JAudio. | ||
WSYS format is consistent between engine versions, however some games do not make use of the waveCount bytes. If the wavecount int32 is missing in anything newer than twilight princess, the WSYS will not function correctly. | |||
__TOC__ | __TOC__ |
Latest revision as of 06:15, 29 May 2025
WSYS Wave System
Internally, Wave System.
This section contains all of the information required for decoding the AW File as well as other information for melodic tuning, root key, and other various parts of JAudio.
WSYS format is consistent between engine versions, however some games do not make use of the waveCount bytes. If the wavecount int32 is missing in anything newer than twilight princess, the WSYS will not function correctly.
WSYS Structure
Offset | Type | Name | Description |
---|---|---|---|
int32 | 0x57535953 'WSYS' | Magic | |
int32 | size | WSYS Size | |
int32 | wsysID | WSYS ID (This is how insts select the wsys) | |
int32 | waveCount | WSYS Wave Count | |
int32 | WINF Pointer | WBINF | |
int32 | WBCT Pointer | WBCT |
WINF
WINF is a pointer container. They point to the Wave Groups.
The ID's for every wave group are controlled by the SCNE object. They line up, WaveGroup[1] uses WaveScenes[1]
Offset | Type | Name | Description |
---|---|---|---|
int32 | 0x57494E46 'WINF' | Magic | |
int32 | waveGroupCount | Count of wavegroups | |
WaveGroup*[] (int32) | waveGroupPointers | Pointers to the individual wavegroups. |
SCNE
SCNE is a pointer container as well. They point to the C-DF objects.
Offset | Type | Name | Description |
---|---|---|---|
int32 | 0x53434E45 'SCNE' | Magic | |
int64 | padding | padding | |
int32 | C-DF* | Pointer to C-DF | |
int32 | C-DF* | Pointer to C-EX | |
int32 | C-DF* | Pointer to C-ST |
Scene Waves
Note: The other sections C-ST, and C-EX point to to this category as well. They remain empty. Code for parsing them isn't even in the executables.
Offset | Type | Name | Description |
---|---|---|---|
int32 | 0x432D4446 ('C-DF') | Magic | |
int32 | wavesCount | Wave Count | |
int32 | WAVEID*[] | Pointer array waveID's |
WAVEID
Offset | Type | Name | Description |
---|---|---|---|
int16 | waveGroupID | Wave Group ID (Current WSYS) | |
int16 | waveID | The ID assigned from this wave |
WaveGroup
SCNE is a pointer container as well. They point to the C-DF objects.
Offset | Type | Name | Description |
---|---|---|---|
char[0x70] | archiveName | File Path for .AW | |
int32 | wavesCount | Wave Count | |
int32 | WAVE*[] | Pointer array of Waves |
WAVE
Container format for Wave Information. This tells you where the ADPCM / PCM / whatever data starts inside of the .AW file for the current group and for what wave.
Offset | Type | Name | Description |
---|---|---|---|
byte | 0x00 | unknown | |
byte | format | WaveFormat | |
byte | baseKey | Base Key | |
byte | 0x00 | unknown | |
float | sampleRate | Sample Rate | |
int32 | awOfsStart | AW Offset Start | |
int32 | awOfsEnd | AW Length | |
int32(bool) | loop | Loop flags? | |
int32 | loopStartSample | Loop Start Sample | |
int32 | loopEndSample | Loop End Sample | |
int32 | sampleCount | Samples Count | |
short | pLast | ADPCM Loop Last Sample | |
short | pPenult | ADPCM Loop Penult Sample |