DSP COMMAND LISTING =================== Note: sometimes, the DSP expects a hilo byte order, sometimes lohi. length means the number of bytes, as opposed to samples. 10h - Output sample in direct mode Send: 10h, sample byte 14h/24h - 8 bit single cycle DMA playback/recording Send: 14h/24h, lo (length-1), hi (length-1) 16h - 8/2 ADPCM single cycle DMA playback Send: 16h, lo (length-1), hi (length-1) 17h - 8/2 ADPCM single cycle DMA playback with reference byte Send: 17h, lo (length-1), hi (length-1) 1Fh - 8/2 ADPCM auto init DMA playback with reference byte [DSP 2+] Send: 1Fh 1Ch/2Ch - 8bit auto init DMA playback/recording [DSP 2+] Send: 1Ch/2Ch Note: use command 48h first 20h - Input sample in direct mode Send: 20h Read: sample byte 40h - Set sample frequency Send: 40h, time constant time constant = (65536 - (256000000/channels * sample frequency)) / 256 41h/42h - Set playback/recording frequency [DSP 4+] Send: 41h, hi (freq), lo (freq) freq in hertz, independent of bit resolution or number of channels 48h - Set block length for auto init playback [DSP 2+] Send: 48h, hi (length-1), lo (length-1) 74h - 8/4 ADPCM single cycle DMA playback Send: 74h, lo (length-1), hi (length-1) 75h - 8/4 ADPCM single cycle DMA playback with reference byte Send: 75h, lo (length-1), hi (length-1) 76h - 8/3 ADPCM single cycle DMA playback Send: 76h, lo (length-1), hi (length-1) 77h - 8/3 ADPCM single cycle DMA playback with reference byte Send: 77h, lo (length-1), hi (length-1) 7Dh - 8/4 ADPCM auto init DMA playback with reference byte [DSP 2+] Send: 7Dh Note: use command 48h first 7Fh - 8/3 ADPCM auto init DMA playback with reference byte [DSP 2+] Send: 7Fh Note: use command 48h first 80h - Pause recording for a short time Send: 80h, lo (pausetime-1), hi (pausetime-1) pausetime = the time in samples. 90h/98h - 8bit high speed auto init playback/recording [DSP 2.01+] Send: 90h/98h Note: use command 48h first 91h/99h - 8bit high speed single cycle playback/recording [DSP 2.01+] Send: 91h/99h Note: use command 48h first A0h/A8h - Set recording to mono/stereo [DSP 3.xx] Send: A0h/A8h Bxh - 16bit DMA playback/recording [DSP 4+] Send: Bxh, mode, lo (samples-1), hi (samples-1) x is a four bit number: bit 0 : 0 bit 1 : 0 = FIFO disabled 1 = FIFO enabled bit 2 : 0 = single cycle 1 = auto init bit 3 : 0 = playback 1 = record mode is a byte: all bits 0, except: bit 4 : 0 = unsigned samples 1 = signed samples bit 5 : 0 = mono 1 = stereo Cxh - 8bit DMA playback/recording [DSP 4+] Send: Cxh, mode, lo (samples-1), hi (samples-1) D0h - Pause 8bit DMA transfer Send : D0h D1h - Enable speaker Send: D1h D3h - Disable speaker Send: D3h D4h - Resume 8bit DMA transfer Send: D4h D5h/D6h - Stop/Resume 16bit DMA transfer [DSP 4+] Send: D5h/D6h D8h - Determine speaker status [DSP 2+] Send: D8h Read: status Status: 0 = disabled; FFh = enabled D9h - Stop 16bit auto init transfer at next IRQ [DSP 4+] Send: D9h DAh - Stop 8bit auto init transfer at next IRQ [DSP 2+] Send: DAh E1h - Determine DSP version number Send: E1h Read: MainVer, SubVer