So there's this little project I've been working on for the past few weeks, which I think is at a good stage to start showing off. Its still very much a work-in-progress, but the most critical components are now working.
What I'm building is a contraption that can play NES game music using an authentic RP2A03 CPU/APU to do the audio synthesis. Beyond the RP2A03 itself, however, I'm attempting to do this with entirely modern components.
My system is basically composed of two halves:
The NES half contains the RP2A03, an SRAM chip, and EEPROM chip, an audio amplifier, and an I2C interface.
The "modern microcontroller" half currently contains an Espressif ESP32-WROOM and a microSD card interface. Eventually, I intend for it to have a display and some buttons for control. (I'm also seriously considering wrapping up a version of this project into an alarm clock, which uses the ESP32's Wi-Fi for network time sync.)
The system currently works by reading the music from VGM files, and generating a command stream to tell the 2A03 what to poke at its APU registers.
Here's a video of my first end-to-end test:
https://www.youtube.com/watch?v=97jic_WRrwY
And a follow-up playing a different track:
https://www.youtube.com/watch?v=eafaFr9Q_rU
And here's the work-in-progress schematic of the NES half of the system:

At the outset of this project, the VGM format seemed like an ideal thing to start with. Lots of rips already available, and the format was literally "poke this value into that register, sleep for X samples, poke this value into that register, etc." In very little time, I was actually able to write a quick-and-dirty C program that could convert VGM into a dump of 6502 assembly (or data easy to iterate over in 6502 assembly). Of course it filled my memory to play only a few seconds of Super Mario Bros this way, but that was enough to give me a huge grin.
As I got deeper into it, I also learned about NSF. It seems like NSF has an even larger catalogue of rips and is more populate in the chiptune community. Unfortunately, NSF seems to only be viable on emulators (or if you have just the right combination of "architecturally correct NES /w whichever bank switching chip a particular game felt like using"). So when/if I decide to consider dealing with NSF files, I think I'm going to have to basically convert it to VGM first. (Either by hacking an emulator on my PC, or by running a stripped down emulator on the ESP32 that captures APU writes and sends them across.)
Anyway, enough rambling for now, and I'll save any involved back-stories and inspirations for a future blog post. I just felt like I had to get some sort of forum post about this project out there.
What I'm building is a contraption that can play NES game music using an authentic RP2A03 CPU/APU to do the audio synthesis. Beyond the RP2A03 itself, however, I'm attempting to do this with entirely modern components.
My system is basically composed of two halves:
The NES half contains the RP2A03, an SRAM chip, and EEPROM chip, an audio amplifier, and an I2C interface.
The "modern microcontroller" half currently contains an Espressif ESP32-WROOM and a microSD card interface. Eventually, I intend for it to have a display and some buttons for control. (I'm also seriously considering wrapping up a version of this project into an alarm clock, which uses the ESP32's Wi-Fi for network time sync.)
The system currently works by reading the music from VGM files, and generating a command stream to tell the 2A03 what to poke at its APU registers.
Here's a video of my first end-to-end test:
https://www.youtube.com/watch?v=97jic_WRrwY
And a follow-up playing a different track:
https://www.youtube.com/watch?v=eafaFr9Q_rU
And here's the work-in-progress schematic of the NES half of the system:

At the outset of this project, the VGM format seemed like an ideal thing to start with. Lots of rips already available, and the format was literally "poke this value into that register, sleep for X samples, poke this value into that register, etc." In very little time, I was actually able to write a quick-and-dirty C program that could convert VGM into a dump of 6502 assembly (or data easy to iterate over in 6502 assembly). Of course it filled my memory to play only a few seconds of Super Mario Bros this way, but that was enough to give me a huge grin.
As I got deeper into it, I also learned about NSF. It seems like NSF has an even larger catalogue of rips and is more populate in the chiptune community. Unfortunately, NSF seems to only be viable on emulators (or if you have just the right combination of "architecturally correct NES /w whichever bank switching chip a particular game felt like using"). So when/if I decide to consider dealing with NSF files, I think I'm going to have to basically convert it to VGM first. (Either by hacking an emulator on my PC, or by running a stripped down emulator on the ESP32 that captures APU writes and sends them across.)
Anyway, enough rambling for now, and I'll save any involved back-stories and inspirations for a future blog post. I just felt like I had to get some sort of forum post about this project out there.
