Author: aandrejevic
Date: Wed Aug 23 04:44:55 2017
New Revision: 75643
URL:
http://svn.reactos.org/svn/reactos?rev=75643&view=rev
Log:
[NTVDM]: Fix linear 4-bpp mode. Return the status of the AC palette when the index
register is read.
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/svga.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/svga.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/svga.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/svga.c [iso-8859-1] Wed Aug 23
04:44:55 2017
@@ -847,10 +847,10 @@
/* 4-bits per pixel */
PixelData = VgaMemory[WRAP_OFFSET((Address + (X /
(VGA_NUM_BANKS * 2))) * AddressSize)
- * VGA_NUM_BANKS + (X %
VGA_NUM_BANKS)];
+ * VGA_NUM_BANKS + ((X / 2) %
VGA_NUM_BANKS)];
/* Check if we should use the highest 4 bits or lowest 4 */
- if (((X / VGA_NUM_BANKS) % 2) == 0)
+ if ((X % 2) == 0)
{
/* Highest 4 */
PixelData >>= 4;
@@ -1176,7 +1176,7 @@
return VgaFeatureRegister;
case VGA_AC_INDEX:
- return VgaAcIndex;
+ return VgaAcIndex | (VgaAcPalDisable ? 0x20 : 0x00);
case VGA_AC_READ:
return VgaAcRegisters[VgaAcIndex];