Anonymous user
VESA Video Modes: Difference between revisions
Jump to navigation
Jump to search
added source tags
[unchecked revision] | [unchecked revision] |
(Add note on return values) |
(added source tags) |
||
Line 7:
;INT 0x10, AX=0x4F00
: Get Controller Info. This is the one that returns the array of all supported video modes.
<source lang="c">
struct vbeControllerInfo {
char signature[4]; // == "VESA"
Line 20:
v86_bios(0x10, {ax:0x4f00, es:SEG(vib), di:OFF(vib)}, &out);
if (out.ax!=0x004f) die("Something wrong with VBE get info");
</
;INT 0x10, AX=0x4F01
: Get Mode Info. Call this for each member of the mode array to find out the details of that mode.
<source lang="c">
struct vbeModeInfo {
word attributes;
Line 51 ⟶ 50:
short reserved2;
};
</
;INT 0x10, AX=0x4F02: Set Video Mode. Call this with the mode number you decide to use.
Line 63 ⟶ 62:
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.
<source lang="c">
UInt16 findMode(int x, int y, int d)
{
Line 108 ⟶ 106:
return best;
}
</
==See Also==
|