static BOOLEAN VgaSetRegisters(PVGA_REGISTERS Registers)
{
- INT i;
+ UINT i;
if (Registers == NULL) return FALSE;
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)
{
}
else
{
- INT i;
-
/* Text mode */
+ UINT i;
for (i = 0; i < (BufferSize >> 1); i++)
{
((PWORD)Buffer)[i] = MAKEWORD(' ', DEFAULT_ATTRIBUTE);
/* Set All Palette Registers */
case 0x02:
{
- INT i;
+ UINT i;
LPBYTE Buffer = SEG_OFF_TO_PTR(getES(), getDX());
/* Set the palette registers */
/* Get All Palette Registers */
case 0x09:
{
- INT i;
+ UINT i;
LPBYTE Buffer = SEG_OFF_TO_PTR(getES(), getDX());
/* Get the palette registers */
/* Set Block of DAC Registers */
case 0x12:
{
- INT i;
+ UINT i;
LPBYTE Buffer = SEG_OFF_TO_PTR(getES(), getDX());
/* Write the index */
/* Get Block of DAC Registers */
case 0x17:
{
- INT i;
+ UINT i;
LPBYTE Buffer = SEG_OFF_TO_PTR(getES(), getDX());
/* Write the index */