Author: hbelusca
Date: Wed Jun 10 01:30:30 2015
New Revision: 68099
URL:
http://svn.reactos.org/svn/reactos?rev=68099&view=rev
Log:
[NTVDM]
- Some INT --> UINT fixes.
- Fix the third value of MemorySizes according to the specification, confirmed by
Aleksander.
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c
trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.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] Wed Jun 10 01:30:30
2015
@@ -2120,7 +2120,7 @@
static BOOLEAN VgaSetRegisters(PVGA_REGISTERS Registers)
{
- INT i;
+ UINT i;
if (Registers == NULL) return FALSE;
@@ -2389,21 +2389,21 @@
static inline VOID VidBiosClearScreen(VOID)
{
- static const DWORD MemoryMaps[4] = { 0xA0000, 0xA0000, 0xB0000, 0xB8000 };
- static const DWORD MemorySizes[4] = { 0x20000, 0x10000, 0x10000, 0x8000 };
+ static const DWORD MemoryMaps[4] = { 0xA0000, 0xA0000, 0xB0000, 0xB8000 };
+ static const DWORD MemorySizes[4] = { 0x20000, 0x10000, 0x08000, 0x08000 };
DWORD VideoAddress;
- BYTE Buffer[0x20000];
DWORD BufferSize;
BYTE Misc;
+ BYTE Buffer[0x20000];
/* Read the misc register */
IOWriteB(VGA_GC_INDEX, VGA_GC_MISC_REG);
Misc = IOReadB(VGA_GC_DATA);
- /* Get the video address */
+ /* Get the video address and buffer size */
VideoAddress = MemoryMaps[(Misc >> 2) & 3];
- BufferSize = MemorySizes[(Misc >> 2) & 3];
+ BufferSize = MemorySizes[(Misc >> 2) & 3];
if (Misc & 1)
{
@@ -2412,9 +2412,8 @@
}
else
{
- INT i;
-
/* Text mode */
+ UINT i;
for (i = 0; i < (BufferSize >> 1); i++)
{
((PWORD)Buffer)[i] = MAKEWORD(' ', DEFAULT_ATTRIBUTE);
@@ -3174,7 +3173,7 @@
/* Set All Palette Registers */
case 0x02:
{
- INT i;
+ UINT i;
LPBYTE Buffer = SEG_OFF_TO_PTR(getES(), getDX());
/* Set the palette registers */
@@ -3258,7 +3257,7 @@
/* Get All Palette Registers */
case 0x09:
{
- INT i;
+ UINT i;
LPBYTE Buffer = SEG_OFF_TO_PTR(getES(), getDX());
/* Get the palette registers */
@@ -3300,7 +3299,7 @@
/* Set Block of DAC Registers */
case 0x12:
{
- INT i;
+ UINT i;
LPBYTE Buffer = SEG_OFF_TO_PTR(getES(), getDX());
/* Write the index */
@@ -3335,7 +3334,7 @@
/* Get Block of DAC Registers */
case 0x17:
{
- INT i;
+ UINT i;
LPBYTE Buffer = SEG_OFF_TO_PTR(getES(), getDX());
/* Write the index */
Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
==============================================================================
--- 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] Wed Jun 10
01:30:30 2015
@@ -771,7 +771,7 @@
static BOOLEAN VgaInitializePalette(VOID)
{
- INT i;
+ UINT i;
BOOLEAN Result = FALSE;
LPLOGPALETTE Palette, TextPalette;
@@ -1576,7 +1576,7 @@
static inline VOID VgaWriteDac(BYTE Data)
{
- INT i, PaletteIndex;
+ UINT i, PaletteIndex;
PALETTEENTRY Entry;
/* Set the value */