The sound controller has 16 channels with configurable replay frequencies, and volume envelope generators. Each channel has two 22-bit pointers to a sample in RAM or ROM, one used for the initial sound trigger and the second used as a loop point. Samples can be either 8-bit or 16-bit unsigned PCM, or Dialogic/OKI ADPCM (VOX). ====== Channels controls ====== ^ Address ^ Function ^ | 30x0 | Channel X sample address | | 30x1 | Channel X control (bit 14: 16M, 13-12: ToneMode, 11-6: Loop address segment, 5-0: sample address segment) | | 30x2 | Channel X loop address | | 30x3 | Channel X panning and volume (7 bits each) | | 30x4 | Channel X envelope target volume and increment | | 30x5 | Channel X envelope CNT and EDD (?) | | 30x6 | Channel X repeat count (bits 15-9), repeat enable (8), Envelope load (7-0) | | 30x7 | Channel X IRQ address (15-9), IRQ enable, envelope segment (6-0) | | 30x8 | Channel X envelope address | | 30x9 | Channel X wave data 0 | | 30xA | Channel X ramp down offset (15-9) and envelope address offset (8-0) | | 30xB | Channel X wave data | | 32x0 | Phase high bits (2-0) | | 32x1 | Phase accumulator high (2-0) | | 32x2 | Target phase high (2-0) | | 32x3 | Ramp down clock | | 32x4 | Phase low bits | | 32x5 | Phase accumulator low bits | | 32x6 | Target phase low bits | | 32x7 | Phase control: time step (15-13), sign (12), offset (11-0) | ====== Global controls ====== ^ Address ^ Function ^ | 3400 | Channel enable (1 bit per channel) | | 3401 | Main volume (7 bits) | | 3402 | Channel FIQ enable | | 3403 | Channel FIQ status | | 3404 | Beat base counter | | 3405 | Beat counter (13-0), IRQ enable (15) and status (14) | | 3406 | Envelope interval, channels 0-3 | | 3407 | ... channels 4-7 | | 3408 | ... channels 8-11 | | 3409 | ... channels 12-15 | | 340A | Envelope fast ramp-down | | 340B | Channel stop status (1 bit per channel) | | 340C | Zero cross enable (1 bit per channel) | | 340D | Control flags: NoInt (9), LPEn (8), HVol(7-6), SOF (5), Init (3), PCM (2) | | 340F | Channels status | | 3410 | Left mixer input | | 3411 | Right mixer input | | 3412 | Left mixer output | | 3413 | Right mixer output | | 3414 | Channel repeat enable (1 bit per channel) | | 3415 | Channel envelope mode | | 3416 | Channel tone release control | | 3417 | Channel envelope IRQ status | | 3418 | Channel pitch band enable |