~ajxs

Yamaha DX7 Firmware ROM Disassembly

2021.12.25
A brief update regarding the reverse-engineering of the Yamaha DX7's firmware ROM.

It's been an exciting year for the DX7: Veteran audio plugin developers Plogue released their amazing Chipsynth OPS7; Ken Shirriff decapsulated the YM21280 OPS chip; and coming just in time for Christmas, I have released an annotated disassembly of the Yamaha DX7's v.18 firmware ROM.

Few synths can claim to be the subject of quite as much conjecture, or controversy as Yamaha's groundbreaking FM synthesiser. For a synth rapidly approaching it's 40th birthday, the DX7 continues to cultivate as much fascination, curiosity, and obsession in its fourth decade as it did in its first. The last few years have even seen a new generation of FM synthesisers released by the major synth manufacturers, introducing the DX7's trademark FM synthesis to a new, younger audience.

The dust had barely settled from the DX7's revolutionary arrival on the scene before the synth community at large began poking around under the hood in search of its secrets. Even Roland, having found themselves caught in the wake of the DX7's cultural impact, invested significant time and resources into understanding the technology underpinning Yamaha's new innovation (Reiffenstein, 2004, pp. 275-276). Since then numerous emulations have been released, ranging from the faithful to the adventurous.

It's clear that in the process of researching the synth's functionality its firmware has been pored over by numerous engineers. However no one had published any documentation of the synth's firmware, until now.

When I first began researching the technical details of the DX7, it was clear that much is understood about the synth's functionality by the community at large, however so little had been collated, and published. Over the course of the last few months I have been working on an ambitious project to reverse-engineering the Yamaha DX7's v1.8 firmware ROM, with the aim to create an annotated assembly listing suitable for interested parties to read, and understand.

At long last, the annotated disassembly is available here. All contributions, corrections, and questions are welcome!
Rather than overflow this brief article with technical minutiae, I will let interested readers explore the repository, and associated information, for themselves. If anyone has any specific questions, feel free to email me directly.

My initial motivation for documenting the DX7's technical implementation was to understand how a digital synthesiser is engineered. The Yamaha DX7 has long held a special place in my heart, and my studio. Being nearly entirely digital, it seemed a great starting point for my research. This research culminated in my Yamaha DX7 Technical Analysis article. My intention is not to become an obsessive custodian of DX7 minutiae. I take great satisfaction in the idea that I can contribute my own small amount to the collective research, and preservation of this synthesiser's amazing technology. I hope that this work will prove useful for those working to emulate, and preserve the magic of the DX7.

What Mysteries Remain?

One particular remaining mystery is how the frequency number passed between the CPU and the EGS, used to signify the pitch of an individual note, is converted into the phase increment value used by the OPS chip. Interestingly, this frequency value is computed by applying a simple transformation to the MIDI note number received from either the keyboard, or external MIDI input. This conversion is performed by the subroutine located at offset 0xD7DF in the synth's memory, (offset 0x17DF relative to the start of the ROM file itself). This subroutine is labeled as VOICE_CONVERT_NOTE_TO_PITCH in the annotated disassembly.
This value is referenced in patent US4554857:
It is known in the art that a frequency number expressed in logarithm can be obtained by frequently adding data of two low bits of the key code KC to lower bits...

As the above description indicates, the resulting value is a frequency expressed in logarithmic form, with each octave being 1024 'units' apart. The synth's pitch EG values, and master tune setting are stored internally in this same logarithmic format, and are combined together with the aforementioned key frequency value to yield the final pitch value transmitted to the EGS.

Where Can We Go From Here?

Having now laid bare (some of) the secrets contained within the DX7's firmware ROM, the question arises "What additional functionality is possible?". What modifications could be made to the synth's firmware to enhance its operation, or add new functionality entirely?

The bulk of the DX7's sound synthesis is performed by two proprietary LSI chips: The YM21290 EGS, responsible for envelope generation; and the YM21280 OPS, resposible for synthesising the actual tones. The fundamental role of the DX7's firmware ROM is to interface with these two chips.

A common question asked on mailing lists is whether the DX7 could potentially support multitimbrality. Unfortunately, the majority of the parameters managed by these two chips are global. As far as we know, the OPS chip only has a single register specifying the algorithm, and oscillator sync settings for all 16 of the synth's voices. The only per-voice setting the EGS chip supports is operator volume. The ability to alter the operator pitch on a per-voice basis would be required for any kind of useful multitimbrality.

It's potentially possible to expanding the synth's functionality by creating an operator pitch EG in the software. It's already known that the EGS supports arbitrary operator frequency values via the fixed operator frequency parameters, and that the synth's main pitch EG is processed within the software. The very real possibility exists however that there could be timing, and latency issues related to loading the individual operator pitches to the EGS, however the possibility is worth investigating.

If you have a better imagination than I do for what improvements to make to the firmware, please create something new and amazing!

Various talented engineers have been able to create ingenious firmware modifications for popular synths over the years. One particularly interesting modification is Frederic Vecoven's Super JX project, for Roland's JX10. Another amazing custom firmware project is Soundprocess OS for the Ensoniq Mirage, developed by Mark Cecys.

In addition to the more imaginative, and adventurous modifications, this project makes possible much simpler improvements. It's possible to add support for more modern peripherals, such as replacing the LEDs, or LCD screen with more modern components. I look forward to seeing how the DX7 community at large makes use of this work.

References