top of page
Writer's picturerehsd

Dynamic Sound Editor

Updated: Oct 12, 2021

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.

Registers to Modify PSG Behavior
Registers to Modify PSG Behavior

Given these registers, here is the Windows forms application.

Windows User Interface
Windows User Interface

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.

High-level Design
High-level Design

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.




Next Steps

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. :)


Postscript

Updated user interface:

Updated User Interface
Updated User Interface

79 views0 comments

Recent Posts

See All

Comentários


bottom of page