Much like the Fast3D series microcode, the audio microcode also accepts commands in order to perform tasks on the RSP (Reality Signal Processor). As with Fast3D, each audio command is 64 bits (8 bytes) in size. There are 16 different audio commands.
Note: The segment parameters (SS
) are never used in commercial games.
00 00 00 00 00 00 00 00
Stalls the RSP. This command does nothing otherwise and should only be used for debugging.
01 FF GGGG SS AAAAAA
This command produces 16-bit samples from a binary stream. The flag byte accepts the arguments listed later below that control its behavior, the gain bytes controls the volume of the samples, the segment and address bytes control where to read the samples in DRAM.
This command accepts two flags that control its behavior, these flags are listed in the table below:
A_INIT (0x01 ) | The seg+address field field is used to restore state at the beginning of the command. If not set the pointer to state is ignored upon initiation, however, state is saved to this address at the end of processing. |
A_MIX (0x10 ) | The results are mixed into the output buffer. If not set results are put into the output buffer. |
02 00 DDDD 0000 CCCC
Clears the area the size of CCCC starting at the DMEM address given by DDDD.
04 000000 SS AAAAAA
Loads a DMEM buffer from RDRAM starting at SS AAAAAA. The buffer location in DMEM and amount of samples to load depends on what is set by the A_SETBUFF
command before this command.
05 FF PPPP SS AAAAAA
This command allows for pitch shifting/resampling samples set by the A_SETBUFF
command. The FF byte accepts two inputs listed below that control its behavior, the PPPP bytes control how much to pitch shift/resample the samples by, and the SS AAAAAA bytes control where to read in RDRAM.
This command accepts two flags that control its behavior, these flags are listed in the table below:
A_INIT (0x01 ) | The seg+address field field is used to restore state at the beginning of the command. If not set the pointer to state is ignored upon initiation, however, state is saved to this address at the end of processing. |
A_MIX (0x10 ) | The results are mixed into the output buffer. If not set results are put into the output buffer. |