kliepatsch 70 Posted October 18, 2020 Tiny PCM Synth View File I wanted to explore the possibilities with the PCM output. This tiny synth generates a sweet tone from three sine waves, coated in a thin shiny silver layer of aliasing. To spice it up, I also added a delay effect. You can play it with your keyboard. Use Z and X to switch octaves. I do not plan to follow this route any further, because the possibilities are quite limited with the X16. I am sure one could do better than I did, but the X16 doesn't have enough power to provide a whole lot of flexibility in the sound generation (at least with PCM). Find the source here: https://github.com/biermanncarl/cx16-tiny-pcmsynth Feel free to reuse the code for your own projects! Submitter kliepatsch Submitted 10/18/20 Category Audio Apps 3 Quote Share this post Link to post Share on other sites
StinkerB06 29 Posted October 19, 2020 AMAZING JOB!!!!!! This likely wouldn't be reliable for use in an actual game though, considering how CPU-intensive synthesizing PCM audio on the fly is. If you want to reduce the CPU usage though, have you thought about using some of the additional 65C02 instructions? All of them are said to be compatible with R38. 1 Quote Share this post Link to post Share on other sites
kliepatsch 70 Posted October 19, 2020 (edited) Thanks! I didn't know about the extra 65C02 instructions. Looking at them, I think they would rather benefit the keyboard polling code than the actual sound generation, unfortunately. The question is rather, if the game would run reliably alongside this I think atm the CPU usage is 70-80% -- so you would still have a C64 equivalent of computing power left for the game Edited October 19, 2020 by kliepatsch Quote Share this post Link to post Share on other sites
StinkerB06 29 Posted October 19, 2020 32 minutes ago, kliepatsch said: Thanks! I didn't know about the extra 65C02 instructions. Looking at them, I think they would rather benefit the keyboard polling code than the actual sound generation, unfortunately. Have you ever seen the FAQ page? It says "WDC 65C02S @ 8 MHz". Quote Share this post Link to post Share on other sites
kliepatsch 70 Posted October 19, 2020 Yes, I have been there. That doesn't necessarily mean I understood that information in all if its consequences 1 Quote Share this post Link to post Share on other sites
StinkerB06 29 Posted December 20, 2020 Also, I see you use a BRA instruction in your code, which is on the 65C02 but not the original. Quote Share this post Link to post Share on other sites
kliepatsch 70 Posted December 29, 2020 Yes One more sign that I didn't know what I was doing ... I saw that command somewhere, likely in some source code by Matt Heffernan, and thus used it myself, wondering why it didn't appear in the 6502 instruction set Quote Share this post Link to post Share on other sites