Hacker News new | past | comments | ask | show | jobs | submit login
Yamaha DX7 reverse-engineering, part III: Inside the log-sine ROM (righto.com)
142 points by rcarmo 48 days ago | hide | past | favorite | 16 comments

It amazes me how much memory they didn't have

> The ROM and associated logic take a 10-bit input address representing a quarter of the sine wave

> A technique called delta encoding is used to reduce the size of the ROM. The idea of delta encoding is that if values change slowly, the difference between two values is considerably smaller than the value itself.

> Overall, the log-sine circuit generates 1024 14-bit values

Typical audio today is 16bit 48khz, although 24 bit and 96khz isn't unheard of for professional use.

A single sine wave at 10Hz would thus require 4,800 samples, and require 9,600 bytes. Tiny amount of data. Even at high fidelity you're talking under 30 kbytes.

At just 1024 samples (rather than 4800), and 14 bits (rather than 16), you'd need less than 2kbytes of memory.

The ROM only stores 668 bytes - less than the length of this comment in ASCII.

Waveform tables are still usually stored as a 2^n bytes, where n is a relatively small number. The rate is changed by resampling. So this was a known and standard digital synthesis technique, even then.

The clever part is the log arithmetic and the use of symmetry.

The really clever part is doing it in custom ICs. Yamaha already had custom ICs in its organs and analogue synths, but I still don't know who taped out and then fabbed a relatively state of the art digital design in 1983.

Someone in management decided to make a huge investment in the DX line, and it paid off. Imagine if the project had bombed and the company was left with a couple of hundred thousand unwanted chips.

But the whole project was a triumph. It wasn't just outstanding engineering, it was a very ballsy business move.

Spot on, this must have been an enormous gamble, because it is not one but two of these 64 pin monsters. Unfortunately the other one (which I've already desoldered, it's lying right in front of me) is cast in plastic rather than with a removable lid so it will take some more magic to get that one to give up its secrets.

There's always this technique perhaps. https://www.youtube.com/watch?v=ZQeHHYJYWXo

Very interesting, but this is a pretty unique chip and I would definitely not risk it on a coarse method like that. But if I had a bunch of them I would probably try it on one or two.

One thing I keep thinking when I read of how yourself and Ken (and others) reverse engineer these chips...

Are these devices and chips still plentiful enough to justify destroying them for this purpose?

I'm sorry if that sounds like a harsh criticism, I don't intend it that way and I'm genuinely curious regarding how you and others doing similar things with these vintage chips weigh up the pros and cons of going through with the disassembly of any particular example.

I find these articles fascinating and hope to continue learning from the content. But I can't help but think that should these devices be celebrated by actually using them rather than tearing them apart?

Your concern is 100% valid. The chip that I sent to Ken came from a DX7 motherboard that had seen an extremely rough life and at least one other critical chip on that board was dead. The EGS and OPS are nigh on indestructible, I've seen my share of these by now and they always work, no matter what the state of the rest of the board.

So, figuring that no matter what happens to that board that I will always end up with at least one surplus set of EGS/OPS chips even though they are still good it wasn't a huge decision to sacrifice them, the potential for knowledge gained far outweighs the value of these chips.

I repair DX7's to keep them 'in play', it doesn't really make me any money but it feels good to spend my spare time on getting one of these oldies to 'good as new' state and then to see another super happy musician leave. The stuff I get in return comes in all kinds of states, from still somewhat working to completely dead. I usually have enough spares on hand to quickly swap out some big subsystems to figure out what's broken and then zoom in on the details. Afterwards, a complete disassembly, contact alignment (very critical), aftertouch bar check, cleaning, reassembly and testing, fresh battery and another one good to go.

You can do one in a day or so once you get the hang of it.

The particular board that these chips came out of had me initially entirely stumped. None of my usual revival tricks worked. After swapping out the CPU with a very rare working spare it was clear that it was never going to work again, CPU mysteriously dead. So it had been sitting in my parts bin for the last couple of years when Anthony contacted me and we started talking about his - and mine - DX7 ROM disassembly adventures. I had spent a lot of time on it a while ago, then moved on to making more music rather than working on yet more programming projects.

He talked about the degree of certainty that people have about the insides of the OPS and EGS chips, which prompted me to contact Ken to ask if he would like to have a shot at working with one of these and he happily accepted. Which put the otherwise dust gathering chips to some good use.

So, that's the story behind these chips, in short: no DX7s were harmed in the process of making these posts and hopefully the Gods of Silicon will forgive me the sacrifice made for the potential improvements made to software emulators as well as Anthony's disassembly project, which may well spring a generation of custom ROMS.

Thanks for the reply - I assumed that was the case, that these particular parts are now completely surplus and there's not enough of the remains of other units to make up anything functional.

I agree also that there's benefits in documenting these for emulation and educational purposes.

memory technology has always been what holds computing back, even today.

one can buy any amount of RAM that they need, but it still must be populated with data at boot time, from some slower storage medium, like SSDs, for example. what will "boot" or "reboot" mean once we are able to merge main storage with working RAM, and have the capacity and persistence of SSDs with the speed and throughput of RAM?

Both have been increasing throughout history. RAM in my 6 year old desktop is 16GB, 100 times the size of the hard drive I had 25 years ago.

My SSD today I'm sure is far faster than the memory I had 25 years ago.

yep, and the pressure for more RAM and faster RAM has not gone away.

if we can ever get back to synchronous RAM access again, with low single-digit cycle latency, lots of computing realities will change.

Anthony just released his annotated DX-7 ROM listing, aided by Ken's work:


Ken's site is fantastic for education; my kids and I regularly re-visit the 'rare' chip that turned out to be a touch-tone generator, and (as an owner of classic synths) this series is better than that. I don't have a DX7, but do have the 'competition' - a Casio CZ-101, which uses phase distortion to work around Stanford patents (I think).

I'm secretly hoping one day Ken will pop the top of a classic CEM or SSM chip, which were (are?) the mainstay of many classic synths.

I also wonder if Ken prefers his MG-1 over the DX7 sound...

I really appreciate Ken's content. It is always fascinating to learn how these chips were engineered with minimal simulation (not to mention design tooling) by comparison to what is available today.

Ken Shirrif's content is so good he's consistently hitting the HN frontpage on a weekly basis.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact