Author: aandrejevic
Date: Sat Nov 2 01:51:27 2013
New Revision: 60827
URL:
http://svn.reactos.org/svn/reactos?rev=60827&view=rev
Log:
[NTVDM]
Fix resolution calculation when scanline doubling is enabled.
Modified:
branches/ntvdm/subsystems/ntvdm/vga.c
branches/ntvdm/subsystems/ntvdm/vga.h
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] Sat Nov 2 01:51:27 2013
@@ -802,6 +802,12 @@
if (VgaAcRegisters[VGA_AC_CONTROL_REG] & VGA_AC_CONTROL_8BIT) Resolution.X /=
2;
}
+ if (VgaCrtcRegisters[VGA_CRTC_MAX_SCAN_LINE_REG] & VGA_CRTC_MAXSCANLINE_DOUBLE)
+ {
+ /* Halve the vertical resolution */
+ Resolution.Y >>= 1;
+ }
+
/* Divide the vertical resolution by the maximum scan line (== font size in text
mode) */
Resolution.Y /= MaximumScanLine;
Modified: branches/ntvdm/subsystems/ntvdm/vga.h
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/vga.h?re…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/vga.h [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/vga.h [iso-8859-1] Sat Nov 2 01:51:27 2013
@@ -79,6 +79,9 @@
/* CRTC underline register bits */
#define VGA_CRTC_UNDERLINE_DWORD (1 << 6)
+
+/* CRTC max scanline register bits */
+#define VGA_CRTC_MAXSCANLINE_DOUBLE (1 << 7)
/* CRTC mode control register bits */
#define VGA_CRTC_MODE_CONTROL_WRAP (1 << 5)