From 85850ccc227f46141479fe82ca706bfa738b91bc Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Thu, 11 Aug 2005 18:58:39 +0000 Subject: [PATCH] apply patch: "[ 1256405 ] EGA/VGA data should be rotated only in write mode 0" from vasyl. Fixes overkill Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2274 --- src/hardware/vga_memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/vga_memory.cpp b/src/hardware/vga_memory.cpp index 4af354d5..a3af1e60 100644 --- a/src/hardware/vga_memory.cpp +++ b/src/hardware/vga_memory.cpp @@ -61,6 +61,7 @@ INLINE static Bit32u ModeOperation(Bit8u val) { switch (vga.config.write_mode) { case 0x00: // Write Mode 0: In this mode, the host data is first rotated as per the Rotate Count field, then the Enable Set/Reset mechanism selects data from this or the Set/Reset field. Then the selected Logical Operation is performed on the resulting data and the data in the latch register. Then the Bit Mask field is used to select which bits come from the resulting data and which come from the latch register. Finally, only the bit planes enabled by the Memory Plane Write Enable field are written to memory. + val=((val >> vga.config.data_rotate) | (val << (8-vga.config.data_rotate))); full=ExpandTable[val]; full=(full & vga.config.full_not_enable_set_reset) | vga.config.full_enable_and_set_reset; full=RasterOp(full,vga.config.full_bit_mask); @@ -84,7 +85,6 @@ INLINE static Bit32u ModeOperation(Bit8u val) { } static void VGA_GFX_16_WriteHandler(PhysPt start,Bit8u val) { - val=((val >> vga.config.data_rotate) | (val << (8-vga.config.data_rotate))); Bit32u data=ModeOperation(val); /* Update video memory and the pixel buffer */ VGA_Latch pixels;