User Tools

Site Tools


abi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
abi [2019/02/11 13:56]
Redetzky [00: A_SPNOOP]
abi [2019/02/13 19:56] (current)
Redetzky [01: A_ADPCM] fix typo
Line 3: Line 3:
 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. 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 ===== ===== Audio Commands =====
  
 ==== 00: A_SPNOOP ==== ==== 00: A_SPNOOP ====
  
-``00 00 00 00 00 00 00 00``+''​00 00 00 00 00 00 00 00''​
  
 Stalls the RSP. This command does nothing otherwise and should only be used for debugging. Stalls the RSP. This command does nothing otherwise and should only be used for debugging.
-==== 01: A_SPNOOP ​====+==== 01: A_ADPCM ​==== 
 + 
 +''​01 <color #​22b14c>​FF</​color>​ <color #​ed1c24>​GGGG</​color>​ <color #​A946F2>​SS</​color>​ <color #​ff7f27>​AAAAAA</​color>''​ 
 + 
 +This command produces 16-bit samples from a binary stream. The <color #​22b14c>​flag</​color>​ byte accepts the arguments listed later below that control its behavior, the <color #​ed1c24>​gain</​color>​ bytes controls the volume of the samples, the <color #​A946F2>​segment</​color>​ and <color #​ff7f27>​address</​color>​ 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: 
 + 
 +| <color #​22b14c>​A_INIT (''​0x01''​)</​color>​ | The <color #​A946F2>​seg</​color>​+<​color #​ff7f27>​address</​color>​ 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. | 
 +| <color #​22b14c>​A_MIX (''​0x10''​)</​color>​ | The results are mixed into the output buffer. If not set results are put into the output buffer. |
 ==== 02: A_CLEARBUFF ==== ==== 02: A_CLEARBUFF ====
 +
 +''​02 00 <color #​22b14c>​DDDD</​color>​ 0000 <color #​ed1c24>​CCCC</​color>''​
 +
 +Clears the area the size of <color #​ed1c24>​CCCC</​color>​ starting at the DMEM address given by <color #​22b14c>​DDDD</​color>​.
 ==== 03: A_ENVMIXER ==== ==== 03: A_ENVMIXER ====
 ==== 04: A_LOADBUFF ==== ==== 04: A_LOADBUFF ====
 +
 +''​04 000000 <color #​22b14c>​SS</​color>​ <color #​ed1c24>​AAAAAA</​color>''​
 +
 +Loads a DMEM buffer from RDRAM starting at <color #​22b14c>​SS</​color>​ <color #​ed1c24>​AAAAAA</​color>​. 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: A_RESAMPLE ====
 +
 +''​05 <color #​22b14c>​FF</​color>​ <color #​ed1c24>​PPPP</​color>​ <color #​A946F2>​SS</​color>​ <color #​ff7f27>​AAAAAA</​color>''​
 +
 +This command allows for pitch shifting/​resampling samples set by the ''​A_SETBUFF''​ command. The <color #​22b14c>​FF</​color>​ byte accepts two inputs listed below that control its behavior, the <color #​ed1c24>​PPPP</​color>​ bytes control how much to pitch shift/​resample the samples by, and the <color #​A946F2>​SS</​color>​ <color #​ff7f27>​AAAAAA</​color>​ bytes control where to read in RDRAM.
 +
 +This command accepts two flags that control its behavior, these flags are listed in the table below:
 +
 +| <color #​22b14c>​A_INIT (''​0x01''​)</​color>​ | The <color #​A946F2>​seg</​color>​+<​color #​ff7f27>​address</​color>​ 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. |
 +| <color #​22b14c>​A_MIX (''​0x10''​)</​color>​ | The results are mixed into the output buffer. If not set results are put into the output buffer. |
 ==== 06: A_SAVEBUFF ==== ==== 06: A_SAVEBUFF ====
 ==== 07: A_SEGMENT ==== ==== 07: A_SEGMENT ====
abi.1549893380.txt.gz · Last modified: 2019/02/11 13:56 by Redetzky