mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 17:01:28 +00:00
[NTVDM]
Implement the VGA AC Color Select register. Implement INT 0x10, AH = 0x10, subfunction AL = 0x13. svn path=/trunk/; revision=71992
This commit is contained in:
parent
2a6c4f1119
commit
45fe0d3a21
|
@ -3379,6 +3379,31 @@ VOID WINAPI VidBiosVideoService(LPWORD Stack)
|
|||
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:
|
||||
{
|
||||
|
|
|
@ -946,8 +946,26 @@ static VOID VgaUpdateFramebuffer(VOID)
|
|||
* 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 */
|
||||
|
|
Loading…
Reference in a new issue