mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 02:39:24 +01:00
* fixed VlineVESA256 and re-enabled it in graph.inc
* added procedure detectgraph to interface of graph unit
This commit is contained in:
parent
7442507d82
commit
acabc4c7fa
@ -2225,7 +2225,7 @@ const CrtAddress: word = 0;
|
|||||||
mode.SetVisualPage := {$ifdef fpc}@{$endif}SetVisualVESA;
|
mode.SetVisualPage := {$ifdef fpc}@{$endif}SetVisualVESA;
|
||||||
mode.SetActivePage := {$ifdef fpc}@{$endif}SetActiveVESA;
|
mode.SetActivePage := {$ifdef fpc}@{$endif}SetActiveVESA;
|
||||||
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
||||||
//!!!!! mode.vline := {$ifdef fpc}@{$endif}VLineVESA256;
|
mode.vline := {$ifdef fpc}@{$endif}VLineVESA256;
|
||||||
mode.XAspect := 10000;
|
mode.XAspect := 10000;
|
||||||
mode.YAspect := 10000;
|
mode.YAspect := 10000;
|
||||||
AddMode(mode);
|
AddMode(mode);
|
||||||
@ -2330,7 +2330,7 @@ const CrtAddress: word = 0;
|
|||||||
mode.InitMode := {$ifdef fpc}@{$endif}Init1024x768x256;
|
mode.InitMode := {$ifdef fpc}@{$endif}Init1024x768x256;
|
||||||
mode.SetVisualPage := {$ifdef fpc}@{$endif}SetVisualVESA;
|
mode.SetVisualPage := {$ifdef fpc}@{$endif}SetVisualVESA;
|
||||||
mode.SetActivePage := {$ifdef fpc}@{$endif}SetActiveVESA;
|
mode.SetActivePage := {$ifdef fpc}@{$endif}SetActiveVESA;
|
||||||
//!!!!! mode.vline := {$ifdef fpc}@{$endif}VLineVESA256;
|
mode.vline := {$ifdef fpc}@{$endif}VLineVESA256;
|
||||||
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
||||||
mode.XAspect := 10000;
|
mode.XAspect := 10000;
|
||||||
mode.YAspect := 10000;
|
mode.YAspect := 10000;
|
||||||
@ -2436,7 +2436,7 @@ const CrtAddress: word = 0;
|
|||||||
mode.GetRGBPalette := {$ifdef fpc}@{$endif}GetVESARGBPalette;
|
mode.GetRGBPalette := {$ifdef fpc}@{$endif}GetVESARGBPalette;
|
||||||
mode.SetVisualPage := {$ifdef fpc}@{$endif}SetVisualVESA;
|
mode.SetVisualPage := {$ifdef fpc}@{$endif}SetVisualVESA;
|
||||||
mode.SetActivePage := {$ifdef fpc}@{$endif}SetActiveVESA;
|
mode.SetActivePage := {$ifdef fpc}@{$endif}SetActiveVESA;
|
||||||
//!!!!! mode.vline := {$ifdef fpc}@{$endif}VLineVESA256;
|
mode.vline := {$ifdef fpc}@{$endif}VLineVESA256;
|
||||||
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
mode.hline := {$ifdef fpc}@{$endif}HLineVESA256;
|
||||||
mode.XAspect := 10000;
|
mode.XAspect := 10000;
|
||||||
mode.YAspect := 10000;
|
mode.YAspect := 10000;
|
||||||
@ -2499,7 +2499,11 @@ const CrtAddress: word = 0;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 1999-11-11 14:05:21 florian
|
Revision 1.3 1999-11-27 21:48:00 jonas
|
||||||
|
* fixed VlineVESA256 and re-enabled it in graph.inc
|
||||||
|
* added procedure detectgraph to interface of graph unit
|
||||||
|
|
||||||
|
Revision 1.2 1999/11/11 14:05:21 florian
|
||||||
+ support font loaded from BIOS
|
+ support font loaded from BIOS
|
||||||
|
|
||||||
Revision 1.1 1999/11/08 11:15:21 peter
|
Revision 1.1 1999/11/08 11:15:21 peter
|
||||||
|
|||||||
@ -753,6 +753,7 @@ end;
|
|||||||
StartXViewPort+ViewWidth, StartYViewPort+ViewHeight) then
|
StartXViewPort+ViewWidth, StartYViewPort+ViewHeight) then
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
Col := Byte(CurrentColor);
|
||||||
{$ifdef logging}
|
{$ifdef logging}
|
||||||
LogLn('vline '+strf(y)+' - '+strf(y2)+' on '+strf(x)+' in mode '+strf(currentwritemode));
|
LogLn('vline '+strf(y)+' - '+strf(y2)+' on '+strf(x)+' in mode '+strf(currentwritemode));
|
||||||
{$endif logging}
|
{$endif logging}
|
||||||
@ -786,7 +787,7 @@ end;
|
|||||||
For l := 0 to Bankrest-1 Do
|
For l := 0 to Bankrest-1 Do
|
||||||
begin
|
begin
|
||||||
Mem[WinWriteSeg:word(offs)] :=
|
Mem[WinWriteSeg:word(offs)] :=
|
||||||
Mem[WinReadSeg:word(offs)] And Byte(CurrentColor);
|
Mem[WinReadSeg:word(offs)] And Col;
|
||||||
inc(offs,bytesperline);
|
inc(offs,bytesperline);
|
||||||
end;
|
end;
|
||||||
dec(VLength,l+1);
|
dec(VLength,l+1);
|
||||||
@ -814,7 +815,7 @@ end;
|
|||||||
For l := 0 to Bankrest-1 Do
|
For l := 0 to Bankrest-1 Do
|
||||||
begin
|
begin
|
||||||
Mem[WinWriteSeg:word(offs)] :=
|
Mem[WinWriteSeg:word(offs)] :=
|
||||||
Mem[WinReadSeg:word(offs)] Xor Byte(CurrentColor);
|
Mem[WinReadSeg:word(offs)] Xor Col;
|
||||||
inc(offs,bytesperline);
|
inc(offs,bytesperline);
|
||||||
end;
|
end;
|
||||||
dec(VLength,l+1);
|
dec(VLength,l+1);
|
||||||
@ -842,7 +843,7 @@ end;
|
|||||||
For l := 0 to Bankrest-1 Do
|
For l := 0 to Bankrest-1 Do
|
||||||
begin
|
begin
|
||||||
Mem[WinWriteSeg:word(offs)] :=
|
Mem[WinWriteSeg:word(offs)] :=
|
||||||
Mem[WinReadSeg:word(offs)] Or Byte(CurrentColor);
|
Mem[WinReadSeg:word(offs)] Or Col;
|
||||||
inc(offs,bytesperline);
|
inc(offs,bytesperline);
|
||||||
end;
|
end;
|
||||||
dec(VLength,l+1);
|
dec(VLength,l+1);
|
||||||
@ -854,7 +855,7 @@ end;
|
|||||||
Else
|
Else
|
||||||
Begin
|
Begin
|
||||||
If CurrentWriteMode = NotPut Then
|
If CurrentWriteMode = NotPut Then
|
||||||
Col := Not(CurrentColor);
|
Col := Not(Col);
|
||||||
Repeat
|
Repeat
|
||||||
curbank := integer(offs shr 16);
|
curbank := integer(offs shr 16);
|
||||||
SetWriteBank(curbank);
|
SetWriteBank(curbank);
|
||||||
@ -1529,17 +1530,14 @@ end;
|
|||||||
if getVESAModeInfo(VESAmodeinfo, mode) then
|
if getVESAModeInfo(VESAmodeinfo, mode) then
|
||||||
begin
|
begin
|
||||||
{ checks if the hardware supports the video mode. }
|
{ checks if the hardware supports the video mode. }
|
||||||
if (VESAModeInfo.attr and modeAvail) <> 0 then
|
if (VESAModeInfo.attr and modeAvail) = 0 then
|
||||||
begin
|
|
||||||
SetVESAMode := TRUE;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
begin
|
begin
|
||||||
SetVESAmode := FALSE;
|
SetVESAmode := FALSE;
|
||||||
_GraphResult := grError;
|
_GraphResult := grError;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
SetVESAMode := TRUE;
|
||||||
BankShift := 0;
|
BankShift := 0;
|
||||||
while (64 shr BankShift) <> VESAModeInfo.WinGranularity do
|
while (64 shr BankShift) <> VESAModeInfo.WinGranularity do
|
||||||
Inc(BankShift);
|
Inc(BankShift);
|
||||||
@ -1563,6 +1561,14 @@ end;
|
|||||||
{ method. }
|
{ method. }
|
||||||
SetUpWindows(VESAModeInfo);
|
SetUpWindows(VESAModeInfo);
|
||||||
|
|
||||||
|
{$ifdef logging}
|
||||||
|
LogLn('Entering vesa mode '+strf(mode));
|
||||||
|
LogLn('Read segment: $'+hexstr(winreadseg,4));
|
||||||
|
LogLn('Write segment: $'+hexstr(winwriteseg,4));
|
||||||
|
LogLn('Window granularity: '+strf(VESAModeInfo.WinGranularity)+'kb');
|
||||||
|
LogLn('Window size: '+strf(VESAModeInfo.winSize)+'kb');
|
||||||
|
LogLn('Bytes per line: '+strf(bytesperline));
|
||||||
|
{$endif logging}
|
||||||
|
|
||||||
asm
|
asm
|
||||||
mov ax,4F02h
|
mov ax,4F02h
|
||||||
@ -1938,7 +1944,11 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 1999-11-08 11:15:21 peter
|
Revision 1.2 1999-11-27 21:48:01 jonas
|
||||||
|
* fixed VlineVESA256 and re-enabled it in graph.inc
|
||||||
|
* added procedure detectgraph to interface of graph unit
|
||||||
|
|
||||||
|
Revision 1.1 1999/11/08 11:15:21 peter
|
||||||
* move graph.inc to the target dir
|
* move graph.inc to the target dir
|
||||||
|
|
||||||
Revision 1.21 1999/11/03 20:23:01 florian
|
Revision 1.21 1999/11/03 20:23:01 florian
|
||||||
|
|||||||
@ -617,6 +617,7 @@ procedure GetFillSettings(var Fillinfo:Fillsettingstype);
|
|||||||
procedure GetFillPattern(var FillPattern:FillPatternType);
|
procedure GetFillPattern(var FillPattern:FillPatternType);
|
||||||
procedure GetLineSettings(var ActiveLineInfo : LineSettingsType);
|
procedure GetLineSettings(var ActiveLineInfo : LineSettingsType);
|
||||||
procedure InitGraph(var GraphDriver:Integer;var GraphMode:Integer;const PathToDriver:String);
|
procedure InitGraph(var GraphDriver:Integer;var GraphMode:Integer;const PathToDriver:String);
|
||||||
|
procedure DetectGraph(var GraphDriver:Integer;var GraphMode:Integer);
|
||||||
function InstallUserDriver(Name: string; AutoDetectPtr: Pointer): integer;
|
function InstallUserDriver(Name: string; AutoDetectPtr: Pointer): integer;
|
||||||
function RegisterBGIDriver(driver: pointer): integer;
|
function RegisterBGIDriver(driver: pointer): integer;
|
||||||
procedure SetFillStyle(Pattern : word; Color: word);
|
procedure SetFillStyle(Pattern : word; Color: word);
|
||||||
@ -3002,7 +3003,11 @@ SetGraphBufSize
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.40 1999-11-25 17:44:14 pierre
|
Revision 1.41 1999-11-27 21:48:01 jonas
|
||||||
|
* fixed VlineVESA256 and re-enabled it in graph.inc
|
||||||
|
* added procedure detectgraph to interface of graph unit
|
||||||
|
|
||||||
|
Revision 1.40 1999/11/25 17:44:14 pierre
|
||||||
* memory corruption within GetImage removed
|
* memory corruption within GetImage removed
|
||||||
|
|
||||||
Revision 1.39 1999/11/24 23:42:31 pierre
|
Revision 1.39 1999/11/24 23:42:31 pierre
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user