Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Latest commit

 

History

History
29 lines (16 loc) · 4.18 KB

Dx7Hardware.wiki

File metadata and controls

29 lines (16 loc) · 4.18 KB
  1. summary Analysis of the hardware in the DX7

Yamaha DX7 hardware

There's a fair amount known about the Yamaha DX7 hardware, and more detail (and confidence) can be obtained through black-box testing. One of the best sources of information is the service manual published by Yamaha.

The main CPU is a 63X03, a variant of the Motorola 6800, most likely running at 2MHz. There's also a sub-cpu, a 6805, which is responsible for scanning the input keys and panel switches.

The main sound generation is done by a pair of VLSI chips - the YM28190 EGS (envelope generator), and the YM21280 OPS (operator). Every audio sample (at a sampling rate of 49096 Hz), these chips cycle through 96 subsamples, one for each of 6 operators x 16 voice polyphony.

The EGS contains state for 96 envelopes and is also the main point of interface from the main CPU. For each clock (approx 4.7MHz), the EGS chip supplies a 12-bit envelope and 14-bit frequency value to the second chip, the OPS (operator) chip.

Through measurement, it's clear that the 12-bit envelope value is a simple Q8 fixed-point representation of logarithmic (base 2) gain. Linear gain is equal to 2^(value / 256). The steps are particularly clearly seen in plots of amplitude for slow-decaying envelopes (todo: insert decay30.png image). This gives a total of about 96dB of dynamic range, in steps of approximately 6 / 256 = .0234 dB, which is smooth to the ear.

Similarly, it's clear that the frequency value is a Q10 fixed-point representation of logarithmic (base 2) frequency. The top four bits represent the octave (thus giving a total range of 16 octaves, ranging from below half a Hz to the Nyquist limit of 24.5kHz. The resolution of the lower 10 bits is approximately 1.17 cents.

From careful measurement of exact frequencies of sine waves generated by the OPS chip, it's clear that frequencies within an octave are quantized to linear values of 1/4096 resolution. Thus, it's likely that the lower 10 bits are run through a LUT containing 2^(value / 1024), and the result is then used to increment a phase accumulator. (It's a reasonable guess that the phase accumulator has 27 bits of precision - 12 bits of mantissa at the lowest frequencies, shifted left by up to 15 at the highest. However, it's also possible that at the very lowest frequencies the phase is only incremented for a fraction of the sample clocks).

It is known that Yamaha's later single-chip FM tone generating chips avoided the need for a multiplier by storing log(sin(x)) in one LUT, and 2^x in another. Instead of multiplying by the gain signal, the gain is simply added to the output of the first LUT. Matthew Gambrell and Olli Niemitalo decapsulated a YM3812 chip and recovered the contents of these ROMs - which are both 256-element (8 bits in). Note that the sin lut actually only stores a quarter-cycle - the other three are reconstructed through symmetry. It is very likely that the DX7 chips work on the same principle. It is not yet known whether the DX7 ROMs are the same size or more precise than there.

Since the log-frequency to linear-frequency LUT computes the same actual function as logarithmic-to-linear gain, it's entirely plausible that the ROM is shared, and two lookups are done per clock. If so, it's most likely that the exponential function has 10 low-order bits of accuracy (plus 4 bits of exponent).

The OPS chip also contains two buffers (M and F) for assembling the 6 operators into a single voice. These store linear values, so are the output of the exp LUT. The combination of multiple operators is simple linear addition. The F buffer implements Tomisawa's "anti-hunting" filter (this is determined from measurement of feedback waveforms) - so buffers the previous _two_ values, and the mean of those is used (feedback gain is a power of two, so multiplication by the feedback gain is a shift) as the input to the next cycle.

References

  * [https://docs.google.com/a/google.com/Doc?id=dd8kqn9f_13cqjkf4gp OPLx decapsulated], Matthew Gambrell and Olli Niemitalo, 2008/04/20, also see [http://yehar.com/blog/?p=665 blog post]
  * [http://www.abdn.ac.uk/~mth192/dx7/manuals/dx7-9_service_manual_1.pdf DX7/9 Service Manual]
  * [http://en.wikipedia.org/wiki/Yamaha_YM3812 Yamaha YM3812] at Wikipedia