|
Great trick! I knew the DMC is good at playing an angled waveform (like a triangle), but it just didn't occur to me that setting $4011 back to the top could make a sawtooth wave. It sounds really good.
One thing you'll need to do to make it work on an NES is write $C0 to $4017 to select the DMC channel as the IRQ source.
That 'JSR vbl' might be unsafe since 'vbl' returns with an RTI. And you'd better push/pull the X register there too, since it's in use. But that's minor stuff anyways, the interesting part of the program looks like it works. :-)
I only wish it could play lower notes. Why isn't a value of 0 used in the period table? But hey, I'll take whatever I can get, heheh.
|