Author: aandrejevic
Date: Tue Aug 13 19:00:02 2013
New Revision: 59729
URL:
http://svn.reactos.org/svn/reactos?rev=59729&view=rev
Log:
[NTVDM]
Fix bug with VGA DAC register access.
Modified:
branches/ntvdm/subsystems/ntvdm/vga.c
Modified: branches/ntvdm/subsystems/ntvdm/vga.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/vga.c?re…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/vga.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/vga.c [iso-8859-1] Tue Aug 13 19:00:02 2013
@@ -98,7 +98,7 @@
static BYTE VgaAcIndex = VGA_AC_PAL_0_REG;
static BOOLEAN VgaAcLatch = FALSE;
static BYTE VgaAcRegisters[VGA_AC_MAX_REG];
-static BYTE VgaDacIndex = 0;
+static WORD VgaDacIndex = 0;
static BOOLEAN VgaDacReadWrite = FALSE;
static BYTE VgaDacRegisters[VGA_PALETTE_SIZE];
static HPALETTE PaletteHandle = NULL;
@@ -957,7 +957,7 @@
case VGA_DAC_WRITE_INDEX:
{
- return VgaDacIndex;
+ return VgaDacIndex / 3;
}
case VGA_DAC_DATA:
@@ -1066,7 +1066,7 @@
case VGA_DAC_READ_INDEX:
{
VgaDacReadWrite = FALSE;
- VgaDacIndex = Data % VGA_PALETTE_SIZE;
+ VgaDacIndex = Data * 3;
break;
}
@@ -1074,7 +1074,7 @@
case VGA_DAC_WRITE_INDEX:
{
VgaDacReadWrite = TRUE;
- VgaDacIndex = Data % VGA_PALETTE_SIZE;
+ VgaDacIndex = Data * 3;
break;
}