How does the BIOS...
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.
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.
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
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.
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?
How exactly does it draw pixels from its logo into the spaces? Using standard VGA stuff?
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
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.
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: How does the BIOS...
You update the VGA's font table. This should be explained by any good VGA programming guide.
-
- Member
- Posts: 255
- Joined: Tue Jun 15, 2010 9:27 am
- Location: Flyover State, United States
- Contact:
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.
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...
JAL
JAL
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.
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.
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?
Re: How does the BIOS...
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.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.
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.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?
JAL
Re: How does the BIOS...
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).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
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.
My BIOS can display a 640x480 resolution 256 color image.
Re: How does the BIOS...
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.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.
Exactly how is this relevant? My BIOS is bigger than yours?My BIOS can display a 640x480 resolution 256 color image.
JAL
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
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
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.
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.
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?
Programming is not about using a language to solve a problem, it's about using logic to find a solution !