cyborgar / Petaxian

C64 Galaga type game implemented in Prog8
GNU General Public License v3.0
15 stars 3 forks source link

sound could perhaps use new psg module? #11

Closed irmen closed 2 years ago

irmen commented 2 years ago

I've just added a psg library to the upcoming prog8 release. https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/cx16/psg.p8 Here are the changes I made to the Tehtriz example to use this library instead of poking the vera PSG itself: https://github.com/irmen/prog8/commit/3ec05709d58fd20f425bdff5c7174c43d2ed5fac (recently I also added a max volume parameter to the envelope calls)

Maybe Petaxian can benefit from this as well? The envelope handling is done in an irq so no need to track sound cutoff manually as well. Just set an appropriate attack/sustain/release and let it go.

cyborgar commented 2 years ago

I'll probably look into that when it's released.

I've considered trying to make a sid tune for the C64 version as well, but have never managed to get up enough energy to learn to use tracker tools again. I did make a few tunes for some (not very good) demos with SoundMonitor and ProTracker back in the 80s (and later on the Amiga). Would use a modern pc program now though (GoatTracker) if I do that. That definitly wouldn't be compatible with CX16 which so hasn't been high on the priority list.

irmen commented 2 years ago

ZeroByte is making a zsound library that can play back music exported from tracker tools like Furnace tracker or DefleMask, I believe. So we'll be getting music and perhaps sound fx on the x16 from that in the near future

cyborgar commented 2 years ago

I've switched to using psg lib now. Sound effects are not exactly the same since I experimented a bit with ASR values.