Michael Moffitt's Website

I like projects!

Restoring Gimmick! expansion audio on an NES internally

Written 8/20/15

"Gimmick!" by Sunsoft is one of my favorite platformer games for the Famicom. Aside from being a great game, the music is top-notch, partially because the game uses an extra audio synth contained inside the cartridge. Only the Japanese version with an original japanese console, or a modded NES console with an adapter can play the game properly will its full audio.

I do have a real cartridge, but it's 2,500 miles away. I have an Everdrive N8 cartridge that loads software from an SD card, but it does not implement the Sunsoft 5B audio chip (which is really a Yamaha YM2149, which is really an AY-3-8910). Many people have taken other mostly-compatible cartridges, like Return of the Joker, and converted it to play Gimmick, with some solder work following to add the sound chip to the cartridge.

I don't wish to cram extra electronics inside the Everdrive cartridge, as it's pretty packed and I don't want to break it. Instead, I opted to wire the sound chip inside my NES itself. The game writes to it just using the regular CPU bus (PRG bus) and doesn't rely on the mapper at all, so there's no reason that should not work.

Here's the chip in question:

The schematic used by many to implement the sound chip in the cartridge comes from the now-404'd Rom Laboratory. I have a copy of it here:

I've mapped out the relevant points on the NES. I was confused at first by the nomenclature here. PRG /CE is the same as PRG /ROMSEL.

I won't need the reset circuit, as the chip can reset using the 2A03 CPU's reset signal, and I don't need the clock divider because the YM2149 provides that feature already. I put the circuit mostly together on the breadboard here:

At that point, it was just point to point soldering. The trim pot was for adjusting the output impedance, but I ended up bypassing it. In the end I tied the three outputs of the chip together and pulled them to ground with a 1K resistor, as shown in many reference circuits for the YM2149. The output was then brought directly to pin 3 of the NES's expansion connector to be mixed in. The board is mounted to the right.

I found a more convenient location for reset by the 10NES chip:

You can see it working here. For those not familiar, the 50% square wave chords are provided by the YM2149, alongside the player sound effects (jumping, star throwing), and the bassline for the secret area.

All of this just to hold me off until I am able to get back to my real cartridge! I should note that I am also mixing in pin 9 off the expansion connector through a 47k resistor to pin 3 so the everdrive's audio can work when it provides it. In order to let it coexist with the YM2149, I've installed a simple switch to select which one I would like to mix in, since the YM2149 wins in a situation of contention between the two. In the future I may make a real mixing circuit that is more robust, but for the time being, this will suffice.
Back to main index

This website was generated using MicroLog.