iComputer7 / RaspiPicoVGM

Hardware VGM player powered by a Raspberry Pi Pico
Mozilla Public License 2.0
2 stars 2 forks source link

Pico VGM Player

There's so many of them and they're so rare and it would be impossible to drive and like, you'd have Bitchin' Fast 3D but VGM style.

~ @AidanHockey5

This is my attempt to support as many sound chips as I can get my hands on while learning about VGM files and the RP2040. My goal is to make an extremely modular player that gives you the freedom to cobble something together quick and dirty with whatever parts your heart desires, aside from the microcontroller of course.

Please be aware that this currently is a proof of concept! It lacks a lot of essential functionality at the moment! I am incredibly inexperienced with the RP2040 platform as a whole and it certainly shows here. I think I at least tried to somewhat explain my thought process through comments. Pull requests and issues are welcomed and encouraged! If you can clean up this mess or have ideas on what I should change, do not hesitate to share them!

As of right now, it only supports playing uncompressed VGM files that are on the root of the SD card and named song.vgm.

Scroll down to see GPIO mappings!

Various circuits and code snippets are adapted from:


Currently Supported Chips


Todo List (not in any specific order)


Helpful Resources


GPIO Pins

The VGM tick clock needs GPIO0 and GPIO1 connected. This is a temporary hack because I don't know what I'm doing. The RP2040 has bizarre timers.

Pin Description
GPIO0 VGM tick input. Connect to 44.1 KHz clock or else songs won't play!
GPIO1 44.1 KHz clock generator output (connected to GPIO0)
GPIO2 SPI SCK
GPIO3 SPI MOSI
GPIO4 SPI MISO
GPIO5 SD card chip select
GPIO6 SAA1099 clock
GPIO7 SAA1099 A0
GPIO8 SAA1099 WR
GPIO9 SAA1099 #2 chip select
GPIO10 SAA1099 #1 chip select
GPIO11 OPL3 WR
GPIO12 OPL3 A0
GPIO13 OPL3 A1
GPIO14 OPL3 chip select
GPIO15 OPL3 IC (reset pin)
GPIO16 Data bus bit 0
GPIO17 Data bus bit 1
GPIO18 Data bus bit 2
GPIO19 Data bus bit 3
GPIO20 Data bus bit 4
GPIO22 Data bus bit 5
GPIO26 Data bus bit 6
GPIO27 Data bus bit 7