View unanswered posts | View active topics It is currently Thu Nov 23, 2017 5:44 pm



Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
 MODE_FIFO flickering/corrupt 
Author Message

Joined: Thu Jul 02, 2009 1:19 pm
Posts: 349
does display mode MODE_FIFO work in DSi mode? when I use the following code all I get a flickering mess with vertical lines that appear at varying thicknesses. I have the buffer filled with a left to righ gradient, the buffer is an aligned u16 array in main memory.
Code:
DMA0_SRC = (u32)buffer;
DMA0_DEST = (u32)&REG_DISP_MMEM_FIFO;
 DMA0_CR = DMA_ENABLE | DMA_DISP_FIFO | DMA_REPEAT | DMA_DST_FIX | DMA_32_BIT | 4;

are there any special considerations/timings that need to be taken into consideration? a working example of this would be appreciated if anyone has one.


Mon Sep 19, 2011 1:56 pm
Profile

Joined: Thu Dec 18, 2008 8:33 pm
Posts: 22
DC_FlushRange(buffer,size);


Mon Sep 19, 2011 11:01 pm
Profile

Joined: Thu Jul 02, 2009 1:19 pm
Posts: 349
z.g wrote:
DC_FlushRange(buffer,size);
this is not the issue as I am writing to buffer through the uncached mirror - I used memUncached to get the pointer for writing. I use the original cached address for setting the dma registers. that may account for some flickering but not the extent that I am seeing. every once in a while I get a flash of it looking correct then a bunch of frames with vertical lines.


Tue Sep 20, 2011 12:05 am
Profile

Joined: Wed Mar 31, 2010 6:05 pm
Posts: 212
I couldnt get it to work with memUncached at all. My theory is that so many of the memory hits happen at the same time as a DMA that the cpu gets seriously stalled repeatedly. Whereas if you go through cached memory, some writes can happen behind the scenes inbetween DMAs. going through cached memory and DC_FlushAll(), my stuff worked. --mostly. There are still periodic glitches that I don't understand. I can't solve them with a double buffer, so I am somewhat at a loss to explain it.
I'm testing on a dsi not in dsi mode.


Tue Sep 20, 2011 7:18 pm
Profile

Joined: Thu Jul 02, 2009 1:19 pm
Posts: 349
zeromus - thanks for taking a look at this. It was driving me crazy. It sounds like MODE_FIFO is probably a lost cause. Do you know of any games that use it?


Tue Sep 20, 2011 9:51 pm
Profile

Joined: Wed Mar 31, 2010 6:05 pm
Posts: 212
splinter cell chaos theory uses it, in an exceedingly complex manner (combined with capture) for its thermal view. I can't recall any other games offhand, but I'm sure there are some others, but I don't know them. Unfortunately, I have been unsuccessful so far in recruiting interns to create a masterlist of games vs hardware features to use as a test case reference.


Tue Sep 20, 2011 10:51 pm
Profile

Joined: Thu Jul 02, 2009 1:19 pm
Posts: 349
I found the issue that was causing problems. the dma needs to be enabled at 60hz. I was trying to decode a video stream and I was missing 60 fps. I made a test program and added the dma enable to a vblank handler and it fixed it for the test program. hopefully it works in my solution as well.


Wed Sep 21, 2011 1:43 am
Profile

Joined: Wed Mar 31, 2010 6:05 pm
Posts: 212
yeah i can confirm the dma goes into disabled state after it finishes the frame.


Wed Sep 21, 2011 6:52 am
Profile

Joined: Thu Jul 02, 2009 1:19 pm
Posts: 349
the vblank interrupt did not work in my program. it does work better. the top of the frame is aligned properly, but by time it reaches the bottom everything is kicked over horizontally by about 8-32 pixels with it wrapped to the other side of the screen. it varies each frame so there is quite a bit of bouncing back and forth.


Wed Sep 21, 2011 1:43 pm
Profile

Joined: Wed Mar 31, 2010 6:05 pm
Posts: 212
are you double buffering?


Wed Sep 21, 2011 6:39 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at SourceForge.net. Fast, secure and Free Open Source software downloads