VESA in protected 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
Ameise
Member
Member
Posts: 61
Joined: Fri Jul 16, 2010 7:46 am
Location: Chicago

VESA in protected mode

Post by Ameise »

For a variety of reasons, my Kernel (which is currently GRUB loaded) needs to be dropped back into Real Mode to do some hard-drive related things. At the same time, I'd like to enable VESA and configure it.

My question is if it's possible to alter the configuration of VESA (IE, resolution) once I re-enter protected mode? I'm curious as to how OSes that lack direct hardware support handle resolution changes.

I remember seeing a link regarding VESA in pmode, but for the life of me I cannot find it.

Thank you!
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: VESA in protected mode

Post by Owen »

They use v8086 emulators (protected mode) or x86emu (long mode/non x86 architectures with x86 graphics cards)
User avatar
Ameise
Member
Member
Posts: 61
Joined: Fri Jul 16, 2010 7:46 am
Location: Chicago

Re: VESA in protected mode

Post by Ameise »

Owen wrote:They use v8086 emulators (protected mode) or x86emu (long mode/non x86 architectures with x86 graphics cards)
What do you mean by x86emu? Isn't that just a real-mode emulator -- it wouldn't have calls into my BIOS, at least not directly (that I'd imagine).

My end goal is just being able to change VESA state -- resolution or color depth, without having to restart or drop to real mode (which isn't even possible in long mode).
User avatar
Ameise
Member
Member
Posts: 61
Joined: Fri Jul 16, 2010 7:46 am
Location: Chicago

Re: VESA in protected mode

Post by Ameise »

Never mind, I misinterpreted what you meant by an x86 emulator. I'd just use one so that I can access 16-bit interrupts in order to manipulate my graphics device. I found a few on this forum, though I believe x86emu itself is GPLd, and is therefore incompatible with my project.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: VESA in protected mode

Post by Owen »

x86emu, like everything X.Org, is X11 licensed...

(OK, I think it might actually be BSD. same thing, more boilerplate)
User avatar
Ameise
Member
Member
Posts: 61
Joined: Fri Jul 16, 2010 7:46 am
Location: Chicago

Re: VESA in protected mode

Post by Ameise »

Owen wrote:x86emu, like everything X.Org, is X11 licensed...

(OK, I think it might actually be BSD. same thing, more boilerplate)
So it is. One site referencing it said it was GPL, but that site appears to have been mistaken. Thank you!
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: VESA in protected mode

Post by quok »

Ameise wrote:
Owen wrote:x86emu, like everything X.Org, is X11 licensed...

(OK, I think it might actually be BSD. same thing, more boilerplate)
So it is. One site referencing it said it was GPL, but that site appears to have been mistaken. Thank you!
From the x86emu LICENSE file:
The x86emu library is under a BSD style license, comaptible
with the XFree86 and X licenses used by XFree86. The
original x86emu libraries were under the GNU General Public
License. Due to license incompatibilities between the GPL
and the XFree86 license, the original authors of the code
decided to allow a license change.
Post Reply