BootScreen

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
ZetItUp

BootScreen

Post 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...
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:BootScreen

Post 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 ...
srg_13

Re:BootScreen

Post 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 :)
ZetItUp

Re:BootScreen

Post 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
ZetItUp

Re:BootScreen

Post by ZetItUp »

hrrm =)
you've got any code examples? =)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:BootScreen

Post 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 ...
oswizard

Re:BootScreen

Post 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.
dh

Re:BootScreen

Post 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.
AR

Re:BootScreen

Post 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.
dh

Re:BootScreen

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:BootScreen

Post 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
dh

Re:BootScreen

Post by dh »

@Pype: Ahhh :o. This is GREAT! Thanks again ;P

[edit]There's no information on this "PMID from VBE3" thing :P. 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]
ASHLEY4

Re:BootScreen

Post 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.
dh

Re:BootScreen

Post by dh »

@Ashley4: Where do you /get/ all this misc. code from? It's amazing how you have a solution for almost EVERYTHING :o. Cheers!

Cheers, DH.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:BootScreen

Post 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.
Post Reply