MEGA65 FORUM

Audio capabilities

LGB

By the way, I've coded a tech demo to play audio on C64DTV with just using DMA. The theory is about the following: let's set target to the DAC part, target step is zero. Source is set to the sample. Now the problem, that the playback rate is insanely fast. However on C64DTV, you can make fractional step for source, so basically it will repeat the same sample byte over and over before moving to the next one. With experimenting a bit with the fractional step value I managed to find a sane value, though not every frequency can be done this way, just it's possible to find "some" which makes sense at least. On C64DTV, the DMA is "backgrounded" always, which is great (audio can be played without CPU while CPU does something else), so you can playback audio without using CPU at all (though end-of-DMA IRQ is used to re-program the DMA for the next chunk). However this backgrounded DMA is also a problem on C64DTV: the speed of actual transfer is important! And this is even affected by VIC-II badline emulation using Blitter meanwhile and many other things ... So it's only stable if you provide these fixed meanwhile with using no bad-line emulation, no blitter, etc etc meanwhile. Ok, sorry it was not so a M65 related topic :)

:: @LGB added on 20 Jan ’18 · 14:43

http://codebase64.org/doku.php?id=base:dtv_dma_sid_digi_player

Append

(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Deft, gardners, MARCOM