From 9116d820f6f39c3064fa09e75b4537c81bcae316 Mon Sep 17 00:00:00 2001 From: jonas Date: Sun, 18 Jul 2010 09:48:56 +0000 Subject: * always use the read window to read from video memory (patch by Nikolay Nikolov, mantis #16926) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@15597 3ad0048d-3df7-0310-abae-a5850022a9f2 --- packages/graph/src/go32v2/vesa.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages/graph/src') diff --git a/packages/graph/src/go32v2/vesa.inc b/packages/graph/src/go32v2/vesa.inc index 0d93c6eeb7..5f4313d7fb 100644 --- a/packages/graph/src/go32v2/vesa.inc +++ b/packages/graph/src/go32v2/vesa.inc @@ -1495,6 +1495,7 @@ end; Y := Y + YOffset; { adjust pixel for correct virtual page } { } offs := longint(y) * BytesPerLine + (x div 8); + SetReadBank(smallint(offs shr 16)); SetWriteBank(smallint(offs shr 16)); PortW[$3ce] := $0f01; { Index 01 : Enable ops on all 4 planes } @@ -1503,7 +1504,7 @@ end; Port[$3ce] := 8; { Index 08 : Bitmask register. } Port[$3cf] := $80 shr (x and $7); { Select correct bits to modify } - dummy := Mem[WinWriteSeg: word(offs)]; { Latch the data into host space. } + dummy := Mem[WinReadSeg: 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. } @@ -1568,6 +1569,7 @@ end; end; Y := Y + YOffset; offs := longint(y) * BytesPerLine + (x div 8); + SetReadBank(smallint(offs shr 16)); SetWriteBank(smallint(offs shr 16)); PortW[$3ce] := $0f01; { Index 01 : Enable ops on all 4 planes } PortW[$3ce] := color shl 8; { Index 00 : Enable correct plane and write color } @@ -1575,7 +1577,7 @@ end; Port[$3ce] := 8; { Index 08 : Bitmask register. } Port[$3cf] := $80 shr (x and $7); { Select correct bits to modify } - dummy := Mem[WinWriteSeg: word(offs)]; { Latch the data into host space. } + dummy := Mem[WinReadSeg: 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. } -- cgit v1.2.1