How to switch to VGA Graphics mode without BIOS interrupts?

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.
Locked
schwin
Posts: 6
Joined: Sat Feb 14, 2009 1:16 am

How to switch to VGA Graphics mode without BIOS interrupts?

Post by schwin »

Hi !

I am working on development of an TOS that runs in Protected Mode. I am required to switch it from text mode to graphics mode. Everywhere I google I get only one solution set AX to 0013h and call INT 10 and easily the VGA Graphics Mode is set.

DUH!

I am working in protected mode and hence cannot use INT 10.

Can someone please guide me? I came across a post where it was said that this can be done by setting the VGA registers, but I could not understand much from the link provided in the post on how to implement it. Can someone whose done switching to Graphics Mode without using interrupts please help me resolve this issue.

Thanks
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: How to switch to VGA Graphics mode without BIOS interrupts?

Post by JohnnyTheDon »

From the wiki (the page is aptly named "VGA Hardware") : http://wiki.osdev.org/VGA_Hardware .

Do some searching please.

Note that VGA resolutions are VERY low. To get higher resolutions, you need to use that BIOS function along with VBE (also on the wiki and the web) or make native drivers (ie. an nvidia driver,ati driver, etc.). I recommend setting the video mode during boot, probably before you enter pmode.
User avatar
Slota
Posts: 18
Joined: Fri Feb 13, 2009 7:14 am

Re: How to switch to VGA Graphics mode without BIOS interrupts?

Post by Slota »

Check the source of Tauron's VGA utilities here... http://samueldotj.com/Ace/Downloads/Spe ... uron30.zip GL ;)
User avatar
Combuster
Member
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 to switch to VGA Graphics mode without BIOS interrupts?

Post by Combuster »

Everywhere I google I get only one solution set AX to 0013h and call INT 10 and easily the VGA Graphics Mode is set.
Search harder
1: same question was asked LAST WEEK
2: same question was asked over a hundred times total
3: its on the wiki: VGA Hardware
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Locked