summaryrefslogtreecommitdiff
path: root/packages/graph/src
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-06-29 09:22:09 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-06-29 09:22:09 +0000
commit6fc1ed5b467b391d7254eb9d9a84a119f62ddbaa (patch)
tree9b98146a3466dff0cae9be5f3f6daf972ad2c8f8 /packages/graph/src
parent900b9117a7d92e4390f937cfc8181cb7c10d693b (diff)
downloadfpc-6fc1ed5b467b391d7254eb9d9a84a119f62ddbaa.tar.gz
* fixed 16 color vesa get/putpixel offsets (patch by Nikolay Nikolov,
mantis #16806) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@15490 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/graph/src')
-rw-r--r--packages/graph/src/go32v2/vesa.inc19
1 files changed, 10 insertions, 9 deletions
diff --git a/packages/graph/src/go32v2/vesa.inc b/packages/graph/src/go32v2/vesa.inc
index 395cbea1b0..41b65d5f1a 100644
--- a/packages/graph/src/go32v2/vesa.inc
+++ b/packages/graph/src/go32v2/vesa.inc
@@ -1503,8 +1503,8 @@ end;
Port[$3ce] := 8; { Index 08 : Bitmask register. }
Port[$3cf] := $80 shr (x and $7); { Select correct bits to modify }
- dummy := Mem[WinWriteSeg: offs]; { Latch the data into host space. }
- Mem[WinWriteSeg: offs] := dummy; { Write the data into video memory }
+ dummy := Mem[WinWriteSeg: word(offs)]; { Latch the data into host space. }
+ Mem[WinWriteSeg: word(offs)] := dummy; { Write the data into video memory }
PortW[$3ce] := $ff08; { Enable all bit planes. }
PortW[$3ce] := $0001; { Index 01 : Disable ops on all four planes. }
{ }
@@ -1512,7 +1512,8 @@ end;
Function GetPixVESA16(X,Y: smallint):word; {$ifndef fpc}far;{$endif fpc}
- Var dummy, offset: Word;
+ Var dummy: Word;
+ offset: longint;
shift: byte;
Begin
X:= X + StartXViewPort;
@@ -1522,13 +1523,13 @@ end;
Port[$3ce] := 4;
shift := 7 - (X and 7);
Port[$3cf] := 0;
- dummy := (Mem[WinReadSeg:offset] shr shift) and 1;
+ dummy := (Mem[WinReadSeg:word(offset)] shr shift) and 1;
Port[$3cf] := 1;
- dummy := dummy or (((Mem[WinReadSeg:offset] shr shift) and 1) shl 1);
+ dummy := dummy or (((Mem[WinReadSeg:word(offset)] shr shift) and 1) shl 1);
Port[$3cf] := 2;
- dummy := dummy or (((Mem[WinReadSeg:offset] shr shift) and 1) shl 2);
+ dummy := dummy or (((Mem[WinReadSeg:word(offset)] shr shift) and 1) shl 2);
Port[$3cf] := 3;
- dummy := dummy or (((Mem[WinReadSeg:offset] shr shift) and 1) shl 3);
+ dummy := dummy or (((Mem[WinReadSeg:word(offset)] shr shift) and 1) shl 3);
GetPixVESA16 := dummy;
end;
@@ -1574,8 +1575,8 @@ end;
Port[$3ce] := 8; { Index 08 : Bitmask register. }
Port[$3cf] := $80 shr (x and $7); { Select correct bits to modify }
- dummy := Mem[WinWriteSeg: offs]; { Latch the data into host space. }
- Mem[WinWriteSeg: offs] := dummy; { Write the data into video memory }
+ dummy := Mem[WinWriteSeg: word(offs)]; { Latch the data into host space. }
+ Mem[WinWriteSeg: word(offs)] := dummy; { Write the data into video memory }
PortW[$3ce] := $ff08; { Enable all bit planes. }
PortW[$3ce] := $0001; { Index 01 : Disable ops on all four planes. }
end;