User Tools

Site Tools


abi

Audio Binary Interface Commands

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.

Audio Commands

00: A_SPNOOP

00 00 00 00 00 00 00 00

Stalls the RSP. This command does nothing otherwise and should only be used for debugging.

01: A_ADPCM

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: A_CLEARBUFF

02 00 DDDD 0000 CCCC

Clears the area the size of CCCC starting at the DMEM address given by DDDD.

03: A_ENVMIXER

04: A_LOADBUFF

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: A_RESAMPLE

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.

06: A_SAVEBUFF

07: A_SEGMENT

08: A_SETBUFF

09: A_SETVOL

0A: A_DMEMMOVE

0B: A_LOADADPCM

0C: A_MIXER

0D: A_INTERLEAVE

0F: A_SETLOOP

abi.txt · Last modified: 2019/02/13 19:56 by Redetzky