reSID
Dag Lem's software emulation of the sid chip — the engine inside vice, goattracker and the sidplay2 branch of the sidplay player family, and the source code in which the SID's envelope ("ADSR delay") bug is documented. What the wiki knows about it comes from tool manuals, player release news and composers' verdicts, not from a reSID manual of its own.
Facts#
- Written by dag-lem: the goattracker readme credits "Dag Lem (reSID)" and "Antti Lankila (reSID distortion)" among its collaborators (source: s-goattracker-readme), and sidplay2 "emulates the SID much more accurate than SIDPLAY" because "it uses Dag Lem's reSID engine" — though the old SIDPLAY kept the channel-muting mixer that sidplay2 lacks (source: s-ucapps-wavetable-sounds-tutorial-1).
- The ADSR delay bug lives in its source. The bug's effects "have been reverse engineered by Dag Lem, and documented in the source code of reSID", including a gate delayed "up to ca. 30mS" (source: s-ucapps-wavetable-sounds-tutorial-1); the Lemon64 hard-restart discussion points readers to reSID's
envelope.haround line 118, "also in VICE", and notes the bug is "completely deterministic from an emulators point of view" (source: s-lemon64-hard-restart-threads). - Version history (from sidin's news pages, source: s-sidin-news-digest):
- 0.13 shipped in SIDPLAY for Mac OS X 3.1.2 (2003-04-13), which offered the "First-ever graphical adjustment of reSID's filter emulation".
- 0.14, 2003-01-14: "The SID external audio input is now emulated: now we can have 8580 sample listen as with a external resistance"; filter settings applied immediately on a model change; "improvement in exponential counter emulation".
- 0.15, 2003: "The last know bug of the Resid engine is now removed. This bug affects the Delay ADSR bug duration" (suggested test tunes: Revenge, SurSumTheme).
- 0.16, 2004-06-11: fixed "a one cycle error in the ADSR delay bug emulation" (fast sampling only); resampling "highly optimized and streamlined for vectorizing compilers" with Laurent Ganier, so "High quality resampling can now be run in real time on off-the-shelf hardware".
- reSID-fp: in February 2007 Antti Lankila patched the "ReSID engine in libsidplay2-2.1.1" to model the 6581's nonlinearities — filter distortion at high volume, resonance frequency shifting up to about an octave with signal intensity, filtered outputs "4.5 to 6 dB quieter than unfiltered outputs", and a 6581 cutoff table he measured as wrong (cutoff value 1024 gave "approximately 1.1 kHz" where reSID's table said 4.6 kHz); a filter-calculation-order bug was "confirmed by Dag Lem and fixed in ReSID upstream". It cost about 20 % of an AMD64 3200+ and broke the 8580 model; it was integrated as reSID-fp in goattracker 2.68 and as "v32" in Sidplayw 2.5 (source: s-sidin-news-digest).
- In VICE the SID engines rank FastSID (fastest, least accurate) < ReSID < reSID-fp (most accurate, most CPU); 4mat recommends reSID-fp for "filter distortion, compression, general ADSR accuracy" (source: s-chipmusic-c64-music-for-dummies). The Witchmaster SID-Wizard guide's VICE chapter likewise sets ReSID with the interpolating sample method (source: s-witchmaster-creating-chiptunes-with-sid-wizard). chris-huelsbeck found most of his songs "sound best with 6581 (reSID) and a bias of 180" in VICE (source: s-vgmpf-chris-huelsbeck).
- Accuracy caveats from its users: the GoatTracker readme warns "the reSID emulation is in some cases quite far from the output of a real SID. Especially if filters are in use" — test on a C64 or HardSID (source: s-goattracker-readme); aleksi-eeben: "reSID is 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 cross-composing workflow: nata's 2006 recipe for GoatTracker sounding right on hardware — "You just have to use 8580 emulation and reSID interpolation turned on" (source: s-sidin09-nata-interview); GoatTracker 2.47 added an "experimental random delay to write of reSID register, in order to make potential ADSR-bugging on C64 audible" (
/Z) (source: s-sidin-news-digest). - As an editor's default engine: cheesecutter links it directly — "reSID engine by Dag Lem & A. Lankila. Parts of reSID interface (sid.cpp) by Cadaver / CovertBitops" in its README — and makes reSID-fp the default, with
ccutter -nofpto fall back to plain reSID,-fpr xto choose a filter preset ("x = 0..16 for 6581 and 0..1 for 8580"),-ito drop interpolation for speed and-m 0|1for the chip model (source: s-cheesecutter-repo-and-releases). - Cost in 2005: on a 266 MHz PC, xsidplay took 30 % CPU with reSID (fast mode) against 15 % with a hardware catweasel card (source: s-sidin09-catweasel-6581).
- Still the reference in 2026: duet vendors reSID under its GPL-2.0-or-later license, drives up to four reSID chips (each 6581 or 8580) as pattern columns plus four more in its DUST synth, and verified its SID-Wizard engine register-for-register against the original through reSID (source: s-duet-readme).
An accuracy datum from DUET's wasm build#
- reSID's whole sample path is integer arithmetic,
resamplequality included: duet's A/B of the same engine compiled natively and to WebAssembly renders SID-Wizard modules byte-identically across the two platforms (only float-DSP paths using libmsin/exp/cosdiffer, by ≤ 1 LSB) — floating-point differences between platforms cannot touch reSID's output (source: s-duet-docs-libduet).
Related#
dag-lem · sid · vice · goattracker · sidplay · hard-restart · adsr-envelope · filter-programming · catweasel · duet
Sources#
s-sidin-news-digest · s-goattracker-readme · s-ucapps-wavetable-sounds-tutorial-1 · s-lemon64-hard-restart-threads · s-chipmusic-c64-music-for-dummies · s-sidin08-eeben-interview · s-sidin09-nata-interview · s-sidin09-catweasel-6581 · s-vgmpf-chris-huelsbeck · s-duet-readme · s-witchmaster-creating-chiptunes-with-sid-wizard · s-duet-docs-libduet · s-cheesecutter-repo-and-releases