|
@@ -31,7 +31,7 @@ end;
|
|
|
|
|
|
function GetVESAInfo( Mode : WORD ):Boolean;
|
|
function GetVESAInfo( Mode : WORD ):Boolean;
|
|
var Result_:longint;
|
|
var Result_:longint;
|
|
- Temp,ReadFrameBufferLinearAddress : longint;
|
|
|
|
|
|
+ Temp : longint;
|
|
St : string;
|
|
St : string;
|
|
w : word;
|
|
w : word;
|
|
begin
|
|
begin
|
|
@@ -149,25 +149,16 @@ begin
|
|
LinearFrameBufferSupported:=false;
|
|
LinearFrameBufferSupported:=false;
|
|
|
|
|
|
{$ifdef Test_linear}
|
|
{$ifdef Test_linear}
|
|
|
|
+ (* bug was due to alignment problem in VesaInfoBlock !! PM
|
|
{ try to swap the FrameBuffer Physical Address }
|
|
{ try to swap the FrameBuffer Physical Address }
|
|
if switch_physical_address then
|
|
if switch_physical_address then
|
|
begin
|
|
begin
|
|
w:=VESAInfo.PhysAddress and $FFFF;
|
|
w:=VESAInfo.PhysAddress and $FFFF;
|
|
VESAInfo.PhysAddress:=(w shl 16) or (VESAInfo.PhysAddress shr 16);
|
|
VESAInfo.PhysAddress:=(w shl 16) or (VESAInfo.PhysAddress shr 16);
|
|
- end;
|
|
|
|
- if split_physical_address and not same_window then
|
|
|
|
- begin
|
|
|
|
- ReadFrameBufferLinearAddress:=Get_linear_addr(VESAInfo.PhysAddress and $FFFF0000,VGAInfo.TotalMem shl 16);
|
|
|
|
- if int31error<>0 then
|
|
|
|
- writeln(stderr,'Error in get linear address for ',hexstr(VESAInfo.PhysAddress and $FFFF0000,8));
|
|
|
|
- FrameBufferLinearAddress:=Get_linear_addr((VESAInfo.PhysAddress and $FFFF) shl 16,VGAInfo.TotalMem shl 16);
|
|
|
|
- if int31error<>0 then
|
|
|
|
- writeln(stderr,'Error in get linear address for ',hexstr((VESAInfo.PhysAddress and $FFFF) shl 16,8));
|
|
|
|
- end;
|
|
|
|
|
|
+ end; *)
|
|
If LinearFrameBufferSupported then
|
|
If LinearFrameBufferSupported then
|
|
begin
|
|
begin
|
|
- if same_window or not split_physical_address then
|
|
|
|
- FrameBufferLinearAddress:=Get_linear_addr(VESAInfo.PhysAddress and $FFFF0000,VGAInfo.TotalMem shl 16);
|
|
|
|
|
|
+ FrameBufferLinearAddress:=Get_linear_addr(VESAInfo.PhysAddress and $FFFF0000,VGAInfo.TotalMem shl 16);
|
|
if int31error<>0 then
|
|
if int31error<>0 then
|
|
writeln(stderr,'Error in get linear address for ',hexstr(VESAInfo.PhysAddress,8));
|
|
writeln(stderr,'Error in get linear address for ',hexstr(VESAInfo.PhysAddress,8));
|
|
end
|
|
end
|
|
@@ -184,10 +175,7 @@ begin
|
|
begin
|
|
begin
|
|
set_segment_base_address(seg_write,FrameBufferLinearAddress);
|
|
set_segment_base_address(seg_write,FrameBufferLinearAddress);
|
|
set_segment_limit(seg_write,(VGAInfo.TotalMem shl 16)-1);
|
|
set_segment_limit(seg_write,(VGAInfo.TotalMem shl 16)-1);
|
|
- if split_physical_address and not same_window then
|
|
|
|
- set_segment_base_address(seg_read,ReadFrameBufferLinearAddress)
|
|
|
|
- else
|
|
|
|
- set_segment_base_address(seg_read,FrameBufferLinearAddress);
|
|
|
|
|
|
+ set_segment_base_address(seg_read,FrameBufferLinearAddress);
|
|
set_segment_limit(seg_read,(VGAInfo.TotalMem shl 16)-1);
|
|
set_segment_limit(seg_read,(VGAInfo.TotalMem shl 16)-1);
|
|
WinSize:=(VGAInfo.TotalMem shl 16);
|
|
WinSize:=(VGAInfo.TotalMem shl 16);
|
|
WinLoMask:=(VGAInfo.TotalMem shl 16)-1;
|
|
WinLoMask:=(VGAInfo.TotalMem shl 16)-1;
|
|
@@ -304,7 +292,12 @@ end;
|
|
|
|
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.4 1998-11-18 12:12:54 pierre
|
|
|
|
|
|
+ Revision 1.5 1998-11-20 10:16:02 pierre
|
|
|
|
+ * Found out the LinerFrameBuffer problem
|
|
|
|
+ Was an alignment problem in VesaInfoBlock (see graph.pp file)
|
|
|
|
+ Compile with -dDEBUG and answer 'y' to 'Use Linear ?' to test
|
|
|
|
+
|
|
|
|
+ Revision 1.4 1998/11/18 12:12:54 pierre
|
|
* WinShift was wrong for LinearBuffer
|
|
* WinShift was wrong for LinearBuffer
|
|
|
|
|
|
Revision 1.3 1998/11/18 09:31:35 pierre
|
|
Revision 1.3 1998/11/18 09:31:35 pierre
|