Add boot screen to Wince6 Eboot

Source: Internet
Author: User
Tags bmp image

WinCe6 EbootAdd boot Screen

Yesterday I studied how to add a personalized screen when wince was started. After a long morning of hard work, either the screen or CE would not start ...... Finally, let's share some experience...

The following two methods are generally used to add a boot screen to Wince:

1. Define a large constant array in the file, such as const USHORT ScreenBitmap [], copy the array to the corresponding buffer using the for loop condition where the image is displayed.

2. Store the image data to a certain position in Flash and use a specific method to read it at startup.

The second method may be difficult to implement. I have never studied it. If there is any implementation, please let me know.

The first method writes data directly to the Framebuffer of the video card during startup. This work is generally done in Eboot. If it is too late to start the OS, and if it is not added to the manual delay, the OS screen is displayed as soon as the startup screen is displayed, no effect. In Eboot, there is an InitDisplay ()
Static void InitDisplay (void)
{
......
// Display a bitmap image on the LCD...
// Memcpy (void *) IMAGE_FRAMEBUFFER_UA_BASE, ScreenBitmap, LCD _ARRAY_SIZE_TFT_16BIT); // for WindowsCE logo
For (I = 0; I <160*120; I ++)
{
PWORD pWord = (PWORD) ScreenBitmap;
PWORD pFrmBuf = (PWORD) IMAGE_FRAMEBUFFER_UA_BASE;

PFrmBuf [4 * I-2 * (I % 160)] = pWord [I];
PFrmBuf [4 * I-2 * (I % 160) + 1] = pWord [I];
PFrmBuf [4 * I-2 * (I % 160) + 160*2] = pWord [I];
PFrmBuf [4 * I-2 * (I % 160) + 1 + 160*2] = pWord [I];
}
}

Note that memcpy (void *) IMAGE_FRAMEBUFFER_UA_BASE, ScreenBitmap, LCD _ARRAY_SIZE_TFT_16BIT) is used to call the memcpy function directly, copy the image data in the ScreenBitmap array to the address IMAGE_FRAMEBUFFER_UA_BASE. In fact, this is to directly fill in the video card buffer. ScreenBitmap is a constant array. You can find some tools on the Internet to generate it, or you can write a tool to convert a BMP into a hexadecimal array.

At this point, the boot screen is basically realized, but some may have some problems.

My device has a resolution of 320*240. After converting a 320*240 BMP image into an array, there are more than 500 KB, boot loader does not have such a large space (of course this can be modified), and the generated Eboot is added. nb0 is also very large, it takes a long time to burn in through the parallel port. Is there any solution ?...... You can also think of compression again. Yes, the compression is burned in and decompressed during running. I searched the internet, some of which use interpolation algorithms. Get a small image and interpolation it to 320x240. Use an algorithm of others to zoom in 4 times, and change one point to four points. The Code is also copied:

For (I = 0; I <160*120; I ++)
{
PWORD pWord = (PWORD) ScreenBitmap;
PWORD pFrmBuf = (PWORD) IMAGE_FRAMEBUFFER_UA_BASE;

PFrmBuf [4 * I-2 * (I % 160)] = pWord [I];
PFrmBuf [4 * I-2 * (I % 160) + 1] = pWord [I];
PFrmBuf [4 * I-2 * (I % 160) + 160*2] = pWord [I];
PFrmBuf [4 * I-2 * (I % 160) + 1 + 160*2] = pWord [I];
}

Prepare another 160*120 image, convert, compile, and burn it in...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.