Bienvenido a los foros de FT81x Manía. Te invitamos a regístrate totalmente gratis. Disfruta de tu experiencia con un grandes amigos y Staff.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Thread Contributor: lorcapBitmap corruption when swapping pages

#1
1
Better response on post Bitmap corruption when swapping pagesHi everyone,

in my project (not using gameduino library) I used to load bitmaps into half RAM_G when switching from one page to another. This way, the switch was instant and smooth.


The project has grown to a point where bitmaps of some pages can no longer fit in half of RAM_G. The trick above causes a temporary bitmap corruption while new images are being loaded and before swapping, because new bitmaps override old ones.

Currently, I decided to draw a blank page lasting 100-300ms while loading the new bitmaps. This avoids to show corrupted images.

I was wondering if there exists a better technique which avoids the blank. Ideally, I should stop/freeze the graphic engine and the end of a frame, load new images, and draw the new page. I tried setting REG_PCLK to 0, but an horizontal white line is shown for 100-300ms, which is not very good-looking.

I had a look at gameduino library, but neither GD.swap() nor Bitmap::fromfile() seem doing anything special. Bitmap::fromtext() only seems using the REG_PCLK technique.


Thanks in advance for your advice.
Reply
#2
0
This corruption in the bitmaps is caused by the limit of 2048 instructions that the chip FT8XX can handle. 

Are you using a microSD in order to store the bitmaps?
What MCU are you using?

For example the nucleo STM32 F767, or the Teensy 3.6 can handle microSD cards until 32 Gb (class 3, 95 mb/s)!!! 



Reply
#3
0
(28-11-2018, 23:45 03)TFTLCDCyg Wrote: This corruption in the bitmaps is caused by the limit of 2048 instructions that the chip FT8XX can handle. 

I doubt this is the root of the issue. I fixed the problem by using the entire RAM_G for the bitmaps instead of splitting it into two chunks to be use alternatively when swapping pages. The thing is that the fix adds a blank page between two pages (effectively, swapping twice) which is not very good to see.

My question boils down to this scenario: if you need to swap between two pages and each page loads a big bitmap that fills up the RAM_G, how do you load the second bitmap? If you don't blank the screen, the first bitmap is corrupted by the loading of the second one before the swap.

(28-11-2018, 23:45 03)TFTLCDCyg Wrote: Are you using a microSD in order to store the bitmaps?

Kind of. It's an external 2Mbit FLASH.

(28-11-2018, 23:45 03)TFTLCDCyg Wrote: What MCU are you using?

ARM based by Cypress.
--
lorcap
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)