BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: How to upload raw image into vram of FT8000  (Read 9897 times)

PK_hweng

  • Newbie
  • *
  • Posts: 2
    • View Profile
How to upload raw image into vram of FT8000
« on: November 20, 2019, 08:31:23 PM »

Hi,

I try to upload some RAW graphic files to the GRAM of the FT800.
It is some old project that needs a gui update. Until now I had only one jpeg sucessfully loaded with CMD_LOADIMAGE, this works but now I need to place several graphics in raw (RGB565) format.

When using a jpeg there is the load_image command before loading the file into the command buffer.
But I can't find any command for raw :(

The commands to handle the image when its already in the ram are quite clear to me:

Ft_App_WrCoCmd_Buffer(disp_host, BEGIN(BITMAPS));
Ft_App_WrCoCmd_Buffer(disp_host, BITMAP_HANDLE(id));
Ft_App_WrCoCmd_Buffer(disp_host, BITMAP_SOURCE(RAM_G + offset));
Ft_App_WrCoCmd_Buffer(disp_host, BITMAP_LAYOUT(RGB565, 100, 50));
Ft_App_WrCoCmd_Buffer(disp_host, BITMAP_SIZE(NEAREST, BORDER, BORDER, 100, 50));
Ft_App_WrCoCmd_Buffer(disp_host, VERTEX2II(0, 0, id, 0));

But how do I put the bitmap to the position (RAM_G + offset) in VRAM?

I had tryed Ft_Gpu_Hal_WrMem(phost, (RAM_G + Offset), ....) but it doesn't work.

I will be grateful for any advice!

Best regards,
Philipp

Logged

PK_hweng

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How to upload raw image into vram of FT8000
« Reply #1 on: November 20, 2019, 10:41:45 PM »

I have found the solution  8) :

Code: [Select]
Ft_Gpu_CoCmd_MemWrite(disp_host, RAM_G+Offset, fileSize); // EVE upload with the filesize initialize

while()
{
...
Ft_Gpu_Hal_WrCmdBuf(phost, imageBuffer, blockLen); // write data in the command buffer
...
}

// END COPY FILE TO EVE
    Ft_App_WrCoCmd_Buffer(disp_host, BEGIN(BITMAPS));
    Ft_App_WrCoCmd_Buffer(disp_host, BITMAP_HANDLE(0));
    Ft_App_WrCoCmd_Buffer(disp_host, BITMAP_SOURCE(RAM_G+Offset));
    Ft_App_WrCoCmd_Buffer(disp_host, BITMAP_LAYOUT(RGB565, 100*2, 50));
    Ft_App_WrCoCmd_Buffer(disp_host, BITMAP_SIZE(NEAREST, BORDER, BORDER, 100, 50));
    Ft_App_WrCoCmd_Buffer(disp_host, VERTEX2II(0, 0, 0, 0));
    Ft_App_WrCoCmd_Buffer(disp_host, END());
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 390
    • View Profile
Re: How to upload raw image into vram of FT8000
« Reply #2 on: November 21, 2019, 07:26:01 PM »

And to repeat myself here, you were actually looking for cmd_inflate(). :)
Logged