3
This file is part of the Free Pascal run time library.
4
Copyright (c) 1999-2000 by Carl Eric Codere
6
This include implements VESA basic access.
8
See the file COPYING.FPC, included in this distribution,
9
for details about the copyright.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
**********************************************************************}
20
pModeList = ^tModeList;
21
tModeList = Array [0..255] of word; {list of modes terminated by -1}
22
{VESA modes are >=100h}
24
TVESAinfo = packed record { VESA Information request }
25
signature : array [1..4] of char; { This should be VESA }
26
version : word; { VESA revision }
27
str : pChar; { pointer to OEM string }
28
caps : longint; { video capabilities }
29
modeList : pModeList; { pointer to SVGA modes }
30
(* pad : array [18..260] of byte; { extra padding more then }
31
end; { VESA standard because of bugs on }
39
RevisionPtr : longint;
40
filler : Array[1..478]of Byte;
43
TVESAModeInfo = packed record
44
attr : word; { mode attributes (1.0) }
46
winBAttr : byte; { window attributes (1.0) }
47
winGranularity : word; {in K} { Window granularity (1.0) }
48
winSize : word; {in K} { window size (1.0) }
49
winASeg, { Window A Segment address (1.0) }
50
winBSeg : word; { Window B Segment address (1.0) }
51
winFunct : procedure; { Function to swtich bank }
52
BytesPerScanLine: word; {bytes per scan line (1.0) }
53
{ extended information }
54
xRes, yRes : word; {pixels}
61
bankSize : byte; {in K}
64
pad : array [29..260] of byte; { always put some more space then required}
66
reserved : byte; { pos $1E }
67
rm_size : byte; { pos $1F }
68
rf_pos : byte; { pos $20 }
69
gm_size : byte; { pos $21 }
70
gf_pos : byte; { pos $22 }
71
bm_size : byte; { pos $23 }
72
bf_pos : byte; { pos $24 }
73
(* res_mask : word; { pos $25 }
74
here there was an alignment problem !!
75
with default alignment
76
res_mask was shifted to $26
77
and after PhysAddress to $2A !!! PM *)
80
DirectColorInfo: byte; { pos $27 }
82
PhysAddress : longint; { pos $28 }
83
OffscreenPtr : longint; { pos $2C }
84
OffscreenMem : word; { pos $30 }
85
reserved2 : Array[1..458]of Byte; { pos $32 }
92
VESAInfo : TVESAInfo; { VESA Driver information }
93
VESAModeInfo : TVESAModeInfo; { Current Mode information }
94
hasVesa: Boolean; { true if we have a VESA compatible graphics card}
95
{ initialized in QueryAdapterInfo in graph.inc }