
Reverse engineering the 76477 “Space Invaders” sound effect chip from die photos - krosaen
http://www.righto.com/2017/04/reverse-engineering-76477-space.html?m=1
======
dorfsmay
Pretty amazing! Reminds the article from 2002 which had to be one of the
biggest Slashdot moment for me, from somebody who wrote code to play music
from a scanned image of an LP.

[http://www.cs.huji.ac.il/~springer/DigitalNeedle/index.html](http://www.cs.huji.ac.il/~springer/DigitalNeedle/index.html)

~~~
Nition
That's interesting, the guy says in that post the he assumes the depth
modulation is one channel and the side-to-side is the other channel for a
stereo recording. But actually they're both at 45 degrees[1]. It's a clever
system because not only does it encode two channels with some of the "better"
side-to-side movement (up/down is harder to get fidelity out of), it comes out
that that the sum of the channels causes side-to-side movement while the
difference causes up and down, so they play on old mono record players as
well.

I wonder what his code actually did, and if maybe he could have got a better
result.

[1]
[http://www.vinylrecorder.com/stereo.html](http://www.vinylrecorder.com/stereo.html)

~~~
jacquesm
It's amazing that someone would go through all that trouble and get that
detail wrong. There is also the RIAA correction curve to take care of (that
was my first encounter with that acronym). The sound played back is pretty
eerie, probably some day some alien somewhere will replay our planet earth
gold plated recording like that and wonder why our sound encoding sucks if at
the same time we can make spacecraft.

See also:

[http://irene.lbl.gov/](http://irene.lbl.gov/)

There was also this:

[https://en.wikipedia.org/wiki/Laser_turntable](https://en.wikipedia.org/wiki/Laser_turntable)

They were about to go mainstream when the CD happened.

~~~
Nition
Good point.

For anyone who doesn't know about the EQ curve on records, it's basically a
big bass cut and a big treble boost. Bass causes huge wobbles in the groove so
it's cut, and treble is hard to pick up, so it's boosted. Then you just do the
reverse on playback.

Also a good point that there's nothing on the Voyager record instructions
about this...

------
squarefoot
I played with that chip as a kid, probably still have it somewhere but not in
good condition as I recall it becoming very hot during operation. One day I
built the full demonstration circuit similar to the one in this pic.

[https://upload.wikimedia.org/wikipedia/commons/4/42/76477_De...](https://upload.wikimedia.org/wikipedia/commons/4/42/76477_Demo_Circuit-D.JPG)

It took forever to finish as I wasn't that skilled at the time and the number
of switches and pots was simply beyond everything I had soldered before, but I
managed to succeed it and spent some good evenings playing with its effects.

~~~
jacquesm
Hah! super cool I didn't catch the chip ID in the title right away but then I
read your comment and I immediately knew what chip it was. I built the same
reference circuit, and remember scrounging pots and switches from many tv's
and radios hauled home from the garbage.

------
userbinator
Interesting article. AFAIK reverse-engineering mixed-signal or analog ICs is
far less common and more difficult than digital ones, since the transistor
sizes and shapes are more critical in analog parts as are the resistors and
other passives; there isn't much in the way of standard cells (which can be
easily reverse-engineered using something like
[http://www.degate.org/](http://www.degate.org/) ) and the layout is more
critical so it is often done with less automation assistance.

~~~
kens
I have the advantage that I'm just reverse engineering the circuit to
understand it; I'm not trying to re-create it. So I can just ignore transistor
size, layout, etc :-)

~~~
sillysaurus3
I wonder how difficult it would be to re-create it in software? It'd be cool
to emulate it similar to tlb's XAnalogTV.

[https://github.com/katahiromz/XScreenSaverWin/blob/master/no...](https://github.com/katahiromz/XScreenSaverWin/blob/master/non-
wgl/analogtv.c)

[https://www.youtube.com/watch?v=_ODQ_lHRMXo](https://www.youtube.com/watch?v=_ODQ_lHRMXo)

~~~
khedoros1
MAME's implementation shows 5 contributors. Maybe you could ask them?
[https://github.com/mamedev/mame/blob/master/src/devices/soun...](https://github.com/mamedev/mame/blob/master/src/devices/sound/sn76477.cpp)
[https://github.com/mamedev/mame/blob/master/src/devices/soun...](https://github.com/mamedev/mame/blob/master/src/devices/sound/sn76477.h)

~~~
buzzybee
AFAIK MAME's accuracy leaves a lot to be desired with respect to anything
involving analog signal paths. For example, the sound system used in the Sente
SAC-1 hardware is based on the CEM3394 chip, also seen in several pro synths
of the era. The emulation does play sound, but last I checked, there wasn't
any filter emulation, so it poorly represents the audio of those games.

Edit: And I wouldn't expect the situation to change soon. Accurate analog
emulation is something commercial VST plugin makers have been working on for
years, and they've come "close enough for most people", but the time spent on
algorithm development and optimizing CPU usage is quite high.

------
ChuckMcM
Fun, I used to build various things with the 76495
([http://robotics.mcmanis.com/resource/rs_sn76495.pdf](http://robotics.mcmanis.com/resource/rs_sn76495.pdf))
and I'm not sure what exactly is different between the two, apparently there
were at least 3 'complex sound generators' in the TI family( '477, '488, '495
). When RadioShack discontinued them I bought 6 or 7 of them from the discount
table for 50 cents each.

Of course these days you'd use a microprocessor to generate all of the sounds
these could do. But it would still be fun to build the sound effects kit that
RS use to sell.

~~~
crb3
> I'm not sure what exactly is different between the two

The 76477
([http://www.vgmpf.com/Wiki/images/4/40/SN76477_-_Manual.pdf](http://www.vgmpf.com/Wiki/images/4/40/SN76477_-_Manual.pdf))
has more pins and uses them to bring out more of the controls. The noise-clock
in particular is controllable by anything that sinks its 'resistor' pin's
current to ground, so a simple NPN sink driven by a slow sawtooth will
smoothly vary the noise output from a 'tiktiktik' to a roar. The 76495 doesn't
make that control available.

------
sehugg
This chip was for sale on BG Micro as recently as 2008 -- I wonder who ordered
a production run? [http://www.popsci.com/diy/article/2008-12/complex-sound-
gene...](http://www.popsci.com/diy/article/2008-12/complex-sound-generator-ic-
back)

~~~
nom
I've wondered that, too! Even considering the low complexity, that's a couple
of 100k investment, at least.

Can anyone here approximate the cost to re-produce this chip ten years ago? I
mean, it's not very complex, but it is analog and it couldn't have been cheap.
Maybe someone had to find a use for an old machine that had nothing to do
anymore? That could explain it.

~~~
kken
They most likely found a source for NOS (new old stock) chips. I find it
highly unlikely that they started another run.

Considering the age of the chip, the masks are probably not even available in
a digital format and the fab that made it had been shut down a long time ago.
Recreating these processes is a massive undertaking that takes a lot of
manpower.

------
nom
Nice article. Unbelievable how simple this chip is. Try reverse engineering an
ARM Cortex, Intel i7 or a Geforce 10 GPU, you'll never understand how it works
completely, even if if you have a billion dollars to spend.

~~~
kens
Well, the ARM-1 is simple enough to understand [1], so the ARM Cortex might be
comprehensible, depending on how much crazy stuff they added. But I suspect
even at Intel nobody entirely understands the i7.

[1] [http://www.righto.com/2015/12/reverse-engineering-
arm1-ances...](http://www.righto.com/2015/12/reverse-engineering-
arm1-ancestor-of.html)

~~~
pm215
Bear in mind that 'Cortex' covers every modern ARM chip right the way from a
tiny (~12,000 gates) microcontroller like the Cortex-M0 up to high performance
64 bit designs like the Cortex-A73, so it isn't a label that tells you
anything about complexity...

------
dreamcompiler
Wow. I still have one of these chips on a board somewhere I built from a Radio
Shack kit. Good times.

------
grenoire
Every single time I feel smarter, Hacker News manages to show me something I
can't fathom.

~~~
scoates
That's also age.

------
retox
Completely over my head but still interesting.

