mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 00:55:48 +00:00
[NTVDM]
Clear the screen when switching video modes. svn path=/branches/ntvdm/; revision=59688
This commit is contained in:
parent
7b2978c43f
commit
acf127fe24
1 changed files with 28 additions and 1 deletions
|
@ -255,6 +255,31 @@ static VOID BiosWriteWindow(LPWORD Buffer, SMALL_RECT Rectangle, BYTE Page)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VOID BiosClearScreen(VOID)
|
||||||
|
{
|
||||||
|
INT i;
|
||||||
|
BYTE PlaneMask;
|
||||||
|
|
||||||
|
/* Save the plane write register */
|
||||||
|
VgaWritePort(VGA_SEQ_INDEX, VGA_SEQ_MASK_REG);
|
||||||
|
PlaneMask = VgaReadPort(VGA_SEQ_DATA);
|
||||||
|
|
||||||
|
/* Write to all planes */
|
||||||
|
VgaWritePort(VGA_SEQ_DATA, 0x0F);
|
||||||
|
|
||||||
|
/* Clear the screen */
|
||||||
|
for (i = VgaGetVideoBaseAddress();
|
||||||
|
i < VgaGetVideoLimitAddress();
|
||||||
|
i += sizeof(DWORD))
|
||||||
|
{
|
||||||
|
DWORD Zero = 0;
|
||||||
|
VgaWriteMemory(i, (LPVOID)&Zero, sizeof(DWORD));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Restore the plane write register */
|
||||||
|
VgaWritePort(VGA_SEQ_DATA, PlaneMask);
|
||||||
|
}
|
||||||
|
|
||||||
/* PUBLIC FUNCTIONS ***********************************************************/
|
/* PUBLIC FUNCTIONS ***********************************************************/
|
||||||
|
|
||||||
BYTE BiosGetVideoMode(VOID)
|
BYTE BiosGetVideoMode(VOID)
|
||||||
|
@ -304,7 +329,7 @@ BOOLEAN BiosSetVideoMode(BYTE ModeNumber)
|
||||||
/* Update the values in the BDA */
|
/* Update the values in the BDA */
|
||||||
Bda->VideoMode = ModeNumber;
|
Bda->VideoMode = ModeNumber;
|
||||||
Bda->VideoPage = 0;
|
Bda->VideoPage = 0;
|
||||||
Bda->VideoPageSize = BIOS_PAGE_SIZE;
|
Bda->VideoPageSize = BIOS_PAGE_SIZE;
|
||||||
Bda->VideoPageOffset = 0;
|
Bda->VideoPageOffset = 0;
|
||||||
|
|
||||||
/* Get the character height */
|
/* Get the character height */
|
||||||
|
@ -629,6 +654,8 @@ VOID BiosVideoService(LPWORD Stack)
|
||||||
case 0x00:
|
case 0x00:
|
||||||
{
|
{
|
||||||
BiosSetVideoMode(LOBYTE(Eax));
|
BiosSetVideoMode(LOBYTE(Eax));
|
||||||
|
BiosClearScreen();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue