Page 1 of 2
BootScreen
Posted: Fri Jan 28, 2005 3:31 am
by ZetItUp
Hi!
How is the easiest way to display a bootscreent bitmap(or any image type)?
I just want a picture to be shown until everything has loaded...
Re:BootScreen
Posted: Fri Jan 28, 2005 3:45 am
by Pype.Clicker
well, the easiest is to setup VGA mode 0x13 (using int 0x10) in realmode and move your 256-colors image in the video memory after adjusting palette ...
Note however that unless you can use a compressed file format (GIF for instance) or render the image instead of loading it, there are chances that loading the image will take longer than the boot process ...
Re:BootScreen
Posted: Fri Jan 28, 2005 3:52 am
by srg_13
Hey, can you go into mode 13h in the bootloader before loading the OS and not ever having to enter text mode?
Stephen
Re:BootScreen
Posted: Fri Jan 28, 2005 3:57 am
by ZetItUp
Pype.Clicker wrote:
well, the easiest is to setup VGA mode 0x13 (using int 0x10) in realmode and move your 256-colors image in the video memory after adjusting palette ...
Note however that unless you can use a compressed file format (GIF for instance) or render the image instead of loading it, there are chances that loading the image will take longer than the boot process ...
ok, thanks, i shall try that. se if it takes too long for showing.. :S
Re:BootScreen
Posted: Fri Jan 28, 2005 4:20 am
by ZetItUp
hrrm =)
you've got any code examples? =)
Re:BootScreen
Posted: Fri Jan 28, 2005 5:03 am
by Pype.Clicker
I know "XOS" (from aladdin) used to have such a bootloader ... check it out in the "OS tests" board...
Probably the best example of what i mean is the "bootfire" thing (
http://www.riot.org/download/misc/) which funnily enough displays an animation and play a tune... all that in the bootsector of a floppy
And yes, since the BIOS doesn't care of whatever OS is (or isn't) running, you can ask it to setup whatever video mode you like (as much as you can ask it to read whatever sector) *as long as you're in real mode).
The drawback ? well, at early stage, text output are *precious* to get an idea of what's wrong ... Pushing a splashcreen usually makes you blindfolded for the rest of kernel initialization ...
Re:BootScreen
Posted: Fri Jan 28, 2005 8:46 am
by oswizard
The drawback ? well, at early stage, text output are *precious* to get an idea of what's wrong ... Pushing a splashcreen usually makes you blindfolded for the rest of kernel initialization ...
Well, maybe try what I am planning to do once I want to enable a GUI. I will have a key sequence, probably Ctrl+SysRq, that will be handled by the keyboard driver and will switch the graphics mode from graphics to text and vice-versa. Debugging output will accumulate in text mode, made visible by a scrollbar on the side (like MS-DOS Edit, without being able to edit). That way, if the OS crashes, it can be switched to text mode to see what went wrong. I will use a V86 monitor to switch video modes in my OS.
I realize this might be a little complicated to do at first, but I think, for me at least, it will be the most flexible in the future.
Re:BootScreen
Posted: Fri Jan 28, 2005 9:31 am
by dh
Is is possible to change video mode in protected mode (the answer is probably yes) and how exactly? From what I've been reading, the job is done be changing some registers in the video controller. Do I got all this right or am I just out to lunch?
Cheers, DH.
Re:BootScreen
Posted: Fri Jan 28, 2005 9:54 am
by AR
Yes you can change Video modes by changing the registers (that's how video drivers work) but you'll need to know which card it is and know how to set the registers on the specific card, you can do generic VGA but (I haven't got round to researching it properly yet though) it can't go higher than 640x480x16colors.
About the bootscreen blocking error messages, you can have the picture as a sort of banner, border or background and still feed boot data onto the screen. Always try to make the boot fast rather than pretty though, the user wants to use the computer.
Re:BootScreen
Posted: Fri Jan 28, 2005 11:12 am
by dh
@AR: Thanks. For the time being, I'm just going to want to use that nice low res for expermenting anyway (I don't think I'll bother to write a driver (when I /can/ write drivers) for my graphics "card" (it's intergrated >:()
Good luck with your splash screen ;P
Cheers, DH.
Re:BootScreen
Posted: Fri Jan 28, 2005 11:42 am
by Pype.Clicker
Dragon_Hilord wrote:
Is is possible to change video mode in protected mode (the answer is probably yes) and how exactly? From what I've been reading, the job is done be changing some registers in the video controller. Do I got all this right or am I just out to lunch?
Cheers, DH.
this
is the best we have so far
Re:BootScreen
Posted: Fri Jan 28, 2005 11:55 am
by dh
@Pype: Ahhh
. This is GREAT! Thanks again ;P
[edit]There's no information on this "PMID from VBE3" thing
. I'll look around and post a link if there's anything [/edit]
[mor-edit]Found a
PDF which may have the information that I'm looking for. Here for everybody's abuse ;P ("Virtual" page 21 or "Literal" page 29 has the information on protected mode access!)[/mor-edit]
Re:BootScreen
Posted: Fri Jan 28, 2005 12:33 pm
by ASHLEY4
Pype.Clicker wrote:
well, the easiest is to setup VGA mode 0x13 (using int 0x10) in realmode and move your 256-colors image in the video memory after adjusting palette ...
Note however that unless you can use a compressed file format (GIF for instance) or render the image instead of loading it, there are chances that loading the image will take longer than the boot process ...
@Pype.Clicker, is a compressed file any faster to load than a uncompressed BMP ?, i know its smaller to load from the disk, but then the compressed format needs decompressing, but the uncompressed does not.
I have some code (asm) that loads a 320x200 256 BMP image at bootup ,with asm code, let me know if anyone intrestard.
\\\\||////
(@@)
ASHLEY4.
Batteries not included, Some assembly required.
Re:BootScreen
Posted: Fri Jan 28, 2005 12:37 pm
by dh
@Ashley4: Where do you /get/ all this misc. code from? It's amazing how you have a solution for almost EVERYTHING
. Cheers!
Cheers, DH.
Re:BootScreen
Posted: Fri Jan 28, 2005 1:01 pm
by Pype.Clicker
heh. I've been collecting links for years, probably Ashley has been writing/collecting code by the meantime...
and yes, decompressing a bitmap (e.g. using PCX or GIF) will *clearly* outrun loading uncompressed bitmap ... Those decompresssion algorithms are *very* fast compared to disk access (esp. compared to floppy accesses
Now, decompressing a JPEG is another thing and is likely to be totally useless for a splashscreen.