Hi Dear FTDI Support Team.
Currently I am working on an Application using your FT813 chip (Hardware-Version 1.00) .
It’s a great Chip, but currently I am struggling with a Problem using the CMD_SETROTATE command and Displaying an 480x 800 pixel (PALETTED8 format) background picture.
I converted an Picture with your “pngp2pa.exe” (Version V0.4) Tool and loaded the Data into the GRAM.
The Picture will be shown not correctly (it seems to be stretched horizontaly and the Red channel seems to destroy the picture)
Maybe somebody can help me with this problem?
Thank you,
Marcel Cevani
Greetings from Germany.
STRACK LIFT AUTOMATION GmbH
------------------------------------------
Source-Code I used to display the Picture:
u32 pic_adr = 0;
u32 pal_adr = 1000000UL;
u16 pic_fmt = PALETTED8;
u16 pic_width = 480;
u16 pic_height = 800;
u16 pic_stride = 480;
s16 x = 0;
s16 y = 0;
addCL_u32(CMD_DLSTART);
addCL_u32(CLEAR_COLOR_RGB(0, 0, 0));
addCL_u32(CLEAR(1,1,1));
addCL_u32(VERTEX_FORMAT(0));
addCL_SetRotate(2);
addCL_u32(SAVE_CONTEXT());
addCL_u32(BITMAP_HANDLE(0));
addCL_u32(BITMAP_LAYOUT(pic_fmt, pic_stride & 0x3ff, pic_height & 0x1ff));
addCL_u32(BITMAP_LAYOUT_H(pic_stride >> 10, pic_height >> 9));
addCL_u32(BITMAP_SIZE(NEAREST, BORDER, BORDER, pic_width & 0x1ff, pic_height & 0x1ff));
addCL_u32(BITMAP_SIZE_H(pic_width >> 9, pic_height >> 9));
addCL_u32(BITMAP_SOURCE(pic_adr));
addCL_u32(BEGIN(BITMAPS));
addCL_u32(BLEND_FUNC(ONE, ZERO));
addCL_u32(COLOR_MASK(0,0,0,1));
addCL_u32(PALETTE_SOURCE(pal_adr + 3));
addCL_u32(VERTEX2F(x, y));
addCL_u32(BLEND_FUNC(DST_ALPHA, ONE_MINUS_DST_ALPHA));
addCL_u32(COLOR_MASK(1,0,0,0));
addCL_u32(PALETTE_SOURCE(pal_adr + 2));
addCL_u32(VERTEX2F(x, y));
addCL_u32(COLOR_MASK(0,1,0,0));
addCL_u32(PALETTE_SOURCE(pal_adr + 1));
addCL_u32(VERTEX2F(x, y));
addCL_u32(COLOR_MASK(0,0,1,0));
addCL_u32(PALETTE_SOURCE(pal_adr));
addCL_u32(VERTEX2F(x, y));
addCL_u32(END());
addCL_u32(RESTORE_CONTEXT());
addCL_u32(DISPLAY());
Ft_GPU_DLSwap();
Ft_Gpu_Hal_WaitCmdfifo_empty();