ReSID

Last updated

reSID is a reverse engineered software emulation of the MOS6581 SID (Sound Interface Device) chip programmed by Dag Lem. This chip was used in the Commodore 64 computer. reSID is free software, published under the GNU General Public License.

reSID is a C++ library containing a complete emulation of the SID chip. This library can be linked into programs emulating the MOS6510 MPU to play music made for the Commodore 64 computer. reSID has been linked into VICE (a Commodore 64 emulator), SIDPLAY (a SID tune player), and into the trackers GoatTracker and cheesecutter.

The emulator engine is cycle-based, emulating the internal operations of the SID chip. SID's audio filter is modeled as an actual two-integrator-loop biquadratic filter. The engine has been developed based on available information on SID, sampling of the OSC3 and ENV3 registers, filter theory, and testing.

There are two main varieties of the SID chip, 6581 and 8580. They implement the same programming API, but their analogue parts behave differently. The differences are mostly: quality of DACs, combined waveforms, voltage offsets inside the chip and the filter.

Due to the engineering decisions, the filter of the 6581 family of chips was significantly nonlinear. Simulations of the effect indicate that the distortion is strongly linked to sound amplitude at the highpass and bandpass outputs of the filter, and occurs only on the other half-wave of the output waveform. The effective center frequency of the filter can be seen to drift higher in spectrum as the input waveform's amplitude increases, and the effect is believed to be side effect of the exponential response of the NMOS inverters that double as op-amps on the 6581 chip. Additionally, the distortion is stabilized by the inverted phase of the bandpass output, which allows some distortion to occur during both half-waves of the input waveform. In contrast, the 8580 chip's filter was re-engineered and appears to behave ideally.

The linear filters of reSID do not even attempt to emulate the nonlinear character of 6581 emulation, and some features such as the OptimiseLevel setting further degrades filter quality by limiting the filter upper frequency to mere 4 kHz (genuine chips can specify center frequencies up to at least 20 kHz on the 6581 and 12 kHz on 8580). Work has been done to add 6581 distortion simulation to the engine, it started in 2007 as a patch maintained by Antti S. Lankila [1] and ended up with the reSIDfp fork, included as the main emulation engine in libsidplayfp.

The latest official version is 0.16, which was released 11 June 2004, while a prerelease for reSID 1.0 was included in VICE in 2010 - 2011, and has been patched by others since then. The prerelease provides accurate models of non-monotonic D/A converters and filter for the 6581 model, where a DAQ has been used to sample the SID capacitor pins in order to work out an op-amp transfer function. It also includes an assortment of improvements to the cycle level emulation of digital components, in particular the waveform and envelope generators, based on revectorized die photographs. A first attempt was made later on to correctly model the 8580 filter too and emulate the slight level of distortion which appears in some extreme conditions. In 2022 Dag Lem returned to development on a new repository hosted on GitHub which is intended to become the official source for the reSID MOS6581 / MOS8580 SID emulator.

Related Research Articles

<span class="mw-page-title-main">Commodore 64</span> 8-bit home computer introduced in 1982

The Commodore 64, also known as the C64, is an 8-bit home computer introduced in January 1982 by Commodore International. It has been listed in the Guinness World Records as the highest-selling single computer model of all time, with independent estimates placing the number sold between 12.5 and 17 million units. Volume production started in early 1982, marketing in August for US$595. Preceded by the VIC-20 and Commodore PET, the C64 took its name from its 64 kilobytes(65,536 bytes) of RAM. With support for multicolor sprites and a custom chip for waveform generation, the C64 could create superior visuals and audio compared to systems without such custom hardware.

<span class="mw-page-title-main">Amplifier</span> Electronic device/component that increases the strength of a signal

An amplifier, electronic amplifier or (informally) amp is an electronic device that can increase the magnitude of a signal. It is a two-port electronic circuit that uses electric power from a power supply to increase the amplitude of a signal applied to its input terminals, producing a proportionally greater amplitude signal at its output. The amount of amplification provided by an amplifier is measured by its gain: the ratio of output voltage, current, or power to input. An amplifier is defined as a circuit that has a power gain greater than one.

<span class="mw-page-title-main">Single-sideband modulation</span> Type of modulation

In radio communications, single-sideband modulation (SSB) or single-sideband suppressed-carrier modulation (SSB-SC) is a type of modulation used to transmit information, such as an audio signal, by radio waves. A refinement of amplitude modulation, it uses transmitter power and bandwidth more efficiently. Amplitude modulation produces an output signal the bandwidth of which is twice the maximum frequency of the original baseband signal. Single-sideband modulation avoids this bandwidth increase, and the power wasted on a carrier, at the cost of increased device complexity and more difficult tuning at the receiver.

In signal processing, distortion is the alteration of the original shape of a signal. In communications and electronics it means the alteration of the waveform of an information-bearing signal, such as an audio signal representing sound or a video signal representing images, in an electronic device or communication channel.

In signal processing, group delay and phase delay are two related ways of describing how a signal's frequency components are delayed in time when passing through a linear time-invariant (LTI) system. Phase delay describes the time shift of a sinusoidal component. Group delay describes the time shift of the envelope of a wave packet, a "pack" or "group" of oscillations centered around one frequency that travel together, formed for instance by multiplying a sine wave by an envelope.

The total harmonic distortion is a measurement of the harmonic distortion present in a signal and is defined as the ratio of the sum of the powers of all harmonic components to the power of the fundamental frequency. Distortion factor, a closely related term, is sometimes used as a synonym.

A signal generator is one of a class of electronic devices that generates electrical signals with set properties of amplitude, frequency, and wave shape. These generated signals are used as a stimulus for electronic measurements, typically used in designing, testing, troubleshooting, and repairing electronic or electroacoustic devices, though it often has artistic uses as well.

<span class="mw-page-title-main">Sampling (signal processing)</span> Measurement of a signal at discrete time intervals

In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time signal. A common example is the conversion of a sound wave to a sequence of "samples". A sample is a value of the signal at a point in time and/or space; this definition differs from the term's usage in statistics, which refers to a set of such values.

<span class="mw-page-title-main">MOS Technology 6581</span> MOS Technology sound chip

The MOS Technology 6581/8580 SID is the built-in programmable sound generator chip of the Commodore CBM-II, Commodore 64, Commodore 128, and MAX Machine home computers.

In signal processing and electronics, the frequency response of a system is the quantitative measure of the magnitude and phase of the output as a function of input frequency. The frequency response is widely used in the design and analysis of systems, such as audio and control systems, where they simplify mathematical analysis by converting governing differential equations into algebraic equations. In an audio system, it may be used to minimize audible distortion by designing components so that the overall response is as flat (uniform) as possible across the system's bandwidth. In control systems, such as a vehicle's cruise control, it may be used to assess system stability, often through the use of Bode plots. Systems with a specific frequency response can be designed using analog and digital filters.

<span class="mw-page-title-main">POKEY</span>

POKEY, an acronym for Pot Keyboard Integrated Circuit, is a digital I/O chip designed by Doug Neubauer at Atari, Inc. for the Atari 8-bit family of home computers. It was first released with the Atari 400 and Atari 800 in 1979 and is included in all later models and the Atari 5200 console. POKEY combines functions for reading paddle controllers (potentiometers) and computer keyboards as well as sound generation and a source for pseudorandom numbers. It produces four voices of distinctive square wave audio, either as clear tones or modified with distortion settings. Neubauer also developed the Atari 8-bit killer application Star Raiders which makes use of POKEY features.

<span class="mw-page-title-main">Elektron SidStation</span>

The Elektron SidStation is a musical synthesizer sound module, built around the MOS Technology SID mixed-mode synthesizer chip originally used in the Commodore 64 home computer. It was produced by the Swedish synthesizer company Elektron, and was introduced in 1999. As the SID chip had not been manufactured for years, Elektron allegedly bought up nearly all the remaining stock.

<span class="mw-page-title-main">Ensoniq ESQ-1</span> Synthesizer

Ensoniq ESQ-1 is a 61-key, velocity sensitive, eight-note polyphonic and multitimbral synthesizer released by Ensoniq in 1985. It was marketed as a "digital wave synthesizer" but was an early Music Workstation. Although its voice generation is typically subtractive in much the same fashion as most analog synthesizers that preceded it, its oscillators are neither voltage nor "digitally controlled", but true digital oscillators, provided by a custom Ensoniq wavetable chip. The signal path includes analog resonant low-pass filters and an analog amplifier.

Phase distortion (PD) synthesis is a synthesis method introduced in 1984 by Casio in its CZ range of synthesizers. In outline, it is similar to phase modulation synthesis as championed by Yamaha Corporation, in the sense that both methods dynamically change the harmonic content of a carrier waveform by influence of another waveform (modulator) in the time domain. However, the application and results of the two methods are quite distinct.

Linear electronic oscillator circuits, which generate a sinusoidal output signal, are composed of an amplifier and a frequency selective element, a filter. A linear oscillator circuit which uses an RC network, a combination of resistors and capacitors, for its frequency selective part is called an RC oscillator.

<span class="mw-page-title-main">HardSID</span>

The HardSID is a family of sound cards, produced by a Hungarian company Hard Software and originally conceived by Téli Sándor.

<span class="mw-page-title-main">Access Virus</span> Line of synthesizers

The Access Virus is a virtual analog synthesizer made by the German company Access Music GmbH. It was first produced in 1997 and has since been upgraded frequently, with the company releasing new models about every two years. Early models include the Virus A, Virus B, and Virus C series, each available in various hardware configurations. In November 2005, the Virus TI series was released, including the 61-key Virus TI Keyboard and the 37-key Virus TI Polar. A small desktop model was released in February 2008 called the Virus TI Snow. A revision of the TI series called TI2 came out in March 2009, featuring faster digital signal processing (DSP) controllers, additional polyphony, more effects in the effect section and a slightly changed design. The Virus series also has come out with two software plugin versions: TDM for Pro Tools and VST for TC Electronic Powercore series. The term Access Virus can be used to refer to any one of these synthesizers.

In control systems theory, the describing function (DF) method, developed by Nikolay Mitrofanovich Krylov and Nikolay Bogoliubov in the 1930s, and extended by Ralph Kochenburger is an approximate procedure for analyzing certain nonlinear control problems. It is based on quasi-linearization, which is the approximation of the non-linear system under investigation by a linear time-invariant (LTI) transfer function that depends on the amplitude of the input waveform. By definition, a transfer function of a true LTI system cannot depend on the amplitude of the input function because an LTI system is linear. Thus, this dependence on amplitude generates a family of linear systems that are combined in an attempt to capture salient features of the non-linear system behavior. The describing function is one of the few widely applicable methods for designing nonlinear systems, and is very widely used as a standard mathematical tool for analyzing limit cycles in closed-loop controllers, such as industrial process controls, servomechanisms, and electronic oscillators.

Casio's SDSynthesizers were a late-1980s line of analog synthesizers featuring a resonant filter. SD synthesis was traditional DCO-analog synthesis, with the main difference being that some of the SD waveforms' harmonic spectrums changed temporally, or dynamically in relation to the amplitude envelope.

A Bitcrusher is an audio effect that produces distortion by reducing of the resolution or bandwidth of digital audio data. The resulting quantization noise may produce a "warmer" sound impression, or a harsh one, depending on the amount of reduction.

References

  1. Lankila, Antti S. "ReSID filter distortion simulation". Archived from the original on 2012-01-16.