Table of Contents

Appendix 5 Sound System

This is Appendix 5 of the SD-8516 Programmer's Reference Guide.

The SD-8516 is paired with the SD-450 sound subsystem; named for featuring 4 independent voices with 5 waveforms available, each with a programmable ADSR envelope.

Voice Architecture

Each voice occupies 16 bytes of memory in Bank 1:

Offset Register Description
+$00 FREQ_LO Frequency low byte
+$01 FREQ_HI Frequency high byte
+$02 GATE Waveform/gate control
+$03 VOLUME Volume (0-255)
+$04 ATTACK Attack time
+$05 DECAY Decay time
+$06 SUSTAIN Sustain level
+$07 RELEASE Release time
+$08 DATA1 Pulse width / noise type
+$09-$0F Reserved Future expansion

Voice base addresses:

Waveforms

Gate register values:

ADSR Envelope

The Attack-Decay-Sustain-Release envelope shapes each note:

Example:

; Play middle C on voice 0
    LDA $112B           ; C4 frequency (262 Hz / 0.0596)
    STA [$1ED00]         ; FREQ_LO/HI
    LDAL $01            ; Square wave
    STAL [$1ED02]        ; GATE
    LDAL $4D            ; ~30% volume
    STAL [$1ED03]        ; VOLUME

Sound System Memory Map

Also see Appendix 3 Memory Map.

Sound System ($01EF80–$01EFBF) – 64 bytes total

Address Range Size Symbol / Register Description
$01EF80–$01EF8F 16 bytes SOUND0_BASE Voice 0
$01EF80 1 byte SOUND0_FREQ_LO Frequency low byte (bits 7–0)
$01EF81 1 byte SOUND0_FREQ_HI Frequency high byte (bits 15–8)
$01EF82 1 byte SOUND0_GATE Gate / Waveform select (gate bit + waveform type: noise, pulse, saw, triangle, etc.)
$01EF83 1 byte SOUND0_VOLUME Master volume for voice 0 (usually 0–15, may include global volume in some implementations)
$01EF84 1 byte SOUND0_ATTACK Attack rate (0–15)
$01EF85 1 byte SOUND0_DECAY Decay rate (0–15)
$01EF86 1 byte SOUND0_SUSTAIN Sustain level (0–15)
$01EF87 1 byte SOUND0_RELEASE Release rate (0–15)
$01EF88 1 byte SOUND0_DATA1 Voice-specific control / extra parameter 1 (e.g. pulse width low, filter routing, etc.)
$01EF89 1 byte SOUND0_DATA2 Voice-specific control / extra parameter 2 (e.g. pulse width high, ring/mod flags, etc.)
$01EF8A–$01EF8F 6 bytes Reserved / unused / future expansion for Voice 0
Address Range Size Symbol / Register Description
$01EF90–$01EF9F 16 bytes SOUND1_BASE Voice 1
$01EF90 1 byte SOUND1_FREQ_LO Frequency low byte
$01EF91 1 byte SOUND1_FREQ_HI Frequency high byte
$01EF92 1 byte SOUND1_GATE Gate / Waveform select
$01EF93 1 byte SOUND1_VOLUME Volume for voice 1
$01EF94 1 byte SOUND1_ATTACK Attack rate
$01EF95 1 byte SOUND1_DECAY Decay rate
$01EF96 1 byte SOUND1_SUSTAIN Sustain level
$01EF97 1 byte SOUND1_RELEASE Release rate
$01EF98 1 byte SOUND1_DATA1 Extra control 1
$01EF99 1 byte SOUND1_DATA2 Extra control 2
$01EF9A–$01EF9F 6 bytes Reserved / unused / future expansion for Voice 1
Address Range Size Symbol / Register Description
$01EFA0–$01EFAF 16 bytes SOUND2_BASE Voice 2
$01EFA0 1 byte SOUND2_FREQ_LO Frequency low byte
$01EFA1 1 byte SOUND2_FREQ_HI Frequency high byte
$01EFA2 1 byte SOUND2_GATE Gate / Waveform select
$01EFA3 1 byte SOUND2_VOLUME Volume for voice 2
$01EFA4 1 byte SOUND2_ATTACK Attack rate
$01EFA5 1 byte SOUND2_DECAY Decay rate
$01EFA6 1 byte SOUND2_SUSTAIN Sustain level
$01EFA7 1 byte SOUND2_RELEASE Release rate
$01EFA8 1 byte SOUND2_DATA1 Extra control 1
$01EFA9 1 byte SOUND2_DATA2 Extra control 2
$01EFAA–$01EFAF 6 bytes Reserved / unused / future expansion for Voice 2
Address Range Size Symbol / Register Description
$01EFB0–$01EFBF 16 bytes SOUND3_BASE Voice 3
$01EFB0 1 byte SOUND3_FREQ_LO Frequency low byte
$01EFB1 1 byte SOUND3_FREQ_HI Frequency high byte
$01EFB2 1 byte SOUND3_GATE Gate / Waveform select
$01EFB3 1 byte SOUND3_VOLUME Volume for voice 3
$01EFB4 1 byte SOUND3_ATTACK Attack rate
$01EFB5 1 byte SOUND3_DECAY Decay rate
$01EFB6 1 byte SOUND3_SUSTAIN Sustain level
$01EFB7 1 byte SOUND3_RELEASE Release rate
$01EFB8 1 byte SOUND3_DATA1 Extra control 1
$01EFB9 1 byte SOUND3_DATA2 Extra control 2
$01EFBA–$01EFBF 6 bytes Reserved / unused / future expansion for Voice 3