Page 1 of 1

Initializing 640x480 32bits graphics mode

Posted: Thu Jul 08, 2010 5:55 am
by Almamu
How the hell can i initialize a graphic mode, show a image in PNG and then go back to text mode ?
I have searched, but i don't undestand the OsDev.Org explanation and i cant find VGA 640x480 32bits modes...
Can anyone help me ?

Re: Initializing 640x480 32bits graphics mode

Posted: Thu Jul 08, 2010 6:39 am
by tom9876543
What parts of the OS have you already built????????

Re: Initializing 640x480 32bits graphics mode

Posted: Thu Jul 08, 2010 6:46 am
by Almamu
IRQ handler(having problems trying add ide support), IDT, basics C functions, and not much more. I only want it to print a image on Screen and come back to text mode. The png file can be loaded

Re: Initializing 640x480 32bits graphics mode

Posted: Thu Jul 08, 2010 6:49 am
by tom9876543
I think you must use Vesa Bios Extensions (VBE) to get 32bit color.

http://en.wikipedia.org/wiki/VESA_BIOS_Extensions

Re: Initializing 640x480 32bits graphics mode

Posted: Thu Jul 08, 2010 7:17 am
by Creature
Almamu wrote:How the hell can i initialize a graphic mode, show a image in PNG and then go back to text mode ?
I have searched, but i don't undestand the OsDev.Org explanation and i cant find VGA 640x480 32bits modes...
Can anyone help me ?
I'll say what most people will want to flame at you for, but without the flaming:
  • If you don't understand the information on the wiki, try googling for other resources that might help you understand. If you can't do it with that either, that's probably an indication that you're not ready to implement this part of your OS yet and you should try something else until you do understand.
  • You can't just display a PNG file. They are fairly complex files and writing a loader would probably take you a while.
  • Note that activating a graphics mode, displaying an image, and going back can be fairly intensive.
  • Use VM8086, a real mode switcher, a 16-bit BIOS emulator, or a native video card driver to switch modes.