I compiled the streaming wave file program, successfully after upgrading 64tass.



Well, I don't know what I did wrong earlier, but now it's working...at least in the context of the demo program. On to the larger task....stay tuned...yock1960 wrote: ↑Wed Jun 21, 2023 7:05 pm Irmen,
I compiled the streaming wave file program, successfully after upgrading 64tass.Works great with some files that I just happened to have laying around! After futzing about for a while, I finally managed to get it to stream two files consecutively, but only if I did practically nothing in between each file. I'm missing something.
I suspect it has to do with the interrupt handler...not something I'm very experienced with, but perhaps that's not it. I tried saving the old vector and restoring it in between files, but either I'm doing it wrong, or that's not it!
It seems like this should be doable. I'd like to incorporate this into my current project, to play some wave files when not much else is going on. Any insight you can give me would be great!
Well, it worked...until I moved this bit:desertfish wrote: ↑Wed Jun 21, 2023 7:23 pm I was just about to try to give some hints, but great that you managed to proceed already.
I think you could just disable the AFLOW IRQ bit once you detect the end of a wav file, set up reading the next one, and then re-enabling the AFLOW bit again
I haven't changed anything in the 'interrupt' block, I simply copied (cut and pasted) from the line cx16.rombank(0) to the line cx16.VERA_AUDIO_RATE = 0, to it's own sub. Made local variables for size and block size, or even referenced the originals from start(), makes no difference.desertfish wrote: ↑Wed Jun 21, 2023 11:02 pm Are you by any change manipulating Vera registers inside the IRQ handler?
That is super tricky. There are some helper functions in prog8 that can save/restore the vera state in this case. Also make sure the rom and ram banks are set back to their initial values if you manipulate those in the irq handler .
(unless you depend on them changing)
Well, I'm not allergic to C either, but I have taken against it. I really liked Slang, which was written for the C64 SuperCPU and is compatible with the CX16...to a point...can't use floating point since the routines have moved on the CX16 and sadly it hasn't been maintained for well over a decade.ahenry3068 wrote: ↑Thu Jun 22, 2023 12:50 am I'm in a quandary myself.
I've been doing a bunch of BASIC Code.
My favorite language has been Pascal. Borland got me started/
I'm not allergic to C....
I'm trying to make a choice here for when I get more advanced than BASIC
allows without PEEK and POKE
I'm down to CC65, Prog8 and PAS65
I'm currently leaning toward PAS65......... Just because that is "MY" language
Slightly different issue, probably won't matter at all in the long run, but curious and I'm curious about it. The buffer that is established using the memory() function, I replaced it by creating a uword pointer to $a000. Page aligned and nothing else should be there and I'm not altering the ram bank. On starting the program it will either work normally, or I will get garbage or highly distorted sound. I'm wondering if it's an emulator/windows issue or something else? As I said, it probably won't matter, since I will probably need to move the buffer back to 'main' memory in order to use the $a000 area for code. I believe that the 8k will be enough that I won't have to do anything really fancy....if I even need to at all.yock1960 wrote: ↑Thu Jun 22, 2023 9:22 am Well, I've managed to incorporate playing of .wav files into my project. It's a bit ugly; 'unnecessary' repeating of code and a small hit on memory usage, but it's working.![]()
Do I understand...no, but that's nothing new....and, you don't have to understand something completely in order to use it!![]()