The DMA flag is just to use DMA or not for the fill operation, if a previous DMA was still occurring you will screw up VRAM if you try to write it (by DMA or not).cero wrote:A couple posts above:
I understood the use_dma parameter as "do it faster if no other DMA is in progress". Am I wrong?
I tested your rom and i obtained a blank screen... look like you are using your own makefile and do not align rom size to 128 KB (which can be a problem for some flash cart). Still given your code you should not experience any troubles

Honestly i think it would be better to just allow 'wait for completion' on specific DMA VRAM fill and DMA VRAM copy operations as these are the only possible cases whee you can have troubles. And DMA VRAM fill as DMA VRAM copy are very rare operations.cero wrote:Hm, would it be too much overhead to add VDP_waitDMACompletion() to the start of every VDP function, thereby making all functions safe to use, and also allowing user code to do non-VDP things when the DMA fill is going on?
If it was made an inline function, that'd be just one or two instructions.