Bug: example.dma_trippelbuffer never shows one frame.
should work fine. i will post an switch function later.
Note: This 'Bug' Takes only at high framerates effect. It causes from the point that the tribble buffer have to use two dma channels. dmaXWait always blend out one frame.
Code:
gp_SetView(framebuffer1); // Display of Screen 1
gp_DMA0Memcopy(background,framebuffer3,320*240); // Clear Screen 3
gp_DMA1Wait(); // wait until clear of sreen 3 is finish
gp_SetFont8(30,100,13,"Iam Screen 2 ",0xF800,framebuffer2); // Painting on Screen 2
for (x=0;x<9000000;x++) x=x;
gp_SetView(framebuffer2); // Display of Screen 2
gp_DMA1Memcopy(background,framebuffer1,320*240); // Clear Screen 1
gp_DMA0Wait(); // wait until clear of sreen 3 is finish
gp_SetFont8(30,110,13,"Iam Screen 3 ",0xF800,framebuffer3); // Painting on Screen 3
for (x=0;x<9000000;x++) x=x;
gp_SetView(framebuffer3); // Display of Screen 3
gp_DMA0Memcopy(background,framebuffer2,320*240); // Clear Screen 2
gp_DMA1Wait(); // wait until clear of sreen 1 is finish
gp_SetFont8(30,120,13,"Iam Screen 1 ",0xF800,framebuffer1); // Painting on Screen 1
for (x=0;x<9000000;x++) x=x;
gp_SetView(framebuffer1); // Display of Screen 1
gp_DMA1Memcopy(background,framebuffer3,320*240); // Clear Screen 3
gp_DMA0Wait(); // wait until clear of sreen 3 is finish
gp_SetFont8(30,100,13,"Iam Screen 2 ",0xF800,framebuffer2); // Painting on Screen 2
for (x=0;x<9000000;x++) x=x;
gp_SetView(framebuffer2); // Display of Screen 2
gp_DMA0Memcopy(background,framebuffer1,320*240); // Clear Screen 1
gp_DMA1Wait(); // wait until clear of sreen 3 is finish
gp_SetFont8(30,110,13,"Iam Screen 3 ",0xF800,framebuffer3); // Painting on Screen 3
for (x=0;x<9000000;x++) x=x;
gp_SetView(framebuffer3); // Display of Screen 3
gp_DMA1Memcopy(background,framebuffer2,320*240); // Clear Screen 2
gp_DMA0Wait(); // wait until clear of sreen 1 is finish
gp_SetFont8(30,120,13,"Iam Screen 1 ",0xF800,framebuffer1); // Painting on Screen 1
for (x=0;x<9000000;x++) x=x;
should work fine. i will post an switch function later.
Note: This 'Bug' Takes only at high framerates effect. It causes from the point that the tribble buffer have to use two dma channels. dmaXWait always blend out one frame.