How Your SID May Not Be As Tuneful As You’d Like

The MOS Technologies 6581, or SID, is perhaps the integrated circuit whose sound is most sought-after in the chiptune world. Its three voices and mix of waveforms define so much of our collective memories of 1980s computing culture, so it’s no surprise that modern musicians seek out SID synthesisers of their own. One of these is the MIDISID, produced by [MIDI IN],  and in a recent video she investigates an unexpected tuning problem.

It started when she received customer reports of SIDs that were out of tune, and in the video she delves deeply into the subject. The original SID gained its timing from a clock signal provided by the Commodore 64, with thus different timing between NTSC and PAL versions of the machine. This meant European SID music needed different software values to American compositions, and along the way she reveals a localisation error in that the British Commodore 64 manual had the wrong table of values.

Modern SIDs are emulated unless you happen to have an original, and her problem came when switching from one emulated SID to another. The first one used that clock pin while the second has its own clock, resulting in some music being off-tune. It’s a straightforward firmware fix for her, but an interesting dive into how these chips worked for the rest of us.

Image: Taras Young, CC BY-SA 4.0.

5 thoughts on “How Your SID May Not Be As Tuneful As You’d Like

  1. One of the SIDs in my 13 C64s also has a slight defect where one of the voices occasionally plays sour notes – out of tune by up to a note and a half. I need to use the SID test program on it and see if there’s irregularities in the sweep on one voice. Kinda odd that this only happens every now and again and only on some tunes, but at least it’s reproducible.
    (I also have two where if you use Attack on voice 1, that voice disappears completely – that’s also only noticeable on some tunes)

    1. The SIDs were very fragile to begin with, I think.
      I guess they could take damage when joysticks/paddles weren’t okay?
      The X/Y pins on the joystick ports connected to the SID and were used for paddle and analog mouse support.
      Also, the filters..The first type, the 6581, technically was broken but games/demod were programmed for the flaw(s),
      thus did sound wrong on later versions that were fixed.
      Then there’s that a** poor Commodore power supply of the C64, the early elephant foot type.
      It provided overvoltage not seldomly and likely stressed or even damaged the C64 components.
      Maybe it caused SID chips to fail, too. Not sure.

  2. The SID also was used in IBM PC soundcards, in The Entertainer and the Innovation Sound Standard..
    The latter, the SSI-2001, had been re-built in the past few years.

    There are a few games from the 1980s and early 90s supporting it, as well as some music players.
    The latter can be run on DOS to play SID music.

    Here’s a video of Ultima VI with SID music (as an example, not mine):
    https://www.youtube.com/watch?v=4JdUdZi97S0

    For Windows 3.1 and up, there’s an emulator named SIDPlay for Windows.
    It doesn’t use dedicated hardware, but an older 6510/SID emulation code.

    Last but not least, there used to exist an ISA/PCI card for PC named Catweasel.
    It contained an Amiga compatible floppy controller, C64 joystick ports and one or two sockets for SID chips, I think. Drivers for DOS existed, as well.

    More information about SSI-2001 (not affiliated):
    https://en.wikipedia.org/wiki/Innovation_SSI-2001
    https://nerdlypleasures.blogspot.com/2014/01/sid-and-dos-unlikely-but-true-bedfellows.html?m=1

  3. KungFuSID appears to be open source, hopefully someone can raise an issue with them or even fix the bug so that the tuning better matches what real HW would do. This would probably involve playing some games with the timer prescaler, which right now is set to 84 to give exactly 2MHz, but probably needs to be ~2.045(NTSC) or ~1.97(PAL). Prescalers of 82 or 85 would be closer (actually within 6 cents) and by arranging to alternate between two adjacent prescalers you’d add ~6ns of jitter but could get as close as you like to the target frequency.

  4. On a tangent, there’s good SID emulation available in vst and libsid. I’ve always wanted to write a 2A03 or SID emulation which captures errors and glitches like this. The vst will output a clean digital waveform vs the IR of the real thing having more nonlinearities. Temperature of operation woild be great, the 6502+2A03 combo behaved erratically when overheated making glorious glitch noise.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.