Reverse engineering the sound amplifier of a popular portable console - discussing the main findings

In early May, material was published on Hacker News, the author of which reverse engineering the sound amplifier installed in the Nintendo Game Boy Color. We will discuss the main thing.

Earlier we talked about Sound Blaster 1.0 and the map for the IBM PC - Innovation SSI-2001 .


Photo Elias Castillo / Unsplash

Game Boy Color was released in 1998, and the console quickly became popular. For her, several hundred games of different genres were released. There were horror - for example,Alone in the Dark.

The immersion in the atmosphere of games allowed the support of stereo headphones and a built-in mono speaker. A microchip with three amplifiers was responsible for their work. Programmer fan old school and art Ken Shiriff (Ken Shirriff)heldreverse engineering of the chip and made it scheme. For this, the engineer used aphoto of the crystal, on which several unusual technical solutions are noticeable.

Chip structure


In general, the integrated circuit of the device can be divided into five components. Right in the middle is the amplifier for the speaker, and to the left of it are large output transistors. They increase the power of the frequency oscillations to the operating values ​​of the dynamic head. The amplifier also contains a differential pair, current mirrors and other service ICs.



Headphones amplifiers are located in the upper right and lower corners. Their output stages consist of ten transistors connected in parallel. Systems share current sources and current mirrors - these components are installed between amplifiers. At the bottom of the chip is the control logic. She switches the system between amplifiers for the speaker and headphones.

Transistor Features


Ken Shiriff noted on his Twitter that the Game Boy's sound amplifier contains approximately one hundred NPN and PNP transistors. They consist of three semiconductor layers with an alternating type of conductivity: emitter, base and collector and are controlled by current. The use of these transistors is not typical for digital circuitry, where MOS transistors (metal-oxide-semiconductor) are common - unlike bipolar transistors, they are voltage-controlled.

One of the residents of Hacker News in the thematic thread said that if the Game Boy sound amplifier were developed in our time, then it would be the CMOS structure that would be its basis.

The Nintendo retrochip, based on NPN and PNP transistors, has also built several circuits that may seem unusual for digital circuitry. But they are quite commonplace for analog ICs. One of them is current mirrors, which play the role of current stabilizers. For example, in the diagram you can find a current mirror, consisting of six PNP transistors.

The largest transistors in the circuit are NPN transistors. They are located in the upper left corner of the IP and play the role of output stages for the speaker.

Resistors and Capacitors


The resistors in the diagram are long zigzag strips made of p-type semiconductor (silicon). This approach allowed engineers to save space on the chip.

Also on the chip are three large capacitors - one for each amplifier. They look like a “sandwich” of metal, silicon and an insulating oxide film and play the role of stabilizers for amplifiers.

Other Game Boy Enthusiast Projects


Last year, a French engineer reverse engineered SoC for the Game Boy. He drew up APU , PPU , and I / O systems, and published them on GitHub . In total, he spent 191 hours searching for all the compounds and drawing up the drawings.


Photo Hello I'm Nik / Unsplash

Enthusiasts not only conduct reverse engineering of old-school game consoles, but also develop their emulators. On GitHub, you can find Mooneye GB on Rust. The emulator supports both the original Nintendo console and later console versions - for example, Game Boy Player, released at the beginning of the 2000s.

Another project in the same series is Cinoop . It -open multi-platform emulator (works on Windows, DS, GameCube, 3DS, Linux, PSP and PS4), written in C language. An example of the work can be viewed on YouTube - the author plays in Tetris .



Additional reading in “Hi-Fi World”:

“Rhythm games worth knowing”: which projects put on sound and made it part of the genre
Creators of music for computer games: several prominent names
Where can I get audio for game development? Libraries with the sounds of nature
What are the features and tasks of the sound accompaniment of games



We have on Habré: strange audio gadgets, sounds that we lack, and how to escape from the crisis .



All Articles