Im trying to make a bootloader but i don't know how to put a image on it like for example a loading bar or a logo.
Basicly i want the bootloader to be like Windows.
How to print image on bootloader.
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: How to print image on bootloader.
So what do you want from us? Your question was answered by requimrar in thread you created earlier. And what do you mean by 'like Windows'?
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)
Re: How to print image on bootloader.
Since, as Bender said, your question has already been answered, I suppose it's worth trying to dig a little deeper and find out what you didn't understand about the answer.UnknownSlayer wrote:Im trying to make a bootloader but i don't know how to put a image on it like for example a loading bar or a logo.
Basicly i want the bootloader to be like Windows.
Do you know how to change screen modes?
Do you know how to set a pixel? How to write directly to the video memory?
Do you know how to use the BIOS to read data from a disk? What about reading directly via ATA commands?
Do you know how to interpret a bmp or other graphics file?
Re: How to print image on bootloader.
Just gonna make a random guess and say he's refering to
Re: How to print image on bootloader.
The Windows boot loader did not utilize standard images until Windows 8. What was posted above - the Windows logo - is an image resource included in the Windows kernel image not the boot loader. That is, its already passed the boot loader stage.
I am unaware if their boot framework supported it prior though; it might have considering it already had support for Vesa Bios Extensions (VBE) and basic graphic display adapters. Please note however that I make a distinction between boot loader and boot record; where the boot record is equivalent to GrUB stage 1 and the boot loader is equivalent to GrUB stage 2. We believe that this distinction is important in order to properly see the relationships of other boot applications and boot managers and where they fit in the boot applications framework.
About adding images though to a boot loader, there really isn't anything else that can be added - azblue already summarized the necessities. Based on the OP's posts though I am betting he is looking for code to copy & paste though which isn't what he'll find here.
Displaying an image really isn't all that hard; just involves a lot of little steps and good run time support (your boot loader should have basic heap management and be able to transfer control to the firmware when needed.)
Depending on firmware, just decide on a video format standard (most probably VBE) and call it from real or virtual 8086 mode to switch modes; depending on your boot disk driver and associated file system driver that you will have to have written, load the BMP, TGA, whatever image from disk that you want to use and parse it - extract the color information and image information. I suggest BMP or TGA for their simplicity.
Displaying then just involves creating a display independent surface for the image and blitting it to the main video display surface that which also must performs conversion between the different color formats.
I can post some code if requested for what we do, but it probably won't be all that helpful since this is really specific to your particular implementation and design. Try doing as much of it as you can yourself and ask specific questions here on what you aren't sure about.
I am unaware if their boot framework supported it prior though; it might have considering it already had support for Vesa Bios Extensions (VBE) and basic graphic display adapters. Please note however that I make a distinction between boot loader and boot record; where the boot record is equivalent to GrUB stage 1 and the boot loader is equivalent to GrUB stage 2. We believe that this distinction is important in order to properly see the relationships of other boot applications and boot managers and where they fit in the boot applications framework.
About adding images though to a boot loader, there really isn't anything else that can be added - azblue already summarized the necessities. Based on the OP's posts though I am betting he is looking for code to copy & paste though which isn't what he'll find here.
Displaying an image really isn't all that hard; just involves a lot of little steps and good run time support (your boot loader should have basic heap management and be able to transfer control to the firmware when needed.)
Depending on firmware, just decide on a video format standard (most probably VBE) and call it from real or virtual 8086 mode to switch modes; depending on your boot disk driver and associated file system driver that you will have to have written, load the BMP, TGA, whatever image from disk that you want to use and parse it - extract the color information and image information. I suggest BMP or TGA for their simplicity.
Displaying then just involves creating a display independent surface for the image and blitting it to the main video display surface that which also must performs conversion between the different color formats.
I can post some code if requested for what we do, but it probably won't be all that helpful since this is really specific to your particular implementation and design. Try doing as much of it as you can yourself and ask specific questions here on what you aren't sure about.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}