Initializing 640x480 32bits graphics mode

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.
Post Reply
User avatar
Almamu
Member
Member
Posts: 47
Joined: Wed Jul 07, 2010 9:41 am

Initializing 640x480 32bits graphics mode

Post 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 ?
Image
tom9876543
Member
Member
Posts: 170
Joined: Wed Jul 18, 2007 5:51 am

Re: Initializing 640x480 32bits graphics mode

Post by tom9876543 »

What parts of the OS have you already built????????
User avatar
Almamu
Member
Member
Posts: 47
Joined: Wed Jul 07, 2010 9:41 am

Re: Initializing 640x480 32bits graphics mode

Post 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
Image
tom9876543
Member
Member
Posts: 170
Joined: Wed Jul 18, 2007 5:51 am

Re: Initializing 640x480 32bits graphics mode

Post by tom9876543 »

I think you must use Vesa Bios Extensions (VBE) to get 32bit color.

http://en.wikipedia.org/wiki/VESA_BIOS_Extensions
User avatar
Creature
Member
Member
Posts: 548
Joined: Sat Dec 27, 2008 2:34 pm
Location: Belgium

Re: Initializing 640x480 32bits graphics mode

Post 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.
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
Post Reply