Oh ok, yes I remember now you said the same data works in a different configuration.Badwolf wrote: Wed Nov 09, 2022 10:20 pm It all works with TT-RAM disabled, music included and the base game (same game files) works with DFB1 disabled.
The odd slowness only seemed to happen when:-
1) TT-RAM was available and being allocated to;
2) The game was not set to load itself into TT-RAM (the files as extracted).
So....
PRG=STRam, Alloc=STRam, music=on, result=ok
PRG=STRam, Alloc=TTRam, music=on, result=bad!
PRG=TTRam, Alloc=TTRam, music=off, result=good?
PRG=TTRam, Alloc=TTRam, music=on, result=???
Just trying to keep track
The DMA frame buffer is in STRam, dynamically allocated via MXAlloc. This is the only part that needs to be in STRam because its the only part the hardware is looking at.Badwolf wrote: Wed Nov 09, 2022 10:20 pm The breakthrough was disabling music when TT-RAM was available and then allowing the program to run from TT-RAM.
I don't suppose allocating from TT-RAM is causing an overhead copying sounds to ST-RAM for DMA or something convoluted like that?
The samples themselves could be in TTRam or STRam - the CPU mixes them into the DMA frame (STRam) regardless. It should just take less time when they are coming from TTRam.
Although... samples are bytes. It would be reading bytes from TTRam during the mixing step, maybe not always consecutive bytes either. But I can't see a problem with that. And it does this from STRam normally - which is slow - without issues.
There will be more events injected for sure, but the Codec DMA frame 'rate' will remain at 1 per 84ms. It just means there are more channels to mix down (by the CPU) to prepare the buffer for each one. So yes, there is more to do, it will take longer and maybe more chance of a deadlock, but I've never seen a deadlock occur in the sound system for any reason (it doesn't wait for anything, although I think it has a bypass condition where it can bail on an overrun condition, i.e. if a new frame interrupts itself before completing the old one) and it's still not clear how TTRam would play a part in this situation too.Badwolf wrote: Wed Nov 09, 2022 10:20 pm The only difference I can see with music and SFX would be the frequency at which they happen, perhaps increasing the chances of seeing a deadlock somewhere?
