WSYS: Difference between revisions
m (take casualness out) |
RavuAlHemio (talk | contribs) (document WBCT as link between WSYS and SCNE) |
||
| (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. | 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. | ||
| Line 25: | Line 25: | ||
| <center>0x10</center> || int32 || [[WSYS#WINF | WINF Pointer]] || WBINF | | <center>0x10</center> || int32 || [[WSYS#WINF | WINF Pointer]] || WBINF | ||
|- | |- | ||
| <center>0x14</center> || int32 || [[WSYS# | | <center>0x14</center> || int32 || [[WSYS#WBCT | WBCT Pointer]] || WBCT | ||
|- | |- | ||
|} | |} | ||
| 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. | ||
|- | |- | ||
|} | |||
==WBCT== | |||
WBCT is a container for pointers that point to [[WSYS#SCNE|SCNE]] objects. | |||
{| class="wikitable" | |||
|- | |||
! Offset !! Type !! Name !! Description | |||
|- | |||
| <center>0x00</center> || int32 || 0x57424354 'WBCT' || Magic | |||
|- | |||
| <center>0x04</center> || int32 || -1 || unknown | |||
|- | |||
| <center>0x08</center> || int32 || sceneCount || Count of scenes | |||
|- | |||
| <center>0x0C</center> || [[WSYS#SCNE|SCNE]]*[] (int32) || scenePointers || Pointers to the individual scenes. | |||
|- | |||
|} | |} | ||
==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 78: | ||
| <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 94: | ||
| <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 106: | ||
| <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 121: | ||
| <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 10:05, 3 July 2026
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. |
WBCT
WBCT is a container for pointers that point to SCNE objects.
| Offset | Type | Name | Description |
|---|---|---|---|
| int32 | 0x57424354 'WBCT' | Magic | |
| int32 | -1 | unknown | |
| int32 | sceneCount | Count of scenes | |
| SCNE*[] (int32) | scenePointers | Pointers to the individual scenes. |
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 |