Reverse-engineering the Yamaha DX7 synthesizer's sound chip from die photos (2021)
righto.com
righto.com
I've unwittingly become a bit of a Yamaha FM Synth historian!
Here are some other contributions to reverse-engineering the DX7:
A fully documented disassembly of the DX7 ROM: https://github.com/ajxs/yamaha_dx7_rom_disassembly
A new firmware ROM that makes the DX9 function more like a DX7: https://github.com/ajxs/yamaha_dx97
I wonder if it would be simple ot add a sensor to measure that across the keyboard, and then have it do double duty as aftertouch (aftertouch is an effect that measures if you "wiggle" a key after you've pressed it down) Then his DX9 could be better than the DX7 :)
https://www.muzines.co.uk/articles/grey-matter-response-e/20...
E! was so good that Yamaha suspected them of industrial espionage.
A logic probe.
Reminds me back of my teenage years mesmerised by software/hardware synths, daws and everything and anything related to audio tech. Hours spent trying to understand different waves, oscillations, LFOs, modulation, AM, FM and so on and so forth. I could go on all day. Great memories.
Anyhow, would be interesting to go down a rabbit hole reading up on the waveform representation for the DX7. Now that I remember, I will go ahead and look for SH-101.
I worked on trying to reverse engineer the instruction set from that chip, but most of the code is in a mask ROM that probably needs some debug wires to extract.
Maybe this could help. Is there some mask ROM on the CPU that isn't included here?
I found an old email to someone that suggests I thought it was an nX/4.
This is a lower-res version of the decapped chip.
https://upload.wikimedia.org/wikipedia/commons/4/44/Oki_m628...
I wonder how true this still is. I've been having fun simply assuming it is, and these teardown articles and the other HN discussions around them have been very helpful.
Yes, on modern chips float math will generally be faster than fixed point. This is not so much because the integer units get clogged, as that there's a huge amount of chip area and optimization that goes into the float units (often SIMD, and a lot of FM synthesis can benefit from this, though feedback creates data dependencies). For example, multiply-and-add is usually one cycle in float, but would always be two separate instructions in integers.
My recollection is that older ARM chips have a special issue with latency of data dependencies originating from the float unit (NEON, which is optimized for SIMD vector operations) to the integer unit. I suspect this is no longer the case, or is less of an issue.
Unless the multiply is by a constant 2, 4, or 8, in which case you can use `lea`.
Interesting to test out on the ARM Mac, and see if different dependency chains show significant latency penalties / in with reorder buffer.
The best current info I could find for the latency advice is [2]. Quoting, "Moving data from NEON to ARM registers is Cortex-A8 is expensive." Looking at [3] partially reveals the reason why: the NEON pipeline is entirely after the integer pipeline, so moves from integer to NEON are cheap, but the reverse direction is potentially a large pipeline stall. This is an unusual design decision that as far as I know is not true for any other CPUs. Edit: I found [4], which is a more authoritative source.
[1]: https://github.com/google/music-synthesizer-for-android/blob...
[2]: https://community.arm.com/support-forums/f/armds-forum/757/n...
[3]: https://www.design-reuse.com/articles/11580/architecture-and...
[4]: https://developer.arm.com/documentation/den0018/a/Optimizing...
For Cortex-A8 from [4] and the others you have linked, It makes sense to me now regarding the instruction passing data between registers, filling out the pipeline and then stalling.
Will have a peek at ARMv8/ARMv9 arch's and see what they did there regarding SVE/SVE2.
I'm specifically targeting an Intel Atom, which is obviously powerful enough for the task, but may not fit all definitions of "modern" now?
bwahahaha.
I'm a DAW author. Have been for 24 years or so. My friends write plugins and DSP modules for mixing consoles.
Received wisdom from KVR Audio (and in fact, most online forums) is worth less than the distance than a flea could throw it.
Digital audio software users that know almost nothing about the subject seem highly inclined to spend their time blathering on in these forums, while the people who actually do know about it appear to have better things to do.
Depends on the forum, I guess. Lately I've been following the developer subforum of KVR, where folks talk about filter and oscillator algorithms using math I'll never understand. Discussions there seem well-reasoned and entirely civil. I haven't really seen them talk about performance optimizations, though. And I can't say anything about the rest of KVR.
In a phase accumulator (or any numerical representation of time) it is generally desirable to have uniform precision across the full phase range. Floating point arithmetic does not have this property. On the other hand, floating point arithmetic can sometimes be more convenient than fixed-point if the hardware to hand can execute it fast. But if you're designing hardware from scratch, and especially for FM synthesis, you're probably going to find some other tricks that work even better.
Is there a highly-regarded software (or hardware + software) emulator for the DX7?
Dexed is probably what you're looking for, although there are others here: https://github.com/nodiscc/awesome-linuxaudio#synthesizers--...
Edit: a YouTube video about the reverse engineering process from David at Plogue: https://www.youtube.com/watch?v=XJ97iXQrqzw