mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 20:39:28 +02:00
VESA 3.0 support
git-svn-id: trunk@15758 -
This commit is contained in:
parent
8b1889d033
commit
0b75bedaf9
@ -1583,7 +1583,7 @@ end;
|
||||
PortW[$3ce] := $0001; { Index 01 : Disable ops on all four planes. }
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure HLineVESA16(x,x2,y: smallint); {$ifndef fpc}far;{$endif fpc}
|
||||
var
|
||||
xtmp: smallint;
|
||||
@ -2122,6 +2122,12 @@ Const
|
||||
function SetupLinear(var ModeInfo: TVESAModeInfo;mode : word) : boolean;
|
||||
begin
|
||||
SetUpLinear:=false;
|
||||
|
||||
if VESAInfo.Version >= $0300 then
|
||||
BytesPerLine := VESAModeInfo.LinBytesPerScanLine
|
||||
else
|
||||
BytesPerLine := VESAModeInfo.BytesPerScanLine;
|
||||
|
||||
{$ifdef FPC}
|
||||
case mode of
|
||||
m320x200x32k,
|
||||
@ -2219,6 +2225,9 @@ Const
|
||||
procedure SetupWindows(var ModeInfo: TVESAModeInfo);
|
||||
begin
|
||||
InLinear:=false;
|
||||
|
||||
BytesPerLine := VESAModeInfo.BytesPerScanLine;
|
||||
|
||||
{ now we check the windowing scheme ...}
|
||||
if (ModeInfo.WinAAttr and WinSupported) <> 0 then
|
||||
{ is this window supported ... }
|
||||
@ -2368,7 +2377,8 @@ Const
|
||||
Inc(BankShift);
|
||||
CurrentWriteBank := -1;
|
||||
CurrentReadBank := -1;
|
||||
BytesPerLine := VESAModeInfo.BytesPerScanLine;
|
||||
{ nickysn: setting BytesPerLine moved to SetupLinear and SetupWindowed
|
||||
BytesPerLine := VESAModeInfo.BytesPerScanLine;}
|
||||
|
||||
{ These are the window adresses ... }
|
||||
WinWriteSeg := 0; { This is the segment to use for writes }
|
||||
|
@ -31,6 +31,7 @@ TYPE
|
||||
end; { VESA standard because of bugs on }
|
||||
{ some video cards. }
|
||||
*)
|
||||
{ VESA 1.1 }
|
||||
TotalMem : word;
|
||||
{ VESA 2.0 }
|
||||
OEMversion : word;
|
||||
@ -82,7 +83,21 @@ TYPE
|
||||
PhysAddress : longint; { pos $28 }
|
||||
OffscreenPtr : longint; { pos $2C }
|
||||
OffscreenMem : word; { pos $30 }
|
||||
reserved2 : Array[1..458]of Byte; { pos $32 }
|
||||
{ VESA 3.0 }
|
||||
LinBytesPerScanLine: Word; {bytes per scan line for linear modes}
|
||||
BnkNumberOfImagePages: Byte; {number of images for banked modes}
|
||||
LinNumberOfImagePages: Byte; {number of images for linear modes}
|
||||
LinRedMaskSize: Byte; {size of direct color red mask (linear modes)}
|
||||
LinRedFieldPosition: Byte; {bit position of lsb of red mask (linear modes)}
|
||||
LinGreenMaskSize: Byte; {size of direct color green mask (linear modes)}
|
||||
LinGreenFieldPosition: Byte; {bit position of lsb of green mask (linear modes)}
|
||||
LinBlueMaskSize: Byte; {size of direct color blue mask (linear modes)}
|
||||
LinBlueFieldPosition: Byte; {bit position of lsb of blue mask (linear modes)}
|
||||
LinRsvdMaskSize: Byte; {size of direct color reserved mask (linear modes)}
|
||||
LinRsvdFieldPosition: Byte; {bit position of lsb of reserved mask (linear modes)}
|
||||
MaxPixelClock: longint; {maximum pixel clock (in Hz) for graphics mode}
|
||||
|
||||
reserved2: array [1..189] of Byte; {remainder of ModeInfoBlock}
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user