I previously posted an overview of my 6502 audio setup. Since I have no background with 8-bit computer audio, I wanted to experiment with the different audio parameters on the AY-3-8910 and YM2149 Programmable Sound Generators (PSGs). I was hoping to do this in a dynamic way -- while the system is running, without changing code, updating EEPROMs, and restarting the 6502 system. With this in mind, I developed a Windows application that allows dynamic modification of PSG parameters while the 6502 is running. Modification of the PSGs is done via the following registers.
Given these registers, here is the Windows forms application.
The following graphic shows the high-level design. When the Update button on the Windows form is clicked, the Windows application sends the updated PSG parameters to an Arduino Nano via USB serial. The Nano caches the parameters and generates an interrupt on CB1 of one of the VIAs. The 6502 then uses SPI to request and retrieve the parameters from the Nano. Once the 6502 has retrieved the parameters, they are applied to the corresponding PSGs. In my current setup, I am running two PSGs -- for left and right primary channels. I have designed Dynamic Sound Editor to support two additional PSGs, as I have PCBs on order with support for four PSGs.
Following is a video demonstrating this solution in action. It will become quickly (and painfully) apparent that I need to do some noise filtering, but hopefully you'll get the idea.
Note: You may notice the OLED screen I added to the Nano. This has proven to be extremely valuable in troubleshooting. Instead of writing debug information to serial, I can write it to the OLED screen. This is especially important as I'm sending a fair amount of data already with serial, and I don't want to mess up the data stream with debug information. In the video, if you watch closely, you'll see the OLED display raw serial data received; it then display data sent via SPI.
I plan to add support for notes (vs. setting tone periods). I would also like to build some sound effects. I may even try to play 'music' with PC control.
...and I need to filter out noise between my 6502 and audio capture on the PC. :)
Updated user interface: