VESA Video Modes: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content added Content deleted
(Consistent use of struct names (Names according to the vbe spec.)) |
(Sync VbeModeBlock member names across text and specification) |
||
Line 7: | Line 7: | ||
<source lang="c"> |
<source lang="c"> |
||
struct VbeInfoBlock { |
struct VbeInfoBlock { |
||
char |
char VbeSignature[4]; // == "VESA" |
||
short |
short VbeVersion; // == 0x0300 for VBE 3.0 |
||
short |
short OemStringPtr[2]; // isa vbeFarPtr |
||
unsigned char |
unsigned char Capabilities[4]; |
||
short |
short VideoModePtr[2]; // isa vbeFarPtr |
||
short |
short TotalMemory; // as # of 64KB blocks |
||
}; |
}; |
||
Line 73: | Line 73: | ||
int depthdiff, bestdepthdiff = 8 >= d ? 8 - d : (d - 8) * 2; |
int depthdiff, bestdepthdiff = 8 >= d ? 8 - d : (d - 8) * 2; |
||
strncpy(ctrl-> |
strncpy(ctrl->VbeSignature, "VBE2", 4); |
||
intV86(0x10, "ax,es:di", 0x4F00, 0, ctrl); // Get Controller Info |
intV86(0x10, "ax,es:di", 0x4F00, 0, ctrl); // Get Controller Info |
||
if ( (UInt16)v86.tss.eax != 0x004F ) return best; |
if ( (UInt16)v86.tss.eax != 0x004F ) return best; |