Changes

SID

11,951 bytes added, 21 April
/* Links */
(Contains extracts from wikipedia's page)
 
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, 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>
|-
! Category
! RegsReg
! Name
! 7
<br>
==Technical detailsSID Internal Architecture ==
6581 Pin configurationFrom an interview in August 1996 with Bob Yannes, the designer of the SID chip. [https://trondal.com/c64sid/yannes.html Source]
The SID is a mixedIt's pretty brute-signal integrated circuitforce, featuring both digital and analog circuitryI didn't have time to be elegant. All control ports are digital, while the output ports are analog. The SID features three-voice synthesis, where each Each "voice may use one " consisted of at least five different waveforms: square wave (with variable duty cycle)an Oscillator, triangle wavea Waveform Generator, sawtooth wavea Waveform Selector, pseudo-random (but not white) noise, and certain complexa Waveform D/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 setconverter, producing a discontinuity Multiplying D/A converter for amplitude control and change an Envelope Generator for modulation. The analog output of direction with the Triangle's ramp. Oscillators may also each voice could be hard-synced to each other, where sent through a Multimode Analog Filter or bypass the synced oscillator is reset whenever the syncing oscillator's msb raisesfilter and a final Multiplying D/A converter provided overall manual volume control.
Each voice may be routed into a common, digitally controlled analog 12dB multistate filterAs I recall, which the Oscillator is constructed with aid a 24-bit phase-accumulating design of external capacitors to the chip. The filter has lowpass, bandpass and highpass outputs, which can be individually selected thelower 16-bits are programmable for final pitch control. The output amplification via master volume register. Using a combined state of lowpass and highpass results in the accumulator goes directly to a notch (or inverted bandpass) outputD/A converter through a waveform selector.[1] The programmer may vary Normally, the filter's cut-off frequency and resonance. An external audiooutput of a phase-in port enables external audio accumulating oscillator would be used as an address into memory which contained a wavetable, but SID had to be passed through entirely self-contained and there was no room at all for a wavetable on the filterchip.
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.
Due to imperfect manufacturing technologies of The Triangle waveform was created by using the time and poor separation between the analog and digital parts MSB of the chip, accumulator to invert the 6581's output remaining upper 11 accumulator bits using EXOR gates. These 11 bits were then left-shifted (before throwing away the amplifier stageMSB) was always slightly biased from and sent to the zero level. By adjusting Waveform D/A (so the amplifier's gain through resolution of 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 triangle waveform 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 half that 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. Alsosawtooth, it was hugely CPU intensive - one had to output but the samples very fast (in comparison to the speed of amplitude and frequency were the 6510 CPUsame).
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.
At the X'2008 demo party, The Noise waveform was created using a completely new method of playing digitized samples was unveiled. The method allows for an unprecedented four (software23-mixed) channels of 8bit pseudo-bit samples random sequence generator (i.e., a shift register with optional filtering on top of all samples, as well as two ordinary SID sound channelsspecific outputs fed back to the input through combinatorial logic). The method works shift register was clocked by resetting one of the oscillator using intermediate bits of the waveform generator test bit, quickly ramping up accumulator to keep the new waveform with frequency content of the Triangle noise waveform selected, and then disabling all waveforms, resulting in relatively the DAC continuing to output same as the last value---which is the desired samplepitched waveforms. This continues for as long as two scanlines, which is ample time for glitchThe upper 12-free, arbitrary sample output. It is however more CPU-intensive than bits of the 4-bit volume shift register DAC trick described above. Because were sent to the filtering in a SID chip is applied after the waveform generators, samples produced this way can be filtered normallyWaveform D/A.
The original manual for Since all of the SID mentions that if several waveforms are enabled at the same timewere just digital bits, the result will Waveform Selector consisted of multiplexers that selected which waveform bits would be a binary AND between them. What happens in reality is that the input sent to the waveform DAC pins receive several waveforms at onceWaveform D/A. For instance, the Triangle waveform is made with a separate XOR circuit The multiplexers were single transistors and did not provide a shift"lock-to-left circuit. The top bit drives whether the XOR circuit inverts the accumulator value seen by the DAC. Thusout", enabling triangle and sawtooth simultaneously causes adjacent accumulator bits in allowing combinations of the DAC input waveforms to mix together. (The XOR circuit does not come to play because it is always disabled whenever the sawtooth waveform is be selected.) The pulse waveform is built by joining all combination was actually a logical ANDing of the DAC bits together via a long strip of polysiliconeach waveform, connected to the pulse control logic that digitally compares current accumulator value to the pulse width value. Thuswhich produced unpredictable results, selecting the pulse waveform together with any other waveform causes every bit on the DAC to partially mix togetherso I didn't encourage this, and especially since it could lock up the loudness of the waveform is affected pseudo-random sequence generator by the state of the pulsefilling it with zeroes.
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.
The consumer version of the 8580 A programmable frequency divider was rebadged used to set the 6582various rates (unfortunately I don't remember how many bits the divider was, even though either 12 or 16 bits). A small look-up table translated the die on 16 register-programmable values to the chip is identical appropriate number to a stock 8580 chip, including load into the '8580R5' markfrequency divider. Creative Micro Designs used it Depending on what state the Envelope Generator was in their SID Symphony expansion cartridge(i.e. ADS or R), the appropriate register would be selected and that number would be translated and loaded into the divider. Obviously it would have been better to have individual bit control of the divider which would have provided great resolution for each rate, however I did not have enough silicon area for a lot of register bits. Using this approach, I was used in able to cram a few other places as wellwide range of rates into 4 bits, including one PC sound-cardallowing the ADSR to be defined in two bytes instead of eight.The actual numbers in the look-up table were arrived at subjectively by setting up typical patches on a Sequential Circuits Pro-1 and measuring the envelope times by ear (which is why the available rates seem strange)!
Despite its documented shortcomingsIn order to more closely model the exponential decay of sounds, many SID musicians prefer another look-up table on the flawed 6581 chip over output of the corrected 8580 chipEnvelope Generator would sequentially divide the clock to the Envelope Generator by two at specific counts in the Decay and Release cycles. This created a piece-wise linear approximation of an exponential. I was particularly happy how well this worked considering the simplicity of the circuitry. The main reason for Attack, however, was linear, but this is that sounded fine. A digital comparator was used for the filter produces strong distortion Sustain function. The upper four bits of the Up/Down counter were compared to the programmed Sustain value and would stop the clock to the Envelope Generator when the counter counted down to the Sustain value. This created 16 linearly spaced sustain levels without havingto go through a look-up table translation between the 4-bit register value and the 8-bit Envelope Generator output. It also meant that sustain levels were adjustable in steps of 16. Again, more register bits would have provided higher resolution. When the Gate bit was cleared, the clock would again be enabled, allowing the counter to count down to zero. Like an analog envelope generator, the SID Envelope Generator would track the Sustain level if it was changed to a lower value during the Sustain portion of the envelope, however, it would not count UP if the Sustain level were set higher. The 8-bit output of the Envelope Generator was then sent to the Multiplying D/A converter to modulate the amplitude of the selected Oscillator Waveform (to be technically accurate, actually the waveform was modulating the output of the Envelope Generator, but the result is sometimes the same). Hard Sync was accomplished by clearing the accumulator of an Oscillator based on the accumulator MSB of the previous oscillator. Ring Modulation was accomplished by 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. The Filter was 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 produce simulation 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!). Filter resonance was controlled by a 4-bit weighted resistor ladder. Each bit would turn on one of instruments such as the weighted resistors and allow a distorted electric guitarportion of the output to feed back to the input. AlsoThe state-variable design provided simultaneous low-pass, the highpass component band-pass and high-pass outputs. Analog switches selected which combination of outputs were sent to the final amplifier (a notch filter was mixed in 3 dB attenuated compared to created by enabling both the other high and low-pass outputs, making simultaneously). The filter is the sound more bassyworst part of SID because I could not create high-gain op-amps in NMOS, which were essential to a resonant filter. In addition , the resistance of the FETs varied considerably with processing, so different lots of SID chips had different cutoff frequency characteristics. I knew it wouldn't work very well, but it was better than nothing and I didn't have time to nonlinearities in make it better. Analog switches were also used to either route an Oscillator output through or around the filter, to the final amplifier. The final amp was a 4-bit multiplying D/A circuitry converter which allowed the volume of the output signal to be controlled. 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. An external audio input could also be mixed in at the final amp or processed through the filter. The Modulation registers were 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). These registers just give microprocessor access to the upper 8 bits of the instantaneous value of the waveform generators produces yet more additional distortion that made its sound richer and envelope of Voice 3. Since you probably wouldn't want to hear the modulation source in characterthe audio output, an analog switch was provided to turn off the audio output of Voice 3.
<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.
You can hear how DaDMaN's interface sounds here: According to [https://soundcloudpatents.google.com/david-donaire-s-nchezpatent/setsUS4677890A/amstrad-cpc-sonique-sound/ Playlist on SoundClouden Google patents for US4677890A], the patent for the SID chip is now expired.
*[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]]
13,173
edits