VESA Video Modes: Difference between revisions

Jump to navigation Jump to search
no edit summary
[unchecked revision][unchecked revision]
No edit summary
 
No edit summary
Line 5:
You'll want to look in the VESA VBE docs for these functions:
 
;INT 0x10, AX=0x4F00
;__INT 0x10, AX=0x4F00__: Get Controller Info. This is the one that returns the array of all supported video modes.
<verbatim>
<pre>
struct vbeControllerInfo {
char signature[4]; // == "VESA"
Line 19 ⟶ 20:
v86_bios(0x10, {ax:0x4f00, es:SEG(vib), di:OFF(vib)},&out);
if (out.ax!=0x004f) die("something wrong with VBE get info");
</verbatimpre>
 
;INT 0x10, AX=0x4F01
;__INT 0x10, AX=0x4F01__: Get Mode Info. Call this for each member of the mode array to find out the details of that mode.
 
<pre>
<verbatim>
 
struct vbeModeInfo {
Line 49 ⟶ 51:
short reserved2;
};
</verbatimpre>
 
;__INT 0x10, AX=0x4F02__: Set Video Mode. Call this with the mode number you decide to use.
 
!!== Will it work with Bochs ?==
 
For VBE to work in Bochs you need the "VGABIOS-lgpl" BIOS and have a version of Bochs that was compiled with the "--enable-vbe" option... See [Vesa Information in Bochs| Forum:6311] thread for more info
 
 
!! ==How to pick the mode i wish ?==
 
Here's a sample code, assuming you have a VirtualMonitor already ... Basically, you will scan the 'modes list' referenced by the vbeInfoBlock.videomodes[] and then call 'get mode info' for each mode. You can then compare width, height and colordepth of each mode with the desired one.
 
<pre>
<verbatim>
 
UInt16 findMode(int x, int y, int d)
Line 106 ⟶ 109:
return best;
}
</verbatimpre>
 
----
==See Also==
===Threads===
Initial Thread: *[VESA, higher modes|Forum:6379] - Initial Thread, reply by Dreamsmith (aka DaidalosGuy)
 
[[Category:Video]]
Initial Thread: [VESA, higher modes|Forum:6379], reply by Dreamsmith (aka DaidalosGuy)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu