OSDev.org
https://forum.osdev.org/

How does the BIOS...
https://forum.osdev.org/viewtopic.php?f=1&t=23296
Page 1 of 2

Author:  LloydAX86 [ Sat Mar 12, 2011 6:47 am ]
Post subject:  How does the BIOS...

...display logos?

Strange question I know, but it just occured to me that (by the looks of it) when the BIOS boots it displays information on the screen in text mode, and I thought that text mode could only display text? I wrote some code to draw a pixel on screen while still in text mode, and (unless I wrote the code wrong) it never appeared on screen.

So the only ways I can think of is that the BIOS sets the video adapter to a VGA mode, displays the logos, and then either goes back to text mode without clearing the screen, or it manually draws the text onto the screen using a font.

What are your thoughts on it? :)

PS. By "logos" I mean the logo in the top left of the attached image.

Attachments:
amd.jpg
amd.jpg [ 29.83 KiB | Viewed 6298 times ]

Author:  Owen [ Sat Mar 12, 2011 7:13 am ]
Post subject:  Re: How does the BIOS...

The display font is editable, and there are many spaces not used for normal text/numbers/punctuation. The BIOS can write bits of its logo into those spaces as characters, and then write to the correct locations in order to have them displayed.

Author:  LloydAX86 [ Sat Mar 12, 2011 7:23 am ]
Post subject:  Re: How does the BIOS...

Thanks for the reply :)

How exactly does it draw pixels from its logo into the spaces? Using standard VGA stuff?

Author:  NickJohnson [ Sat Mar 12, 2011 7:28 am ]
Post subject:  Re: How does the BIOS...

The BIOS contains all the drivers necessary to change video modes and plot pixels, so it could even be plotting that logo directly (and then rendering the font manually). However, I'd say Owen is probably right.

Author:  Owen [ Sat Mar 12, 2011 7:41 am ]
Post subject:  Re: How does the BIOS...

You update the VGA's font table. This should be explained by any good VGA programming guide.

Author:  Tosi [ Sat Mar 12, 2011 8:03 am ]
Post subject:  Re: How does the BIOS...

You could use a custom font in a text mode and create an entire windowed user interface. However it would be difficult to display raster images because a single "character" can only be one color. But since most BIOS logos are displayed as a single color, they can be displayed fine in a text mode.

Author:  jal [ Thu Mar 17, 2011 5:51 am ]
Post subject:  Re: How does the BIOS...

There's also the Energy Star logo, but I guess it's possible to do that with a text font as well...

Image


JAL

Author:  turdus [ Fri Mar 18, 2011 6:55 am ]
Post subject:  Re: How does the BIOS...

If you take a closer look, you should notice that the color is only changed per character, not per pixel.

I've also implemented this, it's not hard. Just modify the fonts at 176-223 (these are the ones that's used to draw boxes, so the 9th column is not an empty one but a copy of the 8th), and display them on screen accordingly.

Author:  qw [ Fri Mar 18, 2011 8:59 am ]
Post subject:  Re: How does the BIOS...

I always thought that the BIOS switches to graphics mode to display the logo, and then switches back for the rest of the boot process. Do some BIOSes do that or am I simply wrong?

Author:  jal [ Fri Mar 18, 2011 9:31 am ]
Post subject:  Re: How does the BIOS...

turdus wrote:
I've also implemented this, it's not hard. Just modify the fonts at 176-223 (these are the ones that's used to draw boxes, so the 9th column is not an empty one but a copy of the 8th), and display them on screen accordingly.

The BIOSes I have seen actually switch to 640 column mode so the 9th column is not an issue. Probbaly because they need more than 48 characters to display the graphics. Or, they switch to 640 graphics mode.

Quote:
I always thought that the BIOS switches to graphics mode to display the logo, and then switches back for the rest of the boot process. Do some BIOSes do that or am I simply wrong?

As you can see in the screen shot, the logos are displayed during the POST. So there's no switching back. There are of course BIOSes that have a graphical splash screen, but in those cases there's not POST messages begin displayed.


JAL

Author:  turdus [ Sat Mar 19, 2011 7:07 am ]
Post subject:  Re: How does the BIOS...

jal wrote:
...
The BIOSes I have seen actually switch to 640 column mode so the 9th column is not an issue. Probbaly because they need more than 48 characters to display the graphics. Or, they switch to 640 graphics mode.

...
As you can see in the screen shot, the logos are displayed during the POST. So there's no switching back. There are of course BIOSes that have a graphical splash screen, but in those cases there's not POST messages begin displayed.

JAL

Agree, it's possible to switch to 8x16 pixel mode, although I've never seen any BIOS doing this. Instead I saw that they use 512 character font mode (when the blink/intensity bit of attribute selects an alternative font set).

Author:  trinopoty [ Mon Mar 21, 2011 7:56 am ]
Post subject:  Re: How does the BIOS...

The BIOS knows what the Graphics Chip on the motherboard is capable of doing. So it's no problem for the bios to display whatever it whishes.

My BIOS can display a 640x480 resolution 256 color image.

Author:  jal [ Mon Mar 21, 2011 9:43 am ]
Post subject:  Re: How does the BIOS...

trinopoty wrote:
The BIOS knows what the Graphics Chip on the motherboard is capable of doing. So it's no problem for the bios to display whatever it whishes.


Yeah, except many motherboards do not have an on-board gfx chip, so all they can do is call the video BIOS using int 10h.

Quote:
My BIOS can display a 640x480 resolution 256 color image.


Exactly how is this relevant? My BIOS is bigger than yours?


JAL

Author:  Combuster [ Mon Mar 21, 2011 10:20 am ]
Post subject:  Re: How does the BIOS...

If yours has such a high resolution, it must have one of those worthless onboard intel chips then to be able to know how they work. Oh and, one of my computer's boot screen looks much better than yours :mrgreen:

I have seen several graphical-splash computers without onboard video. They just pick a standard mode and work with that - the video bios does the necessary bits for them. If you know a bit about VGA modes, there's little trouble about getting one to work.

Author:  Chandra [ Mon Mar 21, 2011 9:02 pm ]
Post subject:  Re: How does the BIOS...

One thing I noticed on both the images is that, there's no cursor. This means, this maynot be the text mode(?). It's possible to have text like fonts in graphics mode and moreover, tweaking video modes can give the same effect as the text mode but without cursor. Does this make sense?

Page 1 of 2 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/