Author: aandrejevic Date: Fri May 15 19:51:40 2015 New Revision: 67746
URL: http://svn.reactos.org/svn/reactos?rev=67746&view=rev Log: [NTVDM] Reverse the HSYNC/VSYNC polarity when it should be reversed.
Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hardw... ============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.c [iso-8859-1] Fri May 15 19:51:40 2015 @@ -1393,15 +1393,21 @@ case VGA_INSTAT1_READ_COLOR: { BYTE Result = 0; + BOOLEAN Vsync = InVerticalRetrace; + BOOLEAN Hsync = InHorizontalRetrace;
/* Reset the AC latch */ VgaAcLatch = FALSE;
+ /* Reverse the polarity, if needed */ + if (VgaMiscRegister & VGA_MISC_VSYNCP) Vsync = !Vsync; + if (VgaMiscRegister & VGA_MISC_HSYNCP) Hsync = !Hsync; + /* Set a flag if there is a vertical or horizontal retrace */ - if (InVerticalRetrace || InHorizontalRetrace) Result |= VGA_STAT_DD; + if (Vsync || Hsync) Result |= VGA_STAT_DD;
/* Set an additional flag if there was a vertical retrace */ - if (InVerticalRetrace) Result |= VGA_STAT_VRETRACE; + if (Vsync) Result |= VGA_STAT_VRETRACE;
/* Clear the flags */ InHorizontalRetrace = InVerticalRetrace = FALSE;