=== ========================================== ===
=== SID – Sound Interface Device ($d400-$d41c) ===
=== ========================================== ===

Registers
┌───────────┬────┬───────────────────┬────────────────────────────────────────────────────────────────┐
│ d400-d401 │  0 │ Frequency 1       │ Frequenz Stimme 1                                              │
│           │    │                   │ F = (N * 0.0596) Hz                                            │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d402-d403 │  2 │ Pulse Width  1    │ Tastverhältnis Stimme 1 für Rechteck (12 Bit)                  │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d404      │  4 │ Control Reg 1     │ Wellenform Stimme 1                                            │
│           │    │                   │ $_1: GATE                                                      │
│           │    │                   │ $_2: SYNC                                                      │
│           │    │                   │ $_4: RING MOD                                                  │
│           │    │                   │ $_8: TEST                                                      │
│           │    │                   │ $1_: Triangle (Dreieck)                                        │
│           │    │                   │ $2_: Sawtooth (Sägezahn)                                       │
│           │    │                   │ $4_: Pulse (Rechteck)                                          │
│           │    │                   │ $8_: Noise (Rauschen)                                          │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d405      │  5 │ Attack/Decay 1    │ Anschlag/Abschwellen Stimme 1                                  │
│           │    │                   │ $_0-$_f: DCY Schnell-Lansam                                    │
│           │    │                   │ $0_-$f_: ATK Schnell-Langsam                                   │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d406      │  6 │ Sustain/Release 1 │ Halten/Ausklingen Stimme 1                                     │
│           │    │                   │ $_0-$_f: RLS Schnell-Langsam                                   │
│           │    │                   │ $0_-$f_: STN Schnell-Langsam                                   │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d407-d408 │  7 │ Frequency 2       │ Frequenz Stimme 2                                              │
│           │    │                   │ F = (N * 0.0596) Hz                                            │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d409-d40a │  9 │ Pulse Width  2    │ Tastverhältnis Stimme 2 für Rechteck (12 Bit)                  │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d40b      │ 11 │ Control Reg 2     │ Wellenform Stimme 2                                            │
│           │    │                   │ $_1: GATE                                                      │
│           │    │                   │ $_2: SYNC                                                      │
│           │    │                   │ $_4: RING MOD                                                  │
│           │    │                   │ $_8: TEST                                                      │
│           │    │                   │ $1_: Triangle (Dreieck)                                        │
│           │    │                   │ $2_: Sawtooth (Sägezahn)                                       │
│           │    │                   │ $4_: Pulse (Rechteck)                                          │
│           │    │                   │ $8_: Noise (Rauschen)                                          │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d40c      │ 12 │ Attack/Decay 2    │ Anschlag/Abschwellen Stimme 2                                  │
│           │    │                   │ $_0-$_f: DCY Schnell-Lansam                                    │
│           │    │                   │ $0_-$f_: ATK Schnell-Langsam                                   │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d40d      │ 13 │ Sustain/Release 2 │ Halten/Ausklingen Stimme 2                                     │
│           │    │                   │ $_0-$_f: RLS Schnell-Langsam                                   │
│           │    │                   │ $0_-$f_: STN Schnell-Langsam                                   │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d40e-d40f │ 14 │ Frequency 3       │ Frequenz Stimme 3                                              │
│           │    │                   │ F = (N * 0.0596) Hz                                            │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d410-d411 │ 16 │ Pulse Width  3    │ Tastverhältnis Stimme 3 für Rechteck (12 Bit)                  │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d412      │ 18 │ Control Reg 3     │ Wellenform Stimme 3                                            │
│           │    │                   │ $_1: GATE                                                      │
│           │    │                   │ $_2: SYNC                                                      │
│           │    │                   │ $_4: RING MOD                                                  │
│           │    │                   │ $_8: TEST                                                      │
│           │    │                   │ $1_: Triangle (Dreieck)                                        │
│           │    │                   │ $2_: Sawtooth (Sägezahn)                                       │
│           │    │                   │ $4_: Pulse (Rechteck)                                          │
│           │    │                   │ $8_: Noise (Rauschen)                                          │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d413      │ 19 │ Attack/Decay 3    │ Anschlag/Abschwellen Stimme 3                                  │
│           │    │                   │ $_0-$_f: DCY Schnell-Lansam                                    │
│           │    │                   │ $0_-$f_: ATK Schnell-Langsam                                   │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d414      │ 20 │ Sustain/Release 3 │ Halten/Ausklingen Stimme 3                                     │
│           │    │                   │ $_0-$_f: RLS Schnell-Langsam                                   │
│           │    │                   │ $0_-$f_: STN Schnell-Langsam                                   │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d418      │ 24 │ Mode/Vol          │ Lautstärke/Filtermodus                                         │
│           │    │                   │ $_0-$_f: Leise-Laut                                            │
│           │    │                   │ $1_: Tiefpass                                                  │
│           │    │                   │ $2_: Bandpass                                                  │
│           │    │                   │ $4_: Hochpass                                                  │
│           │    │                   │ $8_: Aus                                                       │
├───────────┼────┼───────────────────┼────────────────────────────────────────────────────────────────┤
│ d41b      │ 27 │ OSC3/Random       │ HB der aktuellen Frequenz der Stimme 3                         │
└───────────┴────┴───────────────────┴────────────────────────────────────────────────────────────────┘

Detailed Description

Voice 1

R00.01 – Frequency
Together these registers form a 16-bit number which linerary controls the frequency of oscillator 1.
The frequency is determined by the following equation:

F = (N * Clk/16.777.216) Hz

where F is the 16-bit number in the frequency registers and Clk ist the system clock applied to the 02
input (pin 6). For a standard 1.0 MHz clock, the frequency is given by:

F = (N * 0.0596) Hz

A complete table of values for generating eight octaves of the equally-tempered musical scale with con-
cert A (440 Hz) tuning is provided in appendix A. It should be noted that the frequency resolution of
SID is sufficiant for any tuning scale and allows sweeping from note to note (portamento) with no dis-
cernable frequency steps.

R02.03 – Pulse width
Together these registers form a 12-bit number (bit 4-7 of HB are not used) which linearly controls the
pulse width (duty cycle) of the pulse waveform on oscillator 1. The pulse width is determined by the
following equation:

P = (N / 40.95) %

Where N is the 12-bit number in the pulse width register. The pulse width resolution allows the width
to be smoothly swept with no discernable stepping. Note that the pulse waveform on oscillator 1 must be
selected in order for the pulse width registers to have any audible effect. A value of 0 or 4.095
($0fff) in pulse width registers will produce a constant DC output, while a value of 2.048 ($0800) will
produce a square wave.

R04 – Control Reg
·  Bit 0 » Gate
The GATE bit controls the envelope generator for the voice 1. When the bis set to one, the envelope ge-
nerator is gated (triggered) and the ATTACK/DECAY/SUSTAIN cycle is initiated. When then bit is resert
to a zero, the RELEASE cycle begins. The envelope generator controls the amplitude of the oscillator 1
appearing at the audio output, therefore, the GATE bit must be set (along with suitable envelope para-
meters) for the selected output of the oscillator 1 to be audible. A detailed discussion of the envelo-
pe generator can be found in appendix B.

· Bit 1 » Sync
The SYNC bit, when set to a one, synchronizes the fundamental frequency of oscillator 1 with the funda-
mental frequency of oscillator 3, producing „hard sync“ effects. Varying the frequency of oscilllator 1
with respect to oscillator 3 produces a wide range of complex harmonic structures from voice 1 at the
frequency of oscillator 3. In order for sync to occur, oscillator 3 must be set to some frequency other
than zero bit preferably lower the the frequency of oscillator 1. No other parameters of voice 3 have
any effect on sync.

· Bit 2 » Ring Mod
The RING MOD bit, when set to a one, replaces the triangle waveform output oscillator 1 with a „ring
modulated“ combination of oscillators 1 and 3. Varying the frequency of oscillator 1 with respect to
oscillator 3 produces a wide range of non-harmonic overtone structures for creating bell or gong sounds
and for special effects. In order for ring modulation to be audible, the triangle waveform of oscil-
lator 1 must be selected and oscillator 3 must be set to some frequency other than zero. No other para-
meters of voice 3 have any effect on ring modulation.

· Bit 3 » Test ()
The TEST bit, when set to a one, resets and locks oscillator 1 at zero until the TEST bit is cleared.
The noise waveform output of oscullator 1 is also reset and the pulse waveform output is held at a DC
level. Normally this bit is used for testing purposes, however, it can be used to synchronize oscilla-
tor 1 to external events, allowing the generation of highly complex wave forms under real-time software
control.

· Bit 4 » Triangle
When set to a one, the triangle waveform output of oscillator 1 is selected. The triangle waveform is
low in harmonics and has a mellow, flute-like quality.

· Bit 5 » Sawtooth
When set to a one, the sawtooth waveform of oscillator 1 is selected. The sawtooth waveform is rich in
even and odd harmonics and has a bright, brassy quality.

· Bit 6 » Pulse
When set to a one, the pulse waveform output of oscillator 1 is selected. The harmonic content of this
waveform can be adjusted by the pulse width registers, producing tone qualities ranging from a bright,
hollow sqare wave to a nasal, reedy pulse. Sweeping the pulse width in real-time produced a dynamic
„phasing“ effect which adds a sense of motion to the sound. Rapidly jumping between different pulse
width can produce interesting harmonic sequences.

· Bit 7 » Noise
When set to a one, the noise output waveform of oscillator 1 is selected. This output is a random sig-
nal which changes at the frequency of oscillator 1. The sound quality can be varied from a low rumblung
to hissing white noise via the oscillator 1 frequency registers. Noise is useful in creating explos-
ions, gunshots, jet engines, wind, surf and other unpitched sounds, as well al snare drums and cymbals.
Sweeping the oscillator frequency with noise selected produces a dramatic rushing effect.

On of the output waveform must be selected for oscillator 1 to be audible, however, it is NOT necessary
to deselect waveforms to silence the output of voice 1. The amplitude of voice 1 at the final output is
a function of the envelope generator only.

NOTE: The oscillator output waveform are NOT addititve. If more than one output waveform is selected
simultaneously, the result will be a logical anding of the waveforms. Although this technique can be
used to generate additional waveforms beyond the four listed above, it must be used with care. If any
other waveform is selected while noise is on, the noise output can „lock up”. If this occurs, the noise
output will remain silent until reset by the TEST bit or by bringing RES (pin 5) low.

R05 – Attack/Decay
· Bits 0-3
DCY0-DCY3 select 1 of 16 DECAY rates for the envelope generator. The DECAY cycle follows the ATTACK
cycle and the DECAY rate determines how reapidly the output falls from the peak amplitude to the se-
lected SUSTAIN level. The 16 DECAY rates are listed in Table 2.

· Bits 4-7
The bits of this register (ATK0-ATK3) select 1 of 16 ATTACK rates for the voice 1 envelope generator.
The ATTACK rate determines how rapidly the output of voice 1 rises from zero to peak amplitude when the
envelope generator is gated. The 16 ATTACK rates are listed below in Table 2.

Table 1 – Envelope Rates
┌─────┬─────────┬─────────┐
│ HEX │   ATK   │ DCY/RES │
├─────┼─────────┼─────────┤
│   0 │    2 ms │    6 ms │
│   1 │    8 ms │   24 ms │
│   2 │   16 ms │   48 ms │
│   3 │   24 ms │   72 ms │
│   4 │   38 ms │  114 ms │
│   5 │   56 ms │  168 ms │
│   6 │   68 ms │  204 ms │
│   7 │   80 ms │  240 ms │
│   8 │  100 ms │  300 ms │
│   9 │  250 ms │  750 ms │
│   a │  500 ms │  1.5  s │
│   b │  800 ms │  2.4  s │
│   c │  1.0  s │  3.0  s │
│   d │  3.0  s │  9.0  s │
│   e │  5.0  s │ 15.0  s │
│   f │  8.0  s │ 24.0  s │
└─────┴─────────┴─────────┘

NOTE: Envelope rates are based on a 1.0 MHz 02 clock. For other 02 frequencies, multiply the given rate
by 1 MHz/02. The rates refer to the amount of time per cycle. For example, given an ATTACK value of 2,
the ATTACK cycle would take 16 ms to rise from zero to peak amplitude. The DECAY/RELEASE rates refer to
the amount of time these cycles would take to fall from peak amplitude to zero.

R06 – Sustain/Release
· Bits 0-3
RLS0-RLS3 select 1 of 16 RELEASE rates for the envelope generator. The RELEASE cycle follows the SUS-
TAIN cycle when the gate bit is reset to zero. At this time, the output of voice 1 will fall the SUS-
TAIN amplitude to zero amplitude at the selected RELEASE rate. The 16 RELEASE rates are identical to
the DECAY rates.

· Bits 4-7
The bits of this register (STN0-STN3) select 1 of 16 SUSTAIN levels for the envelope generator. The
SUSTAIN cycle follows the DECAY cycle and the output of voice 1 will remain at the selected SUSTAIN
amplitude as long as the gate bit remains set. The SUSTAIN levels range from zero to peak amplitude in
16 linear steps, with a SUSTAIN value of 0 selecting zero amplitude and a SUSTAIN value of 15 ($f)
selecting the peak amplitude. A SUSTAIN value of 8 would cause voice 1 to SUSTAIN at an amplitude one-
haft the peak amplitude reached by the ATTACK cycle.

NOTE: The cycling of the envelope generator can be altered at any point via the gate bit. The envelope
generator can be gated and released without restriction. For example, if the gate bit is reset before
the envelope has finished the ATTACK cycle, the RELEASE cycle wil immeadiately begin, starting from
whatever amplitude had been reached. If the envelope is then gated again (before the RELEASE cycle has
reached zero amplitude), another ATTACK cycle will begin, starting from whatever amplitude had been
reached. This technique can be used to generate complex amplitude envelopes via real-time software
control.

Voice 2

Registers $07-$0d control voice 2 and are functionally identical to registers $00-$06 with these excep-
tions: When selected, SYNC synchornizes oscillator 2 with oscillator 1. When selected, RING MOD repla-
ces the triangle output of oscillator 2 with the ring modulated combination of oscillator 2 and 1.

Voice 3

Registers $0e-$14 control voice 3 and are functionally identical to registers $00-$06 with these excep-
tions: When selected, SYNC synchronizes oscillator 3 with oscillator 2. When selected, RING MOG repla-
ces the triangle output of oscillator 3 with the ring modulated combination of oscillator 3 and 2.

Typical operation of a voice consists of selecting the desired parameters: frquency, waveform effects
(SYNC, RING MOD) and envelope rates, then gating the voice whenever the sound is desired. The sound can
be sustained for any length of time and terminated by clearing the gate bit. Each voice can be used se-
perately, with independent parameters and gating, or in unison to create a single, powerful voice. When
used in unison, a slight detuning of each oscillator or tuning to musical intervals creates a rich,
animated sound.

Filter

Misc

R1b – OSC 3/Random
This register allows the microprocessor to read the upper 8 output bits of oscillator 3. The character
of the numbers generated is directly related to the waveform selected. If the sawtooth waveform of
oscillator 3 is selected, this register will present a series of numbers incrementing from $00 to $ff
at a rate determinded by the frequency of oscillator 3. If the triangle waveform is selected, the out-
put will increment from $00 to $ff, then decrement down to $00. If the pulse waveform is selected the
output will jump between $00 anf $ff. Selecting the noice waveform will produce a series of random num-
bers, therefore, this register can be used as a random number generator for games. There are numerous
timing an sequencing applications for the Osc 3 register, however, the chief function is problably that
of modulation generator. The numbers generated by this register can be added, via software, to the
oscillator of filter frequency register or the pulse width registers in real-time. Many dynamic effects
can be generated in this manner. Siren-like sounds can be created by adding the Osc 3 sawtooth output
to the frequency control or another oscillator. Synthesizer „sample and hold“ effects can be produced
by adding the Osc 3 noice output to the filter frequency control registers. Vibrator can be produced by
setting Osc 3 to a frquency around 7 Hz and adding the Osc 3 triangle output (with proper scaling) to
the frequency control of another oscillator. An unlimited range of effects are available by altering
the frequency of Osc 3 and scaling the Osc 3 output. Normally, when Osc 3 is used for modulation, the
audio output of voice 3 should be eliminated (3 Off = 1).

Fehlerhinweise, Kommentare und Anregungen sind mir herzlich willkommen.

Letzte Aktualisierung: 2017-02-23