0 Members and 1 Guest are viewing this topic.
But is it possible to have the DMA run while the program continues? The program may have to use double-buffering in that case, but it sounds possible.
Quote from: calc84maniac on August 25, 2012, 05:00:33 pmBut is it possible to have the DMA run while the program continues? The program may have to use double-buffering in that case, but it sounds possible.In fact syscall 0x0260 runs a simple wait-for-DMA-ready-loop while the DMA takes place,only checking DMA0_CHCR_0.TE (Transfer End Flag) and DMA0_DMAOR.AE (Address Error Flag).During this wait-loop, you could possibly do anything, which does not disturb the running DMA-job.But that would mean to replace Bdisp_PutDisp_DD by some assembler function. Bdisp_PutDisp_DD itself does not offer any hook.
What would disturb it? writing to the memory it is copying (or would it not mind this)? Using a syscall that tries to use the DMA?
hmm... I will see about using the background VRAM as a second buffer. I don't know of anywhere that documents the required writes and such to copy the VRAM to the LCD. Do I need to play with the LCD at all before using the DMAC?
Quote from: AHelper on August 26, 2012, 12:24:03 pmhmm... I will see about using the background VRAM as a second buffer. I don't know of anywhere that documents the required writes and such to copy the VRAM to the LCD. Do I need to play with the LCD at all before using the DMAC?I am about to write some little assembler function, which will transfer any rectangular range from RAM to the LCD's GRAM via DMA. When it works well I will post the source.
Based on my experiences with other SoCs, you can do anything you want during an LCD DMA, as the LCD DMA controller is separate from the rest of the memory subsystem and won't prevent any other memory accesses.
I love the work that Simon does, but I prefer when I understand what happen! :p
So, will the future routine be speedier than the syscall? The loop that disp_Vram creates will be avoided?
When you make the code public, would you like me to add it to http://prizm.cemetech.net/? Link to a post here?