AGSC (File Format): Difference between revisions

>MrSinistar
>Aruki
Line 72: Line 72:
=== Pool ===
=== Pool ===


The Pool chunk denotes MusyX's '''SoundMacros''', small scripts that apply various effects on the sounds in the game. Each macro is composed of a number of pre-defined commands; each command specifies its type through a single-byte command ID, then specifies the parameters of that particular command, which vary.
The Pool chunk denotes MusyX's '''SoundMacros''', small scripts that apply various effects on the sounds in the game. Each macro is composed of a header followed by a number of commands; each command specifies its type through a single-byte command ID, then specifies the parameters of that particular command, which vary.


Each 4 bytes were originally little endian, but have been swapped to big endian in the AGSC files (despite not being longs). To read the data as originally formatted, every four bytes needs to be byte-swapped.
The header of each SoundMacro is eight bytes, and is structured as follows:
 
Each command is structured as follows:


{| class="wikitable"
{| class="wikitable"
Line 88: Line 86:
|-
|-
| 0x4
| 0x4
| 4
| 2
| '''Soundmacro ID'''
| '''Soundmacro ID'''
|-
| 0x6
| 2
| {{unknown|'''Unknown'''}}
|-
|-
| 0x8
| 0x8
| colspan=2 {{unknown|Commands begin}}
|}
On the commands, each 4 bytes were originally little endian, but have been swapped to big endian in the AGSC files (despite not being longs). To read the data as originally formatted, every four bytes needs to be byte-swapped. Each command is 8 bytes, and is structured as follows:
{| class="wikitable"
! Offset
! Size
! Description
|-
| 0x0
| 1
| 1
| '''Command ID''' (varies; there are 79 known commands in the MusyX audio engine.)
| '''Command ID''' (varies; there are 79 known commands in the MusyX audio engine.)
|-
|-
| 0x9
| 0x1
| 7
| 7
| '''Command arguments''' (varies between commands)
| '''Command arguments''' (varies between commands)
|-
|-
| 0xA
| 0x8
| colspan=2 {{unknown|End of entry}}
| colspan=2 {{unknown|End of entry}}
|}
|}
Anonymous user