Author: aandrejevic
Date: Sun Jul 24 18:25:50 2016
New Revision: 71992
URL:
http://svn.reactos.org/svn/reactos?rev=71992&view=rev
Log:
[NTVDM]
Implement the VGA AC Color Select register.
Implement INT 0x10, AH = 0x10, subfunction AL = 0x13.
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c
trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/svga.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c [iso-8859-1] Sun Jul 24 18:25:50
2016
@@ -3379,6 +3379,31 @@
break;
}
+ /* Set Video DAC Color Page */
+ case 0x13:
+ {
+ if (getBL() == 0)
+ {
+ /* Set the highest bit of the AC Mode Control register to BH */
+ IOReadB(VGA_INSTAT1_READ);
+ IOWriteB(VGA_AC_INDEX, VGA_AC_CONTROL_REG);
+ IOWriteB(VGA_AC_WRITE, (IOReadB(VGA_AC_READ) & 0x7F) |
(getBH() << 7));
+ }
+ else if (getBL() == 1)
+ {
+ /* Set the AC Color Select register to BH */
+ IOReadB(VGA_INSTAT1_READ);
+ IOWriteB(VGA_AC_INDEX, VGA_AC_COLOR_SEL_REG);
+ IOWriteB(VGA_AC_WRITE, getBH());
+ }
+ else
+ {
+ DPRINT1("BIOS Palette Control Sub-sub-command BL = 0x%02X
INVALID\n", getBL());
+ }
+
+ break;
+ }
+
/* Get Individual DAC Register */
case 0x15:
{
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] Sun Jul 24
18:25:50 2016
@@ -946,8 +946,26 @@
* if external palette access is disabled, otherwise (in case
* of palette loading) it is a blank pixel.
*/
- PixelData = (VgaAcPalDisable ? VgaAcRegisters[PixelData & 0x0F]
- : 0);
+
+ if (VgaAcPalDisable)
+ {
+ if (!(VgaAcRegisters[VGA_AC_CONTROL_REG] &
VGA_AC_CONTROL_P54S))
+ {
+ /* Bits 4 and 5 are taken from the palette register */
+ PixelData = ((VgaAcRegisters[VGA_AC_COLOR_SEL_REG] <<
4) & 0xC0)
+ | (VgaAcRegisters[PixelData & 0x0F] &
0x3F);
+ }
+ else
+ {
+ /* Bits 4 and 5 are taken from the color select register */
+ PixelData = (VgaAcRegisters[VGA_AC_COLOR_SEL_REG] <<
4)
+ | (VgaAcRegisters[PixelData & 0x0F] &
0x0F);
+ }
+ }
+ else
+ {
+ PixelData = 0;
+ }
}
/* Take into account DoubleVision mode when checking for pixel updates
*/