Command 0x1F: Set echo delay
Sets the echo delay and allocates the echo buffer.
Syntax
0x1F, byte delay
Parameters
| Parameter | Type | Contents |
|---|---|---|
| delay | byte | Echo delay setting. The DSP EDL is set to 1/2 of this value |
Remarks
After setting the DSP FLG register to $20 (echo write disabled), sets EDL to delay / 2 and ESA to $FF - delay × 4, and zero-clears the echo buffer (ESA×$100 - $FEFF). The ESA value is also saved to $04B7.
The echo buffer is placed so that it ends at $FEFF; the larger delay is, the more space it uses from the top of APU RAM (delay × 1KB).
To make the echo sound, you must execute command 0x15 after this command to allow echo writes.
This command takes no time to process, and the following event is read within the same tick.
Note
- Driver processing stops until the echo buffer has been zero-cleared.
- Since $20 is written to the FLG register, the noise clock becomes 0.
- delay must be chosen so that the echo buffer does not overlap the sample data area.
- If an odd number is specified for delay, 1KB more than the amount used by the echo is allocated.