SID (MOS 6581 / 8580)
The SID — Sound Interface Device — is the sound chip of the commodore-64: three voices, each with its own waveform, pulse width and adsr-envelope, plus one shared programmable filter; designed by bob-yannes at MOS Technology in 1981–82 — the work began in spring 1981 and "took just 4–5 months" (source: s-sidmusic-creation-of-the-sid-chip); 1982 is the datasheet's year — as a subtractive synthesizer on a chip, "compatible with the 65XX and similar microprocessor families" (source: s-mos-6581-datasheet; quoted in s-witchmaster-creating-chiptunes-with-sid-wizard). Nearly every C64 chiptune technique — pulse-width-modulation, filter-programming, wavetable-programming, hard-restart, ring-modulation-and-sync — is a way of animating its 29 registers from a player routine once per frame (or more, with multispeed), and s-newman-driving-the-sid-chip argues that those player routines are as much "the SID sound" as the silicon.
Register map (as summarised in the SID-Wizard manual)#
| voice 1 | voice 2 | voice 3 | register |
|---|---|---|---|
$00–$01 | $07–$08 | $0E–$0F | pitch (low byte, high byte) |
$02–$03 | $09–$0A | $10–$11 | pulse width (low byte, high nybble) |
$04 | $0B | $12 | waveform + control (test, ring, sync, gate) |
$05–$06 | $0C–$0D | $13–$14 | ADSR envelope (attack/decay, sustain/release) |
| register | function |
|---|---|
$15–$16 | filter cutoff frequency (low 3 bits; high 8 bits — 11 bits total) |
$17 | filter resonance (high nybble) and filter switches for channels 3, 2, 1 |
$18 | filter band (nybble: low-pass / band-pass / high-pass) and main volume (nybble) |
(source: s-sid-wizard-manual). In SID-Wizard's filter table the band nybble values are 9 = low-pass, A = band-pass, C = high-pass; the main volume is $D418's low nybble ($Ax small effect) and $D417 is the filter-switch/resonance register ($1F effect). The chip lives at $D400; voice 2's control register is $D40B (source: s-lemon64-hard-restart-threads). An editor can sit almost directly on this map: defmon draws no distinction between instrument and effect at all, only a single sidTAB whose columns are the registers — waveform, gate, AD, SR, transpose, finetune, pulse width, pulse sweep, resonance and voice mask, filter type, cutoff offset — because "All instruments and effects are merely changes within these registers" (source: s-defmon-wiki-manual). Learning defMON and learning the map above are the same activity.
The datasheet's register map (Table 1)#
The MOS datasheet — reprinted as Appendix O of the c64-programmers-reference-guide — lists 29 eight-bit registers; the five address lines would allow 32, and the three spare locations ignore writes and "a Read returns invalid data" (source: s-mos-6581-datasheet). The Programmer's Reference Guide addresses the same registers as decimal POKE locations 54272–54296 ($D400 + 0…24) (source: s-c64-prg-chapter-4-sound). A shipped game written exactly that way survives: Telengard (Avalon Hill, 1983) drives the SID from BASIC with no interrupt at all — f=54272, all 25 registers zeroed at setup, a 60-entry note table computed downward by one multiplication per semitone (i=8098: r=61176/64814, a ratio of about 2^(−1/12)), voices poked as poke f+5+fq*7,18, and note lengths measured by how long the BASIC interpreter takes to run the statements. Ripping it to a playable file meant translating every POKE into JSR delay / LDA #n / STA $D400, each delay routine sized to waste the cycles the interpreter would have spent, and shipping the result as an RSID because there is no play address to call (source: s-sidin04-ripping-basic-rsid; sid-format).
| reg | name | bits | access |
|---|---|---|---|
$00 / $07 / $0E | Freq Lo | F7–F0 | write |
$01 / $08 / $0F | Freq Hi | F15–F8 | write |
$02 / $09 / $10 | PW Lo | PW7–PW0 | write |
$03 / $0A / $11 | PW Hi | PW11–PW8 (bits 4–7 unused) | write |
$04 / $0B / $12 | Control | NOISE, pulse, saw, triangle, TEST, RING MOD, SYNC, GATE (bit 7 → 0) | write |
$05 / $0C / $13 | Attack/Decay | ATK3–0, DCY3–0 | write |
$06 / $0D / $14 | Sustain/Release | STN3–0, RLS3–0 | write |
$15 | FC Lo | FC2–FC0 (bits 3–7 unused) | write |
$16 | FC Hi | FC10–FC3 | write |
$17 | RES/Filt | RES3–0, Filt EX, Filt 3, Filt 2, Filt 1 | write |
$18 | Mode/Vol | 3 OFF, HP, BP, LP, VOL3–0 | write |
$19 / $1A | POTX / POTY | 8-bit pot positions, updated every 512 clock cycles | read |
$1B | OSC 3 / Random | upper 8 bits of oscillator 3 | read |
$1C | ENV 3 | envelope 3 output | read |
Formulas (source: s-mos-6581-datasheet): Fout = Fn × Fclk / 16777216 Hz — at a 1.0 MHz clock Fout = Fn × 0.0596 Hz, and the 16-bit resolution "allows sweeping from note to note (portamento) with no discernable frequency steps"; pulse width PWout = PWn / 40.95 % with $800 = square and 0/$FFF = constant DC; the PRG's version of the frequency formula, Fn = Fout / .06097, uses a constant that corresponds to a clock of about 1.023 MHz — the NTSC C64's — which neither text says explicitly (derived from the datasheet's formula; source: s-c64-prg-chapter-4-sound). Because envelope rates and pitches are "referenced to this clock", a PAL machine runs both slightly differently from the datasheet's 1.0 MHz figures (commodore-64) — which is why an NTSC build of an editor needs its own note table and its own timer values, as defmon's experimental NTSC-only release of 2018-02-11 did (source: s-defmon-wiki-releases). The same 16-bit divider is also why microtuning costs nothing on the SID: little-scale's December 2009 call for a microtonal chip compilation names "the SEGA Mega Drive, C64 SID chip and many other chipmusic-related consoles and computers" as supporting "a frequency resolution that is fine enough for the composition of microtonal music" — where lsdj keeps its pitches in a ROM table that has to be patched, a SID editor that will write an arbitrary frequency value needs no patch at all (source: s-little-scale-microtonal-compilation; asserted there rather than demonstrated — see alternative-tunings).
Waveform / control byte#
| bit | value | meaning |
|---|---|---|
| 0 | $01 | gate — on starts attack/decay/sustain, off starts release |
| 1 | $02 | sync with the neighbouring oscillator |
| 2 | $04 | ring modulation ("most effective with the triangle waveform") |
| 3 | $08 | test — "silences sound and resets the oscillator" |
| 4 | $10 | triangle |
| 5 | $20 | sawtooth |
| 6 | $40 | pulse |
| 7 | $80 | noise |
(source: s-goattracker-readme). So $11 is a gated triangle, $21 saw, $41 pulse, $81 noise, $09 gate + test, $E9 in GoatTracker's wavetable encoding. Datasheet characters (quoted in the SID-Wizard book): triangle "low in harmonics … mellow, flute-like"; sawtooth "rich in even and odd harmonics … bright, brassy"; pulse "from a bright, hollow square wave to a nasal, reedy pulse", and sweeping the width gives "a dynamic 'phasing' effect"; noise changes "at the frequency of the oscillator", from "a low rumbling to hissing white noise", for explosions, wind, snares and cymbals — now sourced directly (source: s-mos-6581-datasheet). The datasheet adds that a waveform must be selected for a voice to be heard, but need not be deselected to silence it: "the amplitude of Voice 1 at the final output is a function of the Envelope Generator only".
Combined waveforms: any but noise can be combined; the result differs between chips — the 6581 gives low volume, the 8580 "can combine the waveforms more effectively" (sources: s-goattracker-readme, s-witchmaster-creating-chiptunes-with-sid-wizard). Chordian's audibility table: 31 tri+saw virtually inaudible on the 6581, thin on the 8580; 51 tri+pulse "the most used combined waveform since it's clearly audible on both"; 61 saw+pulse almost inaudible old, organ-like new; 71 all three virtually inaudible old, thinner than 31 new. Noise lock-up: combining noise with another waveform gives silence and locks the noise generator so plain noise stays silent too, until the test bit is set (source: s-chordian-sf2-instruments). The datasheet's own wording: the outputs "are NOT additive … the result will be a logical ANDing of the waveforms", usable "to generate additional waveforms beyond the four listed above" but "with care", and "if any other waveform is selected while Noise is on, the Noise output can 'lock up'" until reset by the TEST bit or the RES pin (source: s-mos-6581-datasheet). HVSC's format document states the model difference the same way: combined waveforms "are generally louder on a MOS8580, to the extent that some combinations that are clearly audible on a MOS8580 are completely silent on a MOS6581" (source: s-hvsc-sid-file-format). cheesecutter's built-in cheat sheet compresses the same table into one line for the composer at the keyboard — "Waveforms $3, $6 and $7 are audible only on new SID (8580)" — and marks LOCK against the $9–$F noise combinations (source: s-cheesecutter-guide); those three are exactly Chordian's 31, 61 and 71, arrived at from a different tool in a different decade.
The designer's explanation of why combinations exist at all: "the Waveform Selector consisted of multiplexers that selected which waveform bits would be sent to the Waveform D/A. The multiplexers were single transistors and did not provide a 'lock-out', allowing combinations of the waveforms to be selected. The combination was actually a logical ANDing of the bits of each waveform, which produced unpredictable results, so I didn't encourage this, especially since it could lock up the pseudo-random sequence generator by filling it with zeroes." (source: s-sidmusic-yannes-interview) — which confirms the datasheet's "logical ANDing" and gives the cause of the noise lock-up. Christer Rindeblad's column, by contrast, lists the statement that the chip "can perform a logical AND on different waveforms" as an error in the documentation (source: s-sidmusic-creation-of-the-sid-chip); the designer and the datasheet outvote it (see Contradictions below).
furnace's manual says the same in a tracker author's words: several waveforms at once give "a logical AND mix of waves … due to hardware flaws, the mixing is a bit weird and sounds different between the 6581 and the 8580", the 8580 being the version "with working waveform mixing"; noise "cannot be used with any of the other waveforms" (source: s-furnace-c64-docs). What noise does do in combination is catalogued in a list 4mat posted on chipmusic.org in 2013 (quoted from an unnamed guide; a forum claim) — the "metal noise" values of the control byte (source: s-chipmusic-sid-music-hints-n-tips):
| control byte | bits | 4mat's list |
|---|---|---|
$81, $80 | noise (+ gate) | "noise waveform. NATIVE WAVEFORM." |
$82–$83, $86–$87 | noise + sync (+ ring) | "a slight SYNC effect" |
$88–$8F | noise + test | "reset noise" |
$90–$BF, $D0–$EF | noise + triangle and/or saw (with or without pulse) | "not used (do not use: the noise dies)" — the lock-up above |
$C0–$CF | noise + pulse | "rare extras" |
$F0–$F7 | noise + pulse + saw + triangle | "rare extras: resets the internal pseudo random generator" |
$F8–$FF | all four + test | "resets the internal pseudo random generator, so the noise waveform play different, on some sids the selected noise sounds more 'metallic' depending on the value and running SID cycles and other status. Usage: first $f9, then $81" |
The reset entries agree with the measurements below: the test bit restarts the noise shift register from a fixed value, though not instantly (source: s-sidmusic-alstrup-waveform-examinations).
Test bit#
Setting it "resets and locks the oscillator at zero until this value is cleared" (source: s-witchmaster-creating-chiptunes-with-sid-wizard); the reset is immediate, but it "doesn't affect the envelope generator at all" (source: s-lemon64-hard-restart-threads). Trackers set it on the first frame of a note (GoatTracker/SID-Wizard 1st-frame $09; SID Factory II flag $10) — "Setting the test bit has no downsides" (source: s-chordian-sf2-instruments). Datasheet: TEST "resets and locks Oscillator 1 at zero until the TEST bit is cleared. The Noise waveform output of Oscillator 1 is also reset and the Pulse waveform output is held at a DC level"; meant for testing, "however, it can be used to synchronize Oscillator 1 to external events, allowing the generation of highly complex waveforms under real-time software control" (source: s-mos-6581-datasheet).
Measured on a real chip (asger-alstrup, 1995): the triangle/sawtooth counter "is held reset to 0 when the test bit is 1" and "starts counting" the moment the bit is cleared — whether or not a waveform is selected — so the phase reset is immediate; the noise generator is different: its reset by the test bit takes effect "$2000-$8000 cycles later (this figure varies greatly)", roughly 8–33 ms, and the examination programs wait 50 frames after setting the bit before trusting the noise (source: s-sidmusic-alstrup-waveform-examinations). Furnace's macro documentation adds the modulation side effect: while a channel's test bit is set it is muted at once, and "if the channel is a source of ring mod and/or hard sync, those stop working until the bit is reset" (source: s-furnace-c64-docs). There is also a silicon reason to stop the oscillator whenever a voice should be silent: without "a proper MOS op-amp" the chip has "signal leakage which occurred when the volume of the voice was supposed to be zero. This lead to poor signal-to-noise ratio, although it could be dealt with by stopping the oscillator." (source: s-sidmusic-yannes-interview) — the first-frame $09 convention has a noise-floor benefit as well as a phase reset. frantic states the division the way a tracker user needs it: the test bit "resets the oscillator that produces the waveform, and that is completely independent of the volume envelope generation" (2018-08-07; source: s-chipmusic-defmon-thread) — which is why it can be set on the first frame of a note without disturbing the hard-restart happening in the ADSR registers at the same time.
Who found the noise reset. The wiki can date and attribute the trick. JCH recalls that johannes-bjerregaard, while visiting him around 1988, "discovered how to use a test bit in the SID chip to reset the random numbers used internally by the noise waveform", which made noise "more predictable … slightly more metallic" (source: s-chordian-my-computer-chronicles); among JCH's scanned 1980s papers is the draft of a magazine article that "describes how to utilize the test-bit in the SID chip when composing tunes" (source: s-chordian-player-editor-notes). It is still in use: sid-factory-ii instruments carry the oscillator-reset flag, and 4mat's "first $f9, then $81" recipe above is the same discovery written as two control-byte values.
Sync and ring modulation#
The modulating oscillator is the voice to the left: voice 3 modulates voice 1, 1 modulates 2, 2 modulates 3 (sources: s-goattracker-readme, s-witchmaster-creating-chiptunes-with-sid-wizard). Hard sync locks the fundamental of one oscillator to the other's and needs the modulator "set to some frequency other than zero but preferably lower"; ring modulation "replaces the triangle waveform output" with a ring-modulated combination for "bell or gong sounds", so the triangle must be selected and the modulator non-zero; no other parameter of the modulating voice matters (source: s-mos-6581-datasheet, quoted in the SID-Wizard book). The datasheet spells out the chain: voice 2's SYNC and RING MOD use oscillator 1, voice 3's use oscillator 2; the Programmer's Reference Guide demonstrates both with decimal control values 19 (gate + sync + triangle) and 21 (gate + ring + triangle) (source: s-c64-prg-chapter-4-sound). Inside the chip, sync is "clearing the accumulator of an Oscillator based on the accumulator MSB of the previous oscillator", and ring modulation is "substituting the accumulator MSB of an oscillator in the EXOR function of the triangle waveform generator with the accumulator MSB of the previous oscillator. That is why the triangle waveform must be selected to use Ring Modulation." (source: s-sidmusic-yannes-interview). See ring-modulation-and-sync.
Filter#
One filter for all three voices: 11-bit cutoff, resonance nybble, per-voice switches, low/band/high-pass selectable and combinable; cutoff range roughly 30 Hz–10 kHz (source: s-witchmaster-creating-chiptunes-with-sid-wizard). Datasheet detail: the cutoff is an 11-bit number ($15 bits 0–2 + $16), "approximately 30 Hz–10 kHz" with the recommended 2200 pF capacitors (the pin description says 30 Hz–12 kHz and gives FCmax = 2.6E-5 / C, the range extending "approximately 9 octaves below" that maximum); resonance has 16 linear steps; low-pass and high-pass roll off at 12 dB/octave, band-pass at 6 dB/octave; the modes are additive, so LP + HP = notch; 3 OFF disconnects voice 3 from the output so it can modulate silently; "the Filter is, perhaps, the most important element in SID … The best results are achieved by varying the Cutoff Frequency in real-time" (source: s-mos-6581-datasheet). The PRG maps the same bits as register 24 bit 6 = high-pass, bit 5 = band-pass, bit 4 = low-pass, register 23 low bits = voice switches (source: s-c64-prg-chapter-4-sound). HVSC: the 8580's "analog filter has totally different characteristics from the MOS6581 analog filter" (source: s-hvsc-sid-file-format). Yannes: "I knew it wouldn't work very well, but it was better than nothing and I didn't have time to make it better"; Ben Daglish on chip-to-chip variation: "you never had ANY idea how it was gonna sound on another machine" — Beach-Head let players adjust the filter to compensate (source: s-newman-driving-the-sid-chip); "every SID tends to sound different" (source: s-goattracker-readme) — because "the resistance of the FETs varied considerably with processing, so different lots of SID chips had different cutoff frequency characteristics" (source: s-sidmusic-yannes-interview; the design is described under The designer's account below). See filter-programming.
Switching the filter clicks — and it clicks less on the 8580. Two sources 24 years apart describe the same artefact from opposite ends. soundmonitor's 1986 manual gives each sound a filter-type byte in which FF means this sound touches no filter register at all, "which avoids the SID's click when filters switch" — the editor's way of letting a composer opt out (source: s-64er-soundmonitor-article). In 2010 freedom gives the positive form for the newer chip: on the 8580 "when you change filter type you don't get an unwanted noise as noticeable as the one you hear in 6581. This makes it possible to change filter type on an instrument while a note is being played and you get more sophisticated sounds" (source: s-sidin13-tsm-freedom-interview). So a filter-mode change is a per-note event on a 6581 and a usable mid-note gesture on an 8580.
The low three bits of the cutoff may never be written at all. The cutoff is 11 bits, but a player need not use all of them: anarkiwi's register dump of a defmon tune (2018-12-22) shows the player never writes $D415 at all, "so the rightmost two ACID digits of a set value do nothing" (source: s-chipmusic-defmon-thread). The same editor compensates for the curve difference between the two models in software, hard-capping the cutoff at $0200 on a detected 8580 and $0000 on a 6581 "to make the chips behave more alike" (same source) — a tool-level answer to the variance Yannes explains above.
$D418: volume, filter mode, and the fourth voice#
The last write register does two unrelated jobs at once — low nybble the master volume, high nybble the filter band selection plus 3 OFF (source: s-mos-6581-datasheet) — so anything that touches one must preserve the other. Three players in this wiki show the same defensive idiom, over three decades apart:
- soundmonitor (1986) gives each sound a volume byte
00–0Fthat its manual describes as "almost identical to SID register 24, but without the filter nibble": the editor separates the two for the composer (source: s-64er-soundmonitor-article). - galway-player keeps the current mode nybble in a variable and ORs it back after every sample write —
lda #$0F ; turn the volume to max / ora TEMP ; turn filter to the store value / sta $D418(source: s-realdmx-galway-arkanoid-player). - defmon builds the write from two self-modified operands,
lda #0(the filter mode, written by the player) andora #$0f(the global volume, "can be modified by you", at$10B1in some builds) — hence its instruction "Make sure that the upper nibble is always zero". Fading a defMON tune from your own code is one poke, and 4-bit precision means "16 steps, ranging from $0 to $f" (source: s-defmon-wiki-calling-the-player; levels-and-headroom).
The fourth voice. Yannes intended the DC path (see The designer's account below); the C64 scene turned it into a percussion channel in three distinct generations.
- 1986 — synthesis, no samples. martin-galway is careful about the credit: "I saw some utilities from the USA and picked them apart. Never would I claim to have invented that technique, I just got it published first. In fact, I couldn't really figure out where they got the sample data, just that they were wiggling the volume register, so I tried to make up my own drum sample sounds in realtime — which is the flatulence stuff that shipped in 'Arkanoid'" (source: s-sidmusic-galway-interviews). The reverse-engineered Arkanoid player bears him out: there is no PCM data in the file at all. Six routines each add a constant (
$98,$65,$DD,$DD,$0E,$01) to a 4-bit accumulator and write its low nybble to$D418, stepping down a six-entry busy-wait delay table such as$20,$10,$08,$04,$02,$01— each stage twice as slow as the last, which is a falling drum (source: s-realdmx-galway-arkanoid-player). Real drum samples only reached his own private version of the tune, after the game had shipped. So the C64's famous first "digi" is a volume-register waveform synthesizer, a few bytes of code per drum. - 1987 — streaming nibbles. matt-gray-player's Serpent Demo build adds a fourth pattern channel with three commands — sample speed, length, sample index — where the "note" is a CIA 2 Timer A value:
SETNMIpoints$0318/$0319at an NMI that outputs one nibble per interrupt (high nybble first) to$D418and advances a self-modified pointer, while the raster IRQ goes on playing the three SID voices; the music writes volume$09whenever no sample is running (source: s-sidin15-serpent-demo-player). "The only secret is that you have to use a NMI routine over the logic governed by the IRQ to performs the sample generation." Because the nibble replaces the whole volume register while the music sits at$09, the drums are structurally louder than the music — which is exactly what Gray later regretted about that tune (chip-samples). - 1991 — inside an editor. JCH added digis to his own C64 editor via "the
$D418volume-click trick and NMI", with Korg M1 sounds recorded through an SFX sampler cartridge; his first digi tune is dated 1991-06-23 and he made only four, because the editor was merely "hacked" for the extra voice and "too hairy to be used by anyone else but me" (source: s-chordian-my-computer-chronicles).
The 8580 removed the DC offset all three depend on — see Chip variants below.
Envelope#
Per-voice ADSR with attacks from 2 ms to 8 s and decay/release from 6 ms to 24 s (the datasheet's Table 2, for a 1.0 MHz clock), sustain in 16 linear steps, "exponential response" (adsr-envelope; source: s-mos-6581-datasheet). The datasheet promises that the envelope "can be Gated and Released without restriction" at any point; the silicon's envelope generator has a lock-up bug that hard-restart works around. The designer's description of that generator — an 8-bit up/down counter, a rate divider fed from a look-up table whose values were measured by ear on a Sequential Circuits Pro-1, a sustain comparator that only counts down — is on adsr-envelope (source: s-sidmusic-yannes-interview).
The bug has a number attached to it. Thorsten Klose, building the MIDIbox SID around real chips, puts it at "The gate is delayed by up to ca. 30mS!" — the several effects of it "have been reverse engineered by Dag Lem, and documented in the source code of reSID" — and lists the three ways out for a synthesizer that has no tracker frame to hide it in: end every patch with a step that zeroes the envelope registers (a hard-restart by another name), set the release rate to 0, which "eliminates the delay completely" but loses the fade, or play the MIDI notes 30 ms early, "easy with a sequencer, difficult if played live" (source: s-ucapps-wavetable-sounds-tutorial-1). Composers name it as the chip's worst trait: goto80 in 2002 — "I don't like the envelope-bugs — that the trigging of the sound, the attack, fucks up now and then (which hardrestarts kinda solves)" (source: s-remix64-goto80-interview).
Readback, pots, external input#
Two read-only registers expose voice 3: $1B returns the upper 8 bits of oscillator 3 (a sawtooth counts 0–255, a triangle counts up and down, a pulse jumps, noise gives random numbers — "a random number generator for games"), unaffected by its envelope; $1C returns envelope 3 (the voice must be gated). The datasheet lists the classic uses: sawtooth into another oscillator's frequency = siren, noise into the cutoff = "sample and hold", a ~7 Hz triangle scaled into a frequency = vibrato, ENV 3 into the cutoff = "harmonic envelopes, WAH WAH", into a frequency = "phaser"; mute the modulator with 3 OFF. POTX/POTY read two potentiometers (updated every 512 cycles). EXT IN accepts an external signal (~100 kΩ, ≤ 3 V p-p on a 6 V DC level) that can be filtered or mixed at unity gain — several SIDs "can be daisy-chained"; the volume register affects it too. AUDIO OUT delivers about 3 V p-p on a 6 V DC level into 1 kΩ; RES held low for ten cycles clears every register; Ø2 is nominally 1.0 MHz; the chip runs from +12 V and +5 V and dissipates about 600 mW (source: s-mos-6581-datasheet). The Programmer's Reference Guide reads these registers with PEEK(54272+27) and +28 (source: s-c64-prg-chapter-4-sound). Yannes's own view of the two readbacks: "probably never used since they could easily be simulated in software without having to give up a voice. For novice programmers they provided a way to create vibrato or filter sweeps without having to write much code (just read the value from the modulation register and write it back to the frequency register)"; 3 OFF exists "since you probably wouldn't want to hear the modulation source" (source: s-sidmusic-yannes-interview). EXT IN, in his words: "An external audio input could also be mixed in at the final amp or processed through the filter." (same source).
What $1B actually returns (Alstrup's measurements, 1995)#
asger-alstrup sampled $D41B once per clock cycle with a REU on a C64 and derived the generators behind it (source: s-sidmusic-alstrup-waveform-examinations):
- Triangle: the value "starts with value $00 and goes to $ff linearly. Then it goes from $ff to $00 linearly"; sawtooth:
00 … FFand wrap. The counter steps once every$8000 ÷ Fncycles (every cycle atFn = $8000, every second cycle at$4000…; at$FFFFit skips values), which gives a full 512-step triangle period of2^24 ÷ Fncycles — the datasheet'sFout = Fn × Fclk / 16777216. A value written withSTA $D412can be read back with the nextLDA $D41Bfour cycles later. - Noise: a 23-bit shift register, shifted once every
2^20 ÷ Fncycles (32 cycles at$8000, 16 at$FFFF, 256 at$1000), fed at bit 0 by bit 22 XOR bit 17, starting from$7FFFF8after a test-bit reset;$1Bshows register bits 22, 20, 16, 13, 11, 7, 4, 2 as its bits 7–0. The sequence repeats after about 8 million values (272 s at$8000), so every 8-bit value occurs equally often — a good but reproducible random source: reset it only once, sample after a key press and no faster than the shift rate, or pre-compute a table so voice 3 stays free for music (randomization-and-probability). - Still open in 1995: whether the analogue output at pin 27 is the same 8-bit staircase (oscilloscope users said "probably") and whether it is aligned to the Ø2 clock.
Both readbacks in released code (Tiny Sid, 2005)#
The 256-byte entries of the 2005 tiny-sid-compo are the wiki's clearest evidence that the two read registers were used for music and not only for measurement — precisely because at that size a programmer will let the chip do the work rather than spend bytes on code (source: s-sidin09-tiny-sid-256b):
$1Bas the sequencer's dice. Stefano Tognon's Random Ninja runs voice 3 at voice 1's pitch with waveform$81and$8Fin$D418(voice 3 off, full volume), and after every 64-byte pattern takes one bit of$D41Bto self-modify which second waveform voice 1 uses — "This gives some kind of life to the music". A Life in Hell's Crue Gurl Freestyle goes further and picks the next note position from it:lda $d41b / and #7 / sta pos, "a random way for generating the notes for save space" (randomization-and-probability).$1Cas a filter modulator. aleksi-eeben's Electronic derives the low-pass cutoff from voice 3's own envelope output:lda $D41C / lsr / adc #$20written to the cutoff high byte — exactly the datasheet's "harmonic envelopes, WAH WAH" suggestion, in a 256-byte tune twenty-three years later (filter-programming).
The designer's account (Yannes, 1996)#
bob-yannes described the chip's internals to andreas-varga by e-mail in August 1996 (sid-homepage) — the wiki's only first-hand account of what sits behind the registers above (source: s-sidmusic-yannes-interview for everything in this section unless noted otherwise).
- Goal: "a single-chip synthesizer voice which hopefully would find its way into polyphonic/polytimbral synthesizers". MOS was a merchant chip house; Sequential Circuits was once interested in buying the chip; C64 production consumed all of it. Yannes designed the machine too: "the Commodore 64 (which I also designed)".
- Team and time: SID work began in spring 1981 under Yannes, who "had been responsible for the design behind the VIC-20", with two technicians and a CAD operator; "the actual development of the SID took just 4–5 months" (source: s-sidmusic-creation-of-the-sid-chip).
- Signal path per voice: Oscillator → Waveform Generator → Waveform Selector → Waveform D/A → multiplying D/A (amplitude, driven by the Envelope Generator); the analog voice output goes through the multimode filter or bypasses it; a final 4-bit multiplying D/A is the master volume. "It's pretty brute-force, I didn't have time to be elegant."
- Oscillator: "a 24-bit phase-accumulating design of which the lower 16-bits are programmable for pitch control" — no wavetable on the chip; the accumulator bits feed the D/A through the selector. This is the counter behind the datasheet's
Fout = Fn × Fclk / 16777216and the one Alstrup measured above. - Waveforms: sawtooth = the upper 12 accumulator bits sent to a 12-bit D/A; triangle = "using the MSB of the accumulator to invert the remaining upper 11 accumulator bits using EXOR gates. These 11 bits were then left-shifted (throwing away the MSB) … so the resolution of the triangle waveform was half that of the sawtooth, but the amplitude and frequency were the same"; pulse = the upper 12 bits into "a 12-bit digital comparator" whose single output drives all 12 D/A bits; noise = "a 23-bit pseudo-random sequence generator (i.e., a shift register with specific outputs fed back to the input through combinatorial logic). The shift register was clocked by one of the intermediate bits of the accumulator to keep the frequency content of the noise waveform relatively the same as the pitched waveforms. The upper 12-bits of the shift register were sent to the Waveform D/A." — the 23-bit register Alstrup found by measurement.
- Combined waveforms, sync and ring modulation: see the control-byte and sync sections above — single-transistor multiplexers without lock-out, a logical AND of the bits, the noise generator locked up "by filling it with zeroes"; sync clears the accumulator on the previous oscillator's MSB, ring modulation substitutes that MSB into the triangle's EXOR.
- Filter: "a classic multi-mode (state variable) VCF design. There was no way to create a variable transconductance amplifier in our NMOS process, so I simply used FETs as voltage-controlled resistors to control the cutoff frequency. An 11-bit D/A converter generates the control voltage for the FETs (it's actually a 12-bit D/A, but the LSB had no audible affect so I disconnected it!)"; resonance is "controlled by a 4-bit weighted resistor ladder. Each bit would turn on one of the weighted resistors and allow a portion of the output to feed back to the input"; low-, band- and high-pass outputs exist simultaneously and analog switches select the combination — "a notch filter was created by enabling both the high and low-pass outputs simultaneously". His verdict and the reason for it are on filter-programming.
- Envelope: an 8-bit up/down counter with rates from a divider and a look-up table measured by ear on a Sequential Circuits Pro-1 — the full account is on adsr-envelope.
- Volume-register samples were an expected use, not only a discovered bug: "By stopping an Oscillator, it was possible to apply a DC voltage to this D/A. Audio could then be created by having the microprocessor write the Final Volume register in real-time. Game programs often used this method to synthesize speech or play 'sampled' sounds." (chip-samples)
- Dropped: "an exponential look-up table to provide a direct translation for the equal-tempered scale, but it took up too much silicon and it was easy enough to do in software anyway"; Rindeblad: a table "enabling it to interpret musical tones into frequency-datas … later removed, since it was too expensive" (source: s-sidmusic-creation-of-the-sid-chip). Every player's note table (sid-player-routine) is that table in software.
- Why three voices: the oscillators "were not multiplexed, therefore they took up a lot of chip area, constraining the number of voices I could fit on a chip"; Ensoniq's later multiplexed chips give "at least 32 voices per chip".
- The spec came before the silicon: "a SID spec. sheet (which I had written before SID prototypes even existed). Needless to say, the specs were not accurate" — Japanese games coded to it had "out of tune sounds and filter settings that produced only quiet, muffled sound". See c64-programmers-reference-guide.
Chip variants: 6581 vs 8580#
- 6581 (1982, the brown C64): "warm", louder waveforms with distortion; nonlinear filter; low-volume combined waveforms; a DC offset between channels that made sample playback possible by rapidly writing the volume register — the "phantom" fourth voice discovered by martin-galway and others (sources: s-chordian-sf2-instruments, s-newman-driving-the-sid-chip).
- 8580 (1986, the white 64C): "more balanced filter-cutoff frequency control curve and less-distorted resonance, better mixed-waveform support, and maybe more predictable ADSR envelope-handling" — yet "many consider the 6581 better"; the DC offset is gone, so volume-register samples are "all but inaudible" (sources: s-witchmaster-creating-chiptunes-with-sid-wizard, s-newman-driving-the-sid-chip).
- HVSC's format document states three differences in one paragraph — louder combined waveforms on the 8580, internal DC levels in the 8580 "so small that software or hardware tricks must be used to play volume samples", and a "totally different" filter — which is why
.sidfiles carry a SID-model flag (sid-format; source: s-hvsc-sid-file-format). In a 2012 tutorial's words: the 6581 sits in "the original 'breadbox' C64s, and early versions of the C64C", the 8580 in the later C64Cs; "each [6581] chip behaving in a unique way, whereas all 8580s will sound almost the same"; the 6581 filter reaches lower cutoffs and "has a bit more distortion"; "most people seem to prefer the 6581" (source: s-chipmusic-c64-music-for-dummies). - Editors switch models: GoatTracker
SHIFT+F8, SID Factory II's top-bar field (defaults to 8580), VICE's SID settings; SID-Maker's export has the old/new setting (sid-format). The book: "8580 has more effective filters but a thinner sound than the 6581 (it's still phat though)" — always check a tune on both. - Two later descriptions, one from a tracker manual and one from an enthusiast site: furnace — the 8580 has "working waveform mixing and somewhat more consistent filter curves"; the 6581 "produces a DC output with its intensity being regulated by the global volume register", usable as "a crude, virtual fourth 4-bit PCM channel", which the 8580 "fixed … making such PCM nearly inaudible" (source: s-furnace-c64-docs); commodore-64.eu — 6581 "12V (NMOS)", "warm, slightly distorted", filter "variable, chip-specific", more background noise; 8580 "9V (HMOS)", "clean, precise", filter "consistent, predictable", less noise; the "sample bug" ("a flaw in the volume register") heard in Ghostbusters and Arkanoid is "largely corrected" on the 8580 (source: s-commodore-64-eu-sid-chip; secondary — the 9 V/HMOS figure and the two game titles rest on it alone). Modern drop-in replacements (ARMSID, SwinSID Nano, SIDFX) are on commodore-64.
- Dates disagree: the "8580 (1986, the white 64C)" above follows Chordian's tutorial (s-chordian-sf2-instruments); commodore-64.eu says the 8580 "appeared in 1987 with later motherboard revisions" and dates Yannes's design to 1981 rather than the datasheet's 1982 (source: s-commodore-64-eu-sid-chip). Neither cites a document; the primary sources settle the design half — work began in spring 1981 and the chip shipped in the 1982 machine (sources: s-sidmusic-creation-of-the-sid-chip, s-sidmusic-yannes-interview) — but not the 8580's year: read "1986–87".
- Composer testimony on chip variation: jeroen-tel — "There were several versions of the SID-chip around, which varied a lot. But in the end I got hold of all C64 versions and could do some 'average' filter settings. But it remained different.." (source: s-sidmusic-jeroen-tel-interviews); the cause is the FET processing variation in the filter, above.
Telling the two chips apart from software#
A program can ask which SID it is sitting on and adapt. defmon's init routine "contains a piece of code that detects the SID model (6581 or 8580) in the machine"; it temporarily disables interrupts and restores the flag afterwards, which is the classic integration trap — init the tune before you install your raster IRQ, or expect a hiccup (source: s-defmon-wiki-calling-the-player, which points at Codebase64's "safe method" detection). defMON then uses the answer, hard-capping the filter cutoff at $0200 on a detected 8580 and $0000 on a 6581 "to make the chips behave more alike" (source: s-chipmusic-defmon-thread). For a second chip at an address you do not know, TLR's sid-detect2.prg scans the machine for SIDs (source: s-defmon-wiki-sync-and-stereo).
More than one SID in one machine#
A SID is mono (source: s-sidin08-catweasel-mk4), so the usual way to get stereo — and six or nine voices — is a second or third chip at another I/O address. defmon lets the second SID's base be $D4xx, $D5xx, $DExx or $DFxx, with the low byte steppable in $20 increments; $DF00 was iLKke's default while sid2sid users wanted $DE00, and frantic recommends the SIDFX board for stereo on real hardware (sources: s-defmon-wiki-sync-and-stereo, s-chipmusic-defmon-thread). Getting the address wrong is not harmless: "If the base address for the second SID is not correctly set up and you start playing the tune, RAM may be corrupted and the program might even crash."
What a second chip costs the software is the recurring theme. defMON implements stereo as a second full copy of the player in RAM, each hardcoded to one chip, to keep raster time down; 2SID tunes cannot be packed to an executable at all (only SID 1's data survives), so stereo stays editor and live material while releases stay mono; and frantic's verdict after seven years is "I'd say about 95% of all bugs I have fixed in defMON over the years were related to that [2sid support], directly or indirectly" (sources: s-chipmusic-defmon-thread, s-defmon-wiki-sync-and-stereo, s-defmon-wiki-releases — the stereo feature set is dated 2014-06-15).
hermit went to three, four years before sid-wizard. Between January and May 2008 he wrote "a tracker that can control 3 sid chips" on a real commodore-64, because three tracks were too few for his live music and the only 2SID editors he could find were "DMC 4.3 and Prophet64" — DMC where "it wasn't easy to make 2SID zaks, because of switching between SIDs", Prophet64 only as a demo without the sequencer. "And double framespeed was important too for me. So I decided to write a composer that's all in one for these desires. 3SID was the main new idea … I started it in Januray this year, finished this version in only 4 months." By then he owned eight C64s, one carrying three 8580s and one two 6581s (source: s-sidin12-hermit-interview; multispeed).
History#
Yannes was hired "because my knowledge of music synthesis was deemed valuable"; he thought existing chips were "primitive"; MOS manager Winterble called the design "20 times better than it needs to be". The specification was written before finished silicon and the chip behaves in undocumented ways — which the composer-programmers exploited (source: s-newman-driving-the-sid-chip). "It's still a mystery in some aspects what the chip exactly does inside", hence reverse-engineering projects such as reSID and the 1541 Ultimate's VHDL (source: s-witchmaster-creating-chiptunes-with-sid-wizard). commodore-64.eu's two claims — that Yannes designed the chip "in 1981" and "later co-founded Ensoniq" (source: s-commodore-64-eu-sid-chip; secondary) — are confirmed by the primary sources: "Project C64" was first discussed at Commodore in January 1981 as a game computer, SID work began in spring 1981 and "took just 4–5 months" (source: s-sidmusic-creation-of-the-sid-chip), and Yannes co-founded Ensoniq after leaving Commodore (source: s-sidmusic-yannes-interview) — see bob-yannes. The SID/VIC-II/C64 schedule was "incredibly tight (some would say impossibly tight)--we did things faster than Commodore had ever done before and were never able to repeat after!" (source: s-sidmusic-yannes-interview).
Two composers' verdicts and the designer's, from the interviews: martin-galway (2001) named the filter both his favourite feature and his "worst memory", described the envelope bug as "Certain ADSR settings totally screw up and play too early – as I recalled it was with long attacks and long decays. The key-on/key-off circuitry had a problem, evidently. I called it the school band effect" (hard-restart), and regretted never having exploited everything the chip could do; an Ensoniq visitor had told him the team "had hardly any time to work on that part of the SID" and had added "esoteric capabilities – in the name of a long feature list for Jack Tramiel – … so they never debugged them" (source: s-remix64-galway-interview). Yannes in 1996 had not heard rob-hubbard, Galway, Tim Follin or jeroen-tel, learned of SIDPLAY and PlaySID from andreas-varga's site, still owned "a couple" of C64s including the portable, and was "constantly amazed and gratified" at the chip's continued use (source: s-sidmusic-yannes-interview).
A Lemon64 poster of 2020 summed up the composer's view of the same silicon — "29 parameters", "a lot happening and consistenly changing every 50th of a second" — and got NM156's reply: "there are only 4 waveforms, and typically waveforms only change a couple of times per instrument (if at all) It's in the overall composition" (source: s-lemon64-learning-sid-sound-design).
The chip's reputation among composers is that of a synthesizer rather than a beeper, and jeroen-tel credits one person with establishing that: Galway "is the guy who really used the Commodore 64 SID chip as a synthesizer", able to stretch "a single music theme over so many minutes of time without it getting boring", where rob-hubbard emulated styles and mimicked real instruments — "bassguitar, electric guitar, drums, violin and piano" — and was "extremely catchy and very 'to the point'" (source: s-hugi38-interview-jeroen-tel). Tel himself learned the chip inside somebody else's driver: "I even hacked into Hubbard's routine to compose music in machine-code, since I didn't have my own music driver yet" (same source; sid-player-routine). Galway's own summary of what the silicon means to the music is flat: "I will never do rearrangements of those tunes on other instruments, the SID is what they're meant to be heard on" (source: s-sidmusic-galway-interviews).
A composer's list of loves and hates, from goto80 in 2002: against — the envelope bug, the differences between new and old SID and between individual chips ("listening to my tunes on an old SID is not a good idea at all"), and "the noise from the C64"; for — "ringmodulation, knee-deep pulsemodulating bass sounds and the freedom of the SID", and the constraint itself: "it's fun working with such hardcore limits, forcing you to realize your ideas in other ways" (source: s-remix64-goto80-interview; ring-modulation-and-sync, pulse-width-modulation).
Contradictions between sources#
- AND-ed waveforms: Rindeblad's column lists "the chip can perform a logical AND on different waveforms" as an error in the documentation (source: s-sidmusic-creation-of-the-sid-chip); Yannes says the combination "was actually a logical ANDing of the bits of each waveform" (source: s-sidmusic-yannes-interview), as does the datasheet (source: s-mos-6581-datasheet). The wiki follows the designer and the datasheet.
- "32 voices": Newman writes that Yannes's "original plan had been to make use of 'multiplexed' oscillators to provide up to 32 separate voices" (source: s-newman-driving-the-sid-chip, via Bagnall); in 1996 Yannes says only that the oscillators were not multiplexed "due to time constraints", which constrained the voice count, and that Ensoniq's multiplexed chips reach "at least 32 voices" (source: s-sidmusic-yannes-interview) — 32 is what came later, not a stated SID target.
- Design year: "1982" (the datasheet, Newman) and "spring 1981 … 4–5 months" (Rindeblad) describe the same project from its shipping and from its start; the wiki writes 1981–82 (sources: s-mos-6581-datasheet, s-newman-driving-the-sid-chip, s-sidmusic-creation-of-the-sid-chip).
- The OSC3/ENV3 readback "was never used": Furnace's manual (source: s-furnace-c64-docs) and, more cautiously, Yannes himself ("probably never used"; source: s-sidmusic-yannes-interview) vs. the Programmer's Reference Guide's examples, Alstrup's measurements, and — the strongest counter-evidence, because it is released music — three of the 2005 tiny-sid-compo entries, which use
$D41Bas a note and waveform randomiser and$D41Cas a filter-cutoff modulator (sources: s-c64-prg-chapter-4-sound, s-sidmusic-alstrup-waveform-examinations, s-sidin09-tiny-sid-256b). Read "never used" as "rarely used in released music, and then mostly where code size mattered more than a voice". - 8580 year: 1986 vs 1987 — see Chip variants above.
What the 1980s composers ran into#
- 8580 and samples: in the summer of 1988 chris-huelsbeck "noticed that the new 8580 revision of the SID chip played samples too quietly and decided to improve on the analog SID sounds instead" — the origin of tfmx; on great-giana-sisters "the percussion of Title is quiet" on an 8580, while "the bass of all songs and the melody of Castle sound different on every 6581 because it uses SID's infamous filter" (chip-samples, filter-programming; source: s-vgmpf-soundmonitor-tfmx).
- Filter variance: Hülsbeck "highlights the pulse width modulation, but dislikes how unpredictable the filter sounds on every machine"; in VICE 3.2 most of his songs "sound best with 6581 (reSID) and a bias of 180", except where a melody disappears and "individual filter settings have to be found" (sources: s-vgmpf-chris-huelsbeck, s-remix64-huelsbeck-interview).
- The ceiling: matt-gray bought a C64 in 1985 "once I'd heard the SID chip and, specifically at that time, Ghostbusters" — the volume-register percussion above — and left it the same way, by exhausting it: by 1990 "I was starting to find a threshold with the SID that I couldn't push beyond … just slightly bored with three channels", as samplers became affordable (source: s-c64com-matt-gray-interview).
6581 or 8580, asked in SIDin (2003–2010)#
- stephan-schmid (HVSC crew, 2003): "I like both chips, each one has its advantages. Samples and filters on the 6581, the combined waveforms and the generally clearer sound on the 8580" — so he kept a breadbox and a C64-II side by side and dreamed of one machine with both SIDs switchable while running, because a demo can carry tunes for each: in 64ever's Insomnia "Jeff's tunes heavily use the 6581 filters and really sound much better on the old SID, whereas Vip's tunes should really be listened to on a 8580" (source: s-sidin03-schmid-interview).
- chris-huelsbeck (2004): "There is only one true original and later C64 revisions where not as good with playback of samples, but the SID voices by themselves didn't sound that much different to me..." (source: s-sidin05-huelsbeck-interview).
- hermit (2008), who owned machines with both: "the 8580 is more accurate, but 6581 has good bass-filter behavior for older compositions. I prefer 8580" (source: s-sidin12-hermit-interview).
- tsm (2010) votes 8580 on consistency and on reliability: it "allows more combined waveforms. It is also very consistent, as every 8580 sounds the same, unlike the 6581", and 6581s "are very fragile. They often fail and sometimes they only work partially" — so a listener may "curse the author of a tune for the horrible sounds" that are really a dying chip (source: s-sidin13-tsm-freedom-interview).
- freedom (2010) trades filter depth for cleanliness and gains a technique: the 8580 has "way too open filters but it features cleaner waveforms and it has less noise", and because switching filter type does not click on it, "it is possible to change filter type on an instrument while a note is being played"; also "I do love $51 waveform on 8580" — the triangle+pulse combination that is the one clearly audible on both chips (source: s-sidin13-tsm-freedom-interview; see Filter and Waveform / control byte above).
The chip outside the C64#
Driven from a PC: the Catweasel Mk4 tests (2005–06)#
Stefano Tognon's two sidin articles on the catweasel Mk4 — a PCI card with two SID sockets — are the wiki's one account of driving real 6581s from a PC, and of what goes wrong (sources: s-sidin08-catweasel-mk4, s-sidin09-catweasel-6581):
- What a SID needs besides its registers: the right PAL/NTSC clock, register writes "at the same time the real C64 puts it into the sid", and "some external capacitors for filters that are like in C64, otherwise the filter (of the same chip) will have different behavior" — the card supplies clock and capacitors in hardware and a timed command buffer for the writes.
- Two 6581s, same symptoms: with a 1986 chip that "sound perfectly" in a C64, Ocean Loader 4/5 played "almost 99%", Tusker about 75%, Last Ninja 2 "40% right" (volume drops, silences); a 1984 chip, "not so clean" even in a C128, gave the "Same muting/distortion problem" — so the card, not the chips. Tognon's reading of the drop-outs: the envelope bug triggered by imprecise timing in tunes "without a proper hardrestart" (hard-restart).
- Filtered voices can vanish: Nulone (Starlost) was silent for 20 seconds because voices 1 and 2 run through a low-pass filter sweeping from cutoff
$3a8downward; with the$D417writes patched out of the file both voices returned — "So the problem for this is filter related". His candidate causes are the ones any filter-dependent tune faces on unknown hardware: the driver, a chip whose filter is "out of a middle standard sid", jumper settings, the capacitors (filter-programming). - Practical: the SID is mono, so the card puts chip 0 on the right channel and chip 1 on the left; a driver can pick the chip from the
.sidmodel flag (sid-format).
Two composers' verdicts from the same issues: nata prefers the 8580 — "a heavily improved SID", with "very nice waveform combinations and filters that are accurate" — but notes that old tunes with "odd filter settings" (Ghouls 'n' Ghosts subtune 6, The Last Ninja subtune 9) "aren't audible on a new SID", and refits filters when covering them (source: s-sidin09-nata-interview); aleksi-eeben takes the 6581 "definately. It's the SID sound for me", and judges reSID "quite accurate except for the filter. This could be improved a lot by trying different cliptables before the filter input" (source: s-sidin08-eeben-interview).
In a MIDI synthesizer: MIDIbox SID#
Thorsten Klose's MIDIbox SID is a DIY MIDI synthesizer built around real SID chips, and it inherits the chip's problems along with its sound (source: s-ucapps-wavetable-sounds-tutorial-1 for this section).
- It uses "wavetable" in the C64 sense, and says so: "a synthesis method, where the waveform and frequency of a SID voice is modulated so fast, that the resulting output sounds like a new waveform, which is originally not provided by the soundchip itself. The parameter changes are stored in a table … the technique is not related to 'wavetable synthesis', which is based on audio samples" (wavetable-programming).
- Its patches are therefore ripped from C64 tunes frame by frame. Klose's worked example takes the bass drum of rob-hubbard's Auf Wiedersehen Monty out of a siddump trace — five 20 ms frames: gated triangle, then noise, then pulse, then pulse with the gate released while the pitch keeps falling — because "In SID tunes, wavetable sequences are mostly divided into frames of 20 mS", the players being "called from a rasterline interrupt" (instrument-design).
- The port also has to reproduce what the C64 gets for free: the wavetable rate must be slowed to 20 ms per step, ADSR values scaled, and the last step made to zero the envelope registers "in order to avoid 'ADSR hick-ups', which can happen due to a silicon bug in the SID soundchip" — hard-restart in a MIDI synthesizer, for the same reason and by the same means as on the C64. See Envelope above for the 30 ms figure.
Emulation and replacement chips in the SIDin news (2003–2008)#
- reSID milestones (Dag Lem): 0.14 (2003-01-14) emulated the external audio input — "now we can have 8580 sample listen as with a external resistance" — and refined the exponential counter; 0.15 (2003) removed "the last know bug", which affected the duration of the ADSR delay bug; 0.16 (2004-06-11) fixed a one-cycle error in that emulation and made high-quality resampling run in real time (adsr-envelope, hard-restart; source: s-sidin-news-digest).
- The 6581's nonlinearities, measured in 2007: Antti Lankila's patch to reSID (February 2007) modelled what the linear filter missed — "Filter distorts high volume sounds a LOT"; "Filter resonance frequency shifts up if the intensity of sound grows, up to roughly 1 full octave"; on his 6581R4 a cutoff value of 1024 gave "approximately 1.1 kHz" where reSID's table said 4.6 kHz; filtered outputs are "4.5 to 6 dB quieter than unfiltered outputs"; a filter-calculation-order bug was "confirmed by Dag Lem and fixed in ReSID upstream". It cost ~20 % of an AMD64 3200+ and broke the 8580 model; it became the reSID-fp engine of goattracker 2.68 and of Sidplayw 2.5 (filter-programming; source: s-sidin-news-digest).
- Timing: HVSC's 2004 re-timing of ~500 multispeed tunes rests on the PAL frame being
$4CC7cycles (50.125 Hz), not$4CF9(multispeed; source: s-sidin-news-digest). - The first SwinSID (2005–06): "16-bit stereo hardware sound module for C64" in the SID socket with "almost full" software compatibility, 3 main + 3 effect channels, wavetable synthesis, 9 instruments in flash, a 31.25 kHz DAC; the SwinSID2 specification promised 8 voices, 16 waveforms and one global filter but "Requires special software to work" — the ancestors of the SwinSID Nano on commodore-64 (source: s-sidin-news-digest).
"Not as good as the real thing": what emulation still misses#
Every source in the wiki that has both a real chip and an emulator says the same thing in a different decade, and each names a different missing piece.
- hermit (2008) names two: "Vice is a very good emulator, but SID emulation isn't as fully good as the real. Analogue filter is important, the other important is the note-frequency dependent samplerate of the SID (44100 Hz is weak for pure analogue)" (source: s-sidin12-hermit-interview).
- goto80 (2002) signs off an interview with "Don't imitate, innovate — fuck emulators", having composed on a real C64 with a "new sid" (8580), 1541 and 1581 drives, an Action Replay 6 and JCH's NewPlayer 20.G4 (source: s-remix64-goto80-interview).
- frantic built defmon as a native C64 program for the same reason — "because then you can work on the real chip and the proper SID sound while you work. I was never really tempted to do a PC/Mac editor" — and on chasing real 6581s in software: "It's like a fractal maze that drives you more mad the closer you try to get to it" (2020-09-23). Its users pick their emulator by which flaw they need modelled: vice 2.4 with reSID-fp for the filter sound, 3.x for the ADSR quirks (source: s-chipmusic-defmon-thread).
- The counter-practice, and the honest use for it: Ryan Oles set VICE up on a Pocket CHIP in 2019 specifically to practise defMON without giving a real C64 desk space, and arrived at the same verdict from the other side — the sound is good "but not as good as running this on an actual SID chip", with hiccups on complex tracks, so not for performance or long in-depth work, but "especially useful in experimenting with and constructing instruments and effects in the SID tab" (source: s-electropizza-defmon-vice-chip). The emulator is where you learn the register map; the chip is where you judge the sound.
Sampled#
little-scale recorded a basic 8580 sample pack in 2009 — every C and G from C-2 to G6 for triangle, sawtooth, pulse (duty ≈ 50 %) and noise, "recorded from C64 hardware directly using a custom designed interface", released without restriction from 2010. It documents the 8580 specifically, the later and cleaner revision, and only the bare waveforms: no filter, no ring modulation or sync, one duty cycle (source: s-little-scale-chip-sample-packs; see chip-samples).
Clocked by a Game Boy#
Two 2008 links between the two focus platforms, both little-scale's: a C64 filter sequencer clocked from lsdj's master sync output, and nanoSync24, which feeds nanoloop a Sync24 signal "so that the C64 is controlling the speed of Nanoloop" — the C64 as master in one and slave in the other (sources: s-little-scale-syncing-things-to-lsdj, s-little-scale-sync-options-for-game-boys; see sync).
Related#
commodore-64 · sid-wizard · goattracker · sid-factory-ii · furnace · siddump · sid-format · adsr-envelope · instrument-tables · bob-yannes · c64-programmers-reference-guide · ring-modulation-and-sync · filter-programming · randomization-and-probability · sid-homepage · andreas-varga · martin-galway · jeroen-tel · defmon · cheesecutter · hermit · soundmonitor · galway-player · matt-gray-player · chip-samples · tiny-sid-compo · catweasel · vice · hard-restart · goto80
Sources#
s-sid-wizard-manual · s-goattracker-readme · s-witchmaster-creating-chiptunes-with-sid-wizard · s-chordian-sf2-instruments · s-newman-driving-the-sid-chip · s-lemon64-hard-restart-threads · s-mos-6581-datasheet · s-c64-prg-chapter-4-sound · s-hvsc-sid-file-format · s-chipmusic-c64-music-for-dummies · s-furnace-c64-docs · s-commodore-64-eu-sid-chip · s-sidmusic-alstrup-waveform-examinations · s-chipmusic-sid-music-hints-n-tips · s-lemon64-learning-sid-sound-design · s-sidmusic-yannes-interview · s-sidmusic-creation-of-the-sid-chip · s-sidmusic-jeroen-tel-interviews · s-remix64-galway-interview · s-vgmpf-soundmonitor-tfmx · s-vgmpf-chris-huelsbeck · s-remix64-huelsbeck-interview · s-sidin03-schmid-interview · s-sidin05-huelsbeck-interview · s-sidin09-catweasel-6581 · s-sidin08-catweasel-mk4 · s-sidin09-nata-interview · s-sidin08-eeben-interview · s-sidin-news-digest · s-little-scale-syncing-things-to-lsdj · s-little-scale-sync-options-for-game-boys · s-little-scale-chip-sample-packs · s-64er-soundmonitor-article · s-c64com-matt-gray-interview · s-cheesecutter-guide · s-chipmusic-defmon-thread · s-chordian-my-computer-chronicles · s-chordian-player-editor-notes · s-defmon-wiki-calling-the-player · s-defmon-wiki-manual · s-defmon-wiki-releases · s-defmon-wiki-sync-and-stereo · s-electropizza-defmon-vice-chip · s-hugi38-interview-jeroen-tel · s-little-scale-microtonal-compilation · s-realdmx-galway-arkanoid-player · s-remix64-goto80-interview · s-sidin04-ripping-basic-rsid · s-sidin09-tiny-sid-256b · s-sidin12-hermit-interview · s-sidin13-tsm-freedom-interview · s-sidin15-serpent-demo-player · s-sidmusic-galway-interviews · s-ucapps-wavetable-sounds-tutorial-1