Changes
SID
,/* Links */
The Sound Interface Device (SID) is a sound chip designed by MOS Technology in 1981. It is the "legendary" sound chip used by the [[Commodore 64]].
It was indeed better than the [[AY]] used in many other computers of the era (Amstrad's too) because it could produce many different (3) wave signal signals while AY could only produce rectangular wave signals.
Make your own judgment: [https://youtu.be/_LWbnjvXN4g AY vs SID sound comparison]
"SID" refers to a SIDfile, *.SID, too. Now playable -with some less quality- on CPC with Geco's Player. [httphttps://www.hvsc.c64.org/ SID Resource sitedownload/C64Music/DOCUMENTS/SID_file_format.txt SID File Format]
<br>
* three separately programmable independent audio oscillators (8 octave range, approximately 16 - 4000 Hz)
* four different waveforms per audio oscillator : pulse (with variable duty cycle), sawtooth, triangle, pulse, noise). Multiple waveform types may be selected simultaneously, which produces certain complex/combined waveforms.
* one multi mode filter featuring low-pass, high-pass and band-pass outputs with 6 dB/oct (bandpass) or 12 dB/octave (lowpass/highpass) rolloff. The different filter-modes are sometimes combined to produce additional timbres, for instance a notch-reject filter.
* three attack/decay/sustain/release (ADSR) volume controls, one for each audio oscillator.
* external audio input (for sound mixing with external signal sources)
* random number/modulation generator
<br>
==Technical details==
The SID is a mixed-signal integrated circuit, featuring both digital and analog circuitry. All control ports are digital, while the output ports are analog. The SID features three-voice synthesis, where each voice may use one of at least five different waveforms: square wave (with variable duty cycle), triangle wave, sawtooth wave, pseudo-random (but not white) noise, and certain complex/combined waveforms when multiple waveforms are selected simultaneously. A voice playing Triangle waveform may be ring-modulated with one of the other voices, where the triangle waveform's bits are inverted when the modulating voice's msb is set, producing a discontinuity and change of direction with the Triangle's ramp. Oscillators may also be hard-synced to each other, where the synced oscillator is reset whenever the syncing oscillator's msb raises.
Each voice may be routed into a common, digitally controlled analog 12dB multistate filter, which is constructed with aid of external capacitors to the chip. The filter has lowpass, bandpass and highpass outputs, which can be individually selected for final output amplification via master volume register. Using a combined state of lowpass and highpass results in a notch (or inverted bandpass) output. The programmer may vary the filter's cut-off frequency and resonance. An external audio-in port enables external audio to be passed through the filter.
The ring modulation, filter, and programming techniques such as arpeggio (rapid cycling between 2 or more frequencies to make chord-like sounds) together produce the characteristic feel of SID music.
Due to imperfect manufacturing technologies of the time and poor separation between the analog and digital parts of the chip, the 6581's output (before the amplifier stage) was always slightly biased from the zero level. By adjusting the amplifier's gain through the main 4-bit volume register, this bias could be modulated as PCM, resulting in a "virtual" fourth channel allowing 4-bit digital sample playback. The glitch was known and used from an early point on, first by Electronic Speech Systems to produce sampled speech in games such as Impossible Mission (1983, Epyx) and Ghostbusters (1984, Activision). The first instance of samples being used in actual musical compositions was by Martin Galway in Arkanoid (1987, Imagine), although he had copied the idea from an earlier drum synthesizer package called Digidrums. The amount of sampled sound possible to store on a fraction of 64 kilobytes was very limited. Also, it was hugely CPU intensive - one had to output the samples very fast (in comparison to the speed of the 6510 CPU).
The better manufacturing technology in the 8580 used in the later revisions of Commodore 64C and the Commodore 128DCR caused the bias to almost entirely disappear, causing the digitized sound samples to become very quiet. Fortunately, the volume level could be mostly restored with either a hardware modification (biasing the audio-in pin), or more commonly a software trick involving using the Pulse waveform to intentionally recreate the required bias. The software trick generally renders one voice temporarily unusable, although clever musical compositions can make this problem less noticeable.
At the X'2008 demo party, a completely new method of playing digitized samples was unveiled. The method allows for an unprecedented four (software-mixed) channels of 8-bit samples with optional filtering on top of all samples, as well as two ordinary SID sound channels. The method works by resetting the oscillator using the waveform generator test bit, quickly ramping up the new waveform with the Triangle waveform selected, and then disabling all waveforms, resulting in the DAC continuing to output the last value---which is the desired sample. This continues for as long as two scanlines, which is ample time for glitch-free, arbitrary sample output. It is however more CPU-intensive than the 4-bit volume register DAC trick described above. Because the filtering in a SID chip is applied after the waveform generators, samples produced this way can be filtered normally.
The original manual for the SID mentions that if several waveforms are enabled at the same time, the result will be a binary AND between them. What happens in reality is that the input to the waveform DAC pins receive several waveforms at once. For instance, the Triangle waveform is made with a separate XOR circuit and a shift-to-left circuit. The top bit drives whether the XOR circuit inverts the accumulator value seen by the DAC. Thus, enabling triangle and sawtooth simultaneously causes adjacent accumulator bits in the DAC input to mix together. (The XOR circuit does not come to play because it is always disabled whenever the sawtooth waveform is selected.) The pulse waveform is built by joining all the DAC bits together via a long strip of polysilicon, connected to the pulse control logic that digitally compares current accumulator value to the pulse width value. Thus, selecting the pulse waveform together with any other waveform causes every bit on the DAC to partially mix together, and the loudness of the waveform is affected by the state of the pulse.
The noise generator is implemented as an XOR shift register. When using noise waveform simultaneously with any other waveform, the pull-down via waveform selector tends to quickly reduce the XOR shift register to 0 for all bits that are connected to the output DAC. As the zeroes shift in the register when the noise is clocked, and no 1-bits are produced to replace them, a situation can arise where the XOR shift register becomes fully zeroed. Luckily, the situation can be remedied by using the waveform control test bit, which in that condition injects one 1-bit into the XOR shift register. Some musicians are also known to use noise's combined waveforms and test bit to construct unusual sounds.
The 6581 and 8580 differ from each other in several ways. The original 6581 was manufactured using the older NMOS process, which used 12V DC to operate. The 8580 was made using the HMOS-II process, which required less power (9V DC), and therefore made the IC run cooler. The 8580 was thus far more durable than the 6581. Also, due to stabler waveform generators, the bit-mixing effects are less noticeable and thus the combined waveforms come close to matching the original SID specification (which stated that they will be combined as a binary AND). The filter is also very different between the two models, with the 6581 cutoff range being a relatively straight line on a log scale, while the cutoff range on the 8580 is a straight line on a linear scale, and is close to the designers' actual specifications. Additionally, a better separation between the analog and the digital circuits made the 8580's output less noisy and distorted. The noise in 6xxx-series systems can be reduced by disconnecting the audio-in pin.
The consumer version of the 8580 was rebadged the 6582, even though the die on the chip is identical to a stock 8580 chip, including the '8580R5' mark. Creative Micro Designs used it in their SID Symphony expansion cartridge, and it was used in a few other places as well, including one PC sound-card.
Despite its documented shortcomings, many SID musicians prefer the flawed 6581 chip over the corrected 8580 chip. The main reason for this is that the filter produces strong distortion that is sometimes used to produce simulation of instruments such as a distorted electric guitar. Also, the highpass component of the filter was mixed in 3 dB attenuated compared to the other outputs, making the sound more bassy. In addition to nonlinearities in filter, the D/A circuitry used in the waveform generators produces yet more additional distortion that made its sound richer in character.
<br>
==SID registers==
{| class="wikitable" style="text-align: center;"
|-
! Category
! RegsReg
! Name
! 7
! 0
|-
| rowspan="7" | Voice 1 || $00 (W) || FREQLO1 || colspan="8" style="text-align:center;" | Channel 1 Frequency Low-Byte
|-
| $01 (W) || FREQHI1 || colspan="8" style="text-align:center;" | Channel 1 Frequency High-Byte
|-
| $02 (W) || PWLO1 || colspan="8" style="text-align:center;" | Channel 1 Pulse Width Low
|-
| $03 (W) || PWHI1 || colspan="4" style="text-align:center; background:#E0E0E0;" | unused || colspan="4" style="text-align:center;" | Channel 1 Pulse Width High
|-
| $04 (W) || CR1 || style="text-align:center;" | NOISE || style="text-align:center;" | PULSE || style="text-align:center;" | SAW || style="text-align:center;" | TRI || style="text-align:center;" | TEST || style="text-align:center;" | RING || style="text-align:center;" | SYNC || style="text-align:center;" | GATE
|-
| $05 (W) || AD1 || colspan="4" style="text-align:center;" | Channel 1 Attack || colspan="4" style="text-align:center;" | Channel 1 Decay
|-
| $06 (W) || SR1 || colspan="4" style="text-align:center;" | Channel 1 Sustain || colspan="4" style="text-align:center;" | Channel 1 Release
|-
| rowspan="7" | Voice 2 || $07 (W) || FREQLO2 || colspan="8" style="text-align:center;" | Channel 2 Frequency Low-Byte
|-
| $08 (W) || FREQHI2 || colspan="8" style="text-align:center;" | Channel 2 Frequency High-Byte
|-
| $09 (W) || PWLO2 || colspan="8" style="text-align:center;" | Channel 2 Pulse Width Low
|-
| $0A (W) || PWHI2 || colspan="4" style="text-align:center; background:#E0E0E0;" | unused || colspan="4" style="text-align:center;" | Channel 2 Pulse Width High
|-
| $0B (W) || CR2 || style="text-align:center;" | NOISE || style="text-align:center;" | PULSE || style="text-align:center;" | SAW || style="text-align:center;" | TRI || style="text-align:center;" | TEST || style="text-align:center;" | RING || style="text-align:center;" | SYNC || style="text-align:center;" | GATE
|-
| $0C (W) || AD2 || colspan="4" style="text-align:center;" | Channel 2 Attack || colspan="4" style="text-align:center;" | Channel 2 Decay
|-
| $0D (W) || SR2 || colspan="4" style="text-align:center;" | Channel 2 Sustain || colspan="4" style="text-align:center;" | Channel 2 Release
|-
| rowspan="7" | Voice 3 || $0E (W) || FREQLO3 || colspan="8" style="text-align:center;" | Channel 3 Frequency Low-Byte
|-
| $0F (W) || FREQHI3 || colspan="8" style="text-align:center;" | Channel 3 Frequency High-Byte
|-
| $10 (W) || PWLO3 || colspan="8" style="text-align:center;" | Channel 3 Pulse Width Low
|-
| $11 (W) || PWHI3 || colspan="4" style="text-align:center; background:#E0E0E0;" | unused || colspan="4" style="text-align:center;" | Channel 3 Pulse Width High
|-
| $12 (W) || CR3 || style="text-align:center;" | NOISE || style="text-align:center;" | PULSE || style="text-align:center;" | SAW || style="text-align:center;" | TRI || style="text-align:center;" | TEST || style="text-align:center;" | RING || style="text-align:center;" | SYNC || style="text-align:center;" | GATE
|-
| $13 (W) || AD3 || colspan="4" style="text-align:center;" | Channel 3 Attack || colspan="4" style="text-align:center;" | Channel 3 Decay
|-
| $14 (W) || SR3 || colspan="4" style="text-align:center;" | Channel 3 Sustain || colspan="4" style="text-align:center;" | Channel 3 Release
|-
| rowspan="4" | Filter || $15 (W) || FCLO || colspan="5" style="text-align:center; background:#E0E0E0;" | unused || colspan="3" style="text-align:center;" | Filter Cutoff Low
|-
| $16 (W) || FCHI || colspan="8" style="text-align:center;" | Filter Cutoff High
|-
| $17 (W) || Res/Filt || colspan="4" style="text-align:center;" | Filter Resonance || style="text-align:center;" | Filt Ex || style="text-align:center;" | Filt 3 || style="text-align:center;" | Filt 2 || style="text-align:center;" | Filt 1
|-
| $18 (W) || Mode/Vol || style="text-align:center;" | Chan 3 Off || style="text-align:center;" | High Pass || style="text-align:center;" | Band Pass || style="text-align:center;" | Low Pass || colspan="4" style="text-align:center;" | Volume
|-
| rowspan="4" | Other || $19 (R) || POTX || colspan="8" style="text-align:center;" | Potentiometer X
|-
| $1A (R) || POTY || colspan="8" style="text-align:center;" | Potentiometer Y
|-
| $1B (R) || OSC3 || colspan="8" style="text-align:center;" | Channel 3 Oscillator
|-
| $1C (R) || ENV3 || colspan="8" style="text-align:center;" | Channel 3 Envelope
|}
<br>
==Technical detailsSID Internal Architecture ==
The ring modulation, filter, and programming techniques such as arpeggio (rapid cycling between 2 or more frequencies to make chord-like sounds) together produce Sawtooth waveform was created by sending the characteristic feel upper 12-bits of SID musicthe accumulator to the 12-bit Waveform D/A.
The better manufacturing technology in Pulse waveform was created by sending the 8580 used in the later revisions upper 12-bits of Commodore 64C and the Commodore 128DCR caused the bias accumulator to almost entirely disappear, causing the digitized sound samples to become very quieta 12-bit digital comparator. Fortunately, The output of the volume level could be mostly restored with comparator was either a hardware modification (biasing the audio-in pin), one or more commonly a software trick involving using the Pulse waveform zero. This single output was then sent to intentionally recreate all 12 bits of the required bias. The software trick generally renders one voice temporarily unusable, although clever musical compositions can make this problem less noticeableWaveform D/A.
The noise generator is implemented as an XOR shift register. When using noise waveform simultaneously with any other waveform, the pull-down via waveform selector tends to quickly reduce the XOR shift register to 0 for all bits that are connected to the output DAC. As of the zeroes shift in Waveform D/A (which was an analog voltage at this point) was fed into the register when the noise is clocked, and no 1reference input of an 8-bits are produced to replace thembit multiplying D/A, creating a situation can arise where the XOR shift register becomes fully zeroedDCA (digitally-controlled-amplifier). Luckily, The digital control word which modulated the situation can be remedied by using amplitude of the waveform control test bit, which in that condition injects one 1-bit into came from the XOR shift register. Some musicians are also known to use noise's combined waveforms and test bit to construct unusual soundsEnvelope Generator.
The 6581 and 8580 differ from each other in several ways. The original 6581 Envelope Generator was manufactured using the older NMOS process, which used 12V DC to operate. The 8580 was made using the HMOSsimply an 8-II process, bit up/down counter which required less power (9V DC), and therefore made when triggered by the IC run cooler. The 8580 was thus far more durable than the 6581. AlsoGate bit, due counted from 0 to stabler waveform generators255 at the Attack rate, the bit-mixing effects are less noticeable and thus the combined waveforms come close from 255 down to matching the original SID specification (which stated that they will be combined as a binary AND). The filter is also very different between programmed Sustain value at the two modelsDecay rate, with remained at the 6581 cutoff range being a relatively straight line on a log scale, while Sustain value until the cutoff range on Gate bit was cleared then counted down from the 8580 is a straight line on a linear scale, and is close Sustain value to 0 at the designers' actual specifications. Additionally, a better separation between the analog and the digital circuits made the 8580's output less noisy and distorted. The noise in 6xxx-series systems can be reduced by disconnecting the audio-in pinRelease rate.
<br>
[[File:SID Block Diagram.png|600px]]
<br>
== Differences between SID chips ==
Based on the empirical data from 20 SID chips, the conclusion is that: [https://ultimatesid.dk/ Source]
*There are no inherent and identifiable differences that can be attributed purely to the revision number of a 6581 SID chip
*The differences between batches of the same revision can be larger than the differences between revision numbers
*There can be differences within the same batch, but less so than between different batches
*The ceramic filter caps at C10+C11 in the C64 play an important part in the filter offset point – regardless of the actual fitted SID
The 6581 and 8580 SID chips differ from each other in several ways: [https://en.wikipedia.org/wiki/MOS_Technology_6581 Source]
*The original 6581 was manufactured using the older NMOS process, which used 12V DC to operate. The 6581 is very sensitive to static discharge and if they weren't handled properly the filters would stop working, explaining the large number of dead 6581s in the market.
*The 8580 was made using the HMOS-II process, which requires less power (9V DC), and therefore makes the IC run cooler. The 8580 is thus far more durable than the 6581. Also, due to more stable waveform generators, the bit-mixing effects are less noticeable and thus the combined waveforms come close to matching the original SID specification (which stated that they will be combined as a binary AND).
*The filter is also very different between the two models. The 6581 cutoff range resembles a sigmoid function on a log scale, while the cutoff range on the 8580 is a straight line on a linear scale.
[https://youtu.be/yadWu7hs4MU Oscilloscope comparison of 4 different SID chips]
<br>
Finally, you could play it with hardware too, with an extension. Read about it on:
* [http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/cpc-sid/ Bryce's CPCSID interface ]. Bryce never actually built the CPCSID, it only made it as far as a design concept on paper. [httphttps://www.cpcwiki.eu/forum/amstrad-cpc-hardware/new-amstrad-cpc-sound-board-(aka-sonique-sound-board)-sid-part-(wip)/ on CPCWiki forummsg114468/#msg114468 Source].* DaDMaN's Sonique Sound Board [http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/new-amstrad-cpc-sound-board-%28aka-sonique-sound-board%29-sid-part-%28wip%29/ DaDMaN's Sonique Sound Board], based on CPCWiki forumthe SwinSID SID clone. You can hear how DaDMaN's interface sounds here: [https://soundcloud.com/david-donaire-s-nchez/sets/amstrad-cpc-sonique-sound/ Playlist on SoundCloud]* [https://github.com/lambdamikel/Speak-SID LambdaMikel's Speak&SID] Speak&SID can use the original 6581, the 8580, as well as modern re-implementations of the SID chip such as SwinSID or ARMSID.* [[RSF3|TMTLogic's RSF3]]The ARM chip emulates the SID.
*[https://youtu.be/yadWu7hs4MU Oscilloscope comparison of 4 different CIo93AE8Fsw SID chipsPhase Accumulator explained] by [[Jeri Ellsworth]]*[https://youtu.be/fQU-WZZ67yM C64 SID vs Amiga Paula sound chip] [https://youtu.be/ioZRUVTKLx0 C64 SID vs Atari Pokey]* [[Media:Mos 6581 sid.pdf|SID chip datasheet]] [https://www.waitingforfriday.com/?p=661 Web version]*[http://www.sidmusic.org/sid/sidtech.html Technical SID documentation]* [https://github.com/libsidplayfp/SID_schematics/wiki SID internals documentation] [http://forum.6502.org/viewtopic.php?f=8&t=4150 Understanding the SID]
*[https://www.oxyron.de/html/registers_sid.html Oxyron SID reference]
*[https://ultimatesid.dk/ Ultimate SID Collection]
*[https://www.hvsc.c64.org/ High Voltage SID Collection]
*[https://youtu.be/Li-y42ie8-k Mix I] [https://youtu.be/b8ERcaXtK6E Mix II] [https://youtu.be/285q-PfYUYc Mix III] [https://youtu.be/NctPQfYFbI8 Mix IV] C64 Commodore music 1 hour
*[https://www.wothke.ch/tinyrsid/index.php webSID] [https://deepsid.chordian.net/ DeepSID] Online SID chip emulators
<br>
[[Category:Non CPC Computers]][[Category:Music and sound|*]] [[Category:Electronic Component]]