WSYS: Difference between revisions
(correct wsys juice) |
(fixed link to AW page) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 3: | Line 3: | ||
Internally, Wave System. | Internally, Wave System. | ||
This section contains all of the information required for decoding the [[ | This section contains all of the information required for decoding the [[AW_(File_Format)|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__ | ||
| Line 32: | Line 32: | ||
The ID's for every wave group are controlled by the [[WSYS#SCNE|SCNE]] object. They line up, WaveGroup[1] uses WaveScenes[1] | The ID's for every wave group are controlled by the [[WSYS#SCNE|SCNE]] object. They line up, WaveGroup[1] uses WaveScenes[1] | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 44: | Line 43: | ||
| <center>0x08</center> || [[WSYS#WaveGroup|WaveGroup]]*[] (int32) || waveGroupPointers || Pointers to the individual wavegroups. | | <center>0x08</center> || [[WSYS#WaveGroup|WaveGroup]]*[] (int32) || waveGroupPointers || Pointers to the individual wavegroups. | ||
|- | |- | ||
|} | |} | ||
==SCNE== | ==SCNE== | ||
SCNE is a pointer container as well. They point to the [[WSYS#C-DF|C-DF]] objects. | SCNE is a pointer container as well. They point to the [[WSYS#C-DF|C-DF]] objects. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 66: | Line 62: | ||
| <center>0x14</center> || int32 || [[WSYS#C-DF|C-DF]]* || Pointer to C-ST | | <center>0x14</center> || int32 || [[WSYS#C-DF|C-DF]]* || Pointer to C-ST | ||
|- | |- | ||
|} | |} | ||
| Line 83: | Line 78: | ||
| <center>0x08</center> || int32 || [[WSYS#WAVEID|WAVEID]]*[] || Pointer array waveID's | | <center>0x08</center> || int32 || [[WSYS#WAVEID|WAVEID]]*[] || Pointer array waveID's | ||
|- | |- | ||
|} | |} | ||
==WAVEID== | ==WAVEID== | ||
| Line 98: | Line 90: | ||
| <center>0x02</center> || int16 || waveID || The ID assigned from this wave | | <center>0x02</center> || int16 || waveID || The ID assigned from this wave | ||
|- | |- | ||
|} | |} | ||
==WaveGroup== | ==WaveGroup== | ||
SCNE is a pointer container as well. They point to the [[WSYS#C-DF|C-DF]] objects. | SCNE is a pointer container as well. They point to the [[WSYS#C-DF|C-DF]] objects. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 117: | Line 105: | ||
| <center>0x74</center> || int32 || [[WSYS#WAVE|WAVE]]*[] || Pointer array of Waves | | <center>0x74</center> || int32 || [[WSYS#WAVE|WAVE]]*[] || Pointer array of Waves | ||
|- | |- | ||
|} | |} | ||
==WAVE== | ==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. | 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. | ||
{| class="wikitable" | {| class="wikitable" | ||
Latest revision as of 08:40, 10 November 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 |