Showing changes from revision #1 to #2:
Added | Removed | Changed
The GateOn entry is used whenever a sound command is issued that requires a new envelope. Normally any previous synthesis is aborted and the algorithm restarted.
Entry | |
---|---|
R0 | Pointer to Voice Generator |
R4 | Flag byte |
R6 | Negative if Channel Handler configuration has changed |
R7 | Channel number (0-7) |
R8 | Sample period in µS |
R9 | Pointer to Sound Channel Control Block |
R10 | Buffer end address for this channel (exclusive) |
R11 | Interleave increment (1, 2, 4 or 8) |
R12 | Buffer start address for this channel (inclusive) |
Exit | |
---|---|
R0 | Flag byte |
On exit the A bit (bit 3) must be set.
The Voice Generator is entered in IRQ mode with IRQs enabled, they must remain enabled to ensure that system devices do not have a lengthy wait to be serviced. The code for a Voice Generator must therefore be re-entrant, and R14 must not be used as a subroutine link register, since an interrupt will corrupt it. Sufficient IRQ stack depth must be maintained for system IRQ handling. You can enter SVC mode if you wish.
To return to the Channel Handler use LDR PC,[R13],#4
The buffer length is a multiple of 4 words (16 bytes) long, and word aligned and the interleave is dependent on the number of channels.