Play Your Favorite Video Game Soundtracks Using The Original Hardware Sythesizers

Similar projects worth following
ChipTuneForever is a series of Raspberry Pi modules that attach to a stock Raspberry Pi. These Hats contain only and all the circuitry needed for a particular Sound Chip to function, and can be easily driven using a common signaling protocol found on all Raspberry Pis.

This means that you will be able to easily play Video Game Soundtrack files found online, such as Sega Genesis VGM and Super Nintendo SPC files, using the original hardware that was inside those consoles at the time. Nothing is closer to 100% accuracy than the source, so let's start there :)

After I finished working on a standalone Sega Genesis chiptune player, I realized that the solution I came up with was not easily portable to different sound chips. I had a vision of a low-cost interface that plays video game music from a microsd card that anyone can build and expand on, but the amount of time spent engineering each individual revision for each sound chip was just too much.

So I took a step back and thought of a more accessible approach: by utilizing a backbone that is already cheap and easily available almost anywhere, end-users will be able to collect more sound chip modules without paying for essentially the same thing over and over, and developers who want to add their own personal favorite chiptune instruments to the project could easily build on the resources available from other contributors. ChipTuneForever was born.

ino - 15.65 kB - 01/31/2017 at 23:57


plain - 11.39 kB - 10/22/2016 at 19:29


plain - 5.17 kB - 10/22/2016 at 19:29


sch - 862.88 kB - 10/06/2016 at 15:10



Some Noise Problems

brd - 197.65 kB - 10/06/2016 at 15:10


  • 1 × Raspberry Pi Different Modules may require specific boards, but we should try to stick to 26-pin headers for compatibility
  • 1 × ChipTuneForever Hat Sega Genesis Module will the first one to be produced, more soon!
  • 1 × Amplifier Sounds are coming out of the circuit expecting to be connected to a TV or Home Theater Amplifier
  • 1 × Power Supply Some of these chips can suck down as much as an Amp when operating, so something more robust than the stock Raspi power supply is needed

  • SegaGenesisForever

    jareklupinski10/06/2016 at 14:13 0 comments

    The first module I will develop for the ChipTuneForever project will be a Sega Genesis Hat. I already have a lot of experience working with the chip, so I'm pretty much set on the hardware side. On the software side, I have some learning ahead of me to do: I'm picturing a simple interface in python that takes arbitrary VGM/VGZ files, parses and decompresses them, and pipes the appropriate instructions to the sound chips on the Hat.

    I have finished the first prototype and sent the board off to production. Once the board is back in I'll assemble it and start writing the interface code. Currently the chips are accessible using the Raspberry Pi's SPI interface, which allows for ( as I've read ) up to 125MHz on the SCLK line, which according to the 74AHCT595 datasheet is definitely doable. This will keep the sound chips fed fast enough to maintain a 44.1KHz sample rate (the rate at which VGM files are played).

View project log

  • 1
    Step 1

    Prepare your Raspberry Pi ( Only necessary once, if you've never set up a ChipTuneForever Hat before)

  • 2
    Step 2

    Plug in the Hat on top of the Pi

  • 3
    Step 3

    Plug in an Amplifier

View all 4 instructions

Enjoy this project?



Jesse wrote 08/08/2017 at 14:08 point

Is this project still being worked on? This seems like it would be more expandable than the Genesis Forever project. I also saw in a YouTube comment you left on one of your videos (for Genesis Forever though) that you planned on putting kits together for this, I would definitely be interested in that.

  Are you sure? yes | no

ajlitt wrote 10/23/2016 at 06:33 point

I really enjoyed your demo on the HAD TV hangout earlier.

Here's a thought on your timing problems in Linux: Let the SPI interface do the timing for you.

Your operations are (I think) all writes, so use the SPI master in DMA mode and keep the buffer full with bus operations.  You would set the SPI bus speed such that a full scan of the shift registers takes less than the minimum state change timing on the parallel bus.  This would be your bus timing quantum.  You would then repeat the same value to the shift registers for output N times to create a delay of N * shift_register_bits * 1/SPI_clock.  Writing the same value to the shift registers is a no-op of course.

This would eliminate dependency on sleep() to keep time, and the DMA buffer would let your task ride out gaps where it gets rescheduled.

  Are you sure? yes | no

jareklupinski wrote 10/23/2016 at 06:44 point

Thanks :) it was fun

that's a really clever strategy! I'll read up more on DMA to figure out how to do this kind of wizardry. do you know of any code online that you could point me towards for a good example?

  Are you sure? yes | no

ajlitt wrote 10/23/2016 at 19:48 point

i haven't used it myself, but I did find this fork of the existing SPI driver:

In order to use it you'd have to write a kernel driver.  But maybe having your parallel bus abstraction in the kernel would be better.  You could create a character device interface that takes address/data to write to the bus along with a delay, and the driver fills the DMA buffer with the proper number of SPI shift cycles to meet the delay time.  Then you could eliminate your C user space driver altogether.

  Are you sure? yes | no

davedarko wrote 10/22/2016 at 23:27 point

I recently obtained a SID from a C64, would be interesting to connect that to a PI. Thanks for the inspiration (if I'll ever get to do that)

  Are you sure? yes | no

jareklupinski wrote 10/23/2016 at 04:29 point

which chip is that? is it easy to get more :) I bet starting a C64 branch would bring a lot of people in!

  Are you sure? yes | no

davedarko wrote 10/23/2016 at 08:43 point

Well I got the 8580R5 out of it, but there's also the 6581 - - they're a bit pricey these days. But there's a big fanbase..

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates