} SVGA_MODE_INFORMATION, *PSVGA_MODE_INFORMATION;
#include <poppack.h>
-static ULONG BiosVideoMode; /* Current video mode as known by BIOS */
+static USHORT BiosVideoMode; /* Current video mode as known by BIOS */
static ULONG ScreenWidth = 80; /* Screen Width in characters */
static ULONG ScreenHeight = 25; /* Screen Height in characters */
static ULONG BytesPerScanLine = 160; /* Number of bytes per scanline (delta) */
}
}
-static VOID PcVideoSetBiosMode(ULONG VideoMode)
+static VOID PcVideoSetBiosMode(UCHAR VideoMode)
{
REGS Regs;
}
static VOID
-PcVideoDefineCursor(ULONG StartScanLine, ULONG EndScanLine)
+PcVideoDefineCursor(UCHAR StartScanLine, UCHAR EndScanLine)
{
REGS Regs;
}
static VOID
-PcVideoSetVerticalResolution(ULONG ScanLines)
+PcVideoSetVerticalResolution(UCHAR VerticalResolutionMode)
{
REGS Regs;
*/
Regs.b.ah = 0x12;
Regs.b.bl = 0x30;
- Regs.b.al = ScanLines;
+ Regs.b.al = VerticalResolutionMode;
Int386(0x10, &Regs, &Regs);
}
}
static BOOLEAN
-PcVideoSetMode(ULONG NewMode)
+PcVideoSetMode(USHORT NewMode)
{
CurrentMemoryBank = 0;
if (0x12 == NewMode)
{
/* 640x480x16 */
- PcVideoSetBiosMode(NewMode);
+ PcVideoSetBiosMode((UCHAR)NewMode);
WRITE_PORT_USHORT((USHORT*)0x03CE, 0x0F01); /* For some reason this is necessary? */
ScreenWidth = 640;
ScreenHeight = 480;
else if (0x13 == NewMode)
{
/* 320x200x256 */
- PcVideoSetBiosMode(NewMode);
+ PcVideoSetBiosMode((UCHAR)NewMode);
ScreenWidth = 320;
ScreenHeight = 200;
BytesPerScanLine = 320;
VIDEODISPLAYMODE
PcVideoSetDisplayMode(char *DisplayModeName, BOOLEAN Init)
{
- ULONG VideoMode = VIDEOMODE_NORMAL_TEXT;
+ USHORT VideoMode = VIDEOMODE_NORMAL_TEXT;
if (NULL == DisplayModeName || '\0' == *DisplayModeName)
{
PcVideoSetBlinkBit(! Init);
-
return DisplayMode;
}
}
VOID
-PcVideoSetTextCursorPosition(ULONG X, ULONG Y)
+PcVideoSetTextCursorPosition(UCHAR X, UCHAR Y)
{
REGS Regs;
VOID
PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer)
{
- ULONG BanksToCopy;
+ USHORT BanksToCopy;
ULONG BytesInLastBank;
- ULONG CurrentBank;
+ USHORT CurrentBank;
ULONG BankSize;
/* PcVideoWaitForVerticalRetrace(); */
else if (VideoGraphicsMode == DisplayMode && VesaVideoMode)
{
BankSize = VesaVideoModeInformation.WindowGranularity << 10;
- BanksToCopy = (VesaVideoModeInformation.HeightInPixels * VesaVideoModeInformation.BytesPerScanLine) / BankSize;
+ BanksToCopy = (USHORT)((VesaVideoModeInformation.HeightInPixels * VesaVideoModeInformation.BytesPerScanLine) / BankSize);
BytesInLastBank = (VesaVideoModeInformation.HeightInPixels * VesaVideoModeInformation.BytesPerScanLine) % BankSize;
/* Copy all the banks but the last one because