25#define VIDEOPORT_PALETTE_READ 0x03C7
26#define VIDEOPORT_PALETTE_WRITE 0x03C8
27#define VIDEOPORT_PALETTE_DATA 0x03C9
28#define VIDEOPORT_VERTICAL_RETRACE 0x03DA
30#define VIDEOVGA_MEM_ADDRESS 0xA0000
31#define VIDEOTEXT_MEM_ADDRESS 0xB8000
32#define VIDEOTEXT_MEM_SIZE 0x8000
34#define VIDEOCARD_CGA_OR_OTHER 0
35#define VIDEOCARD_EGA 1
36#define VIDEOCARD_VGA 2
38#define VIDEOMODE_NORMAL_TEXT 0
39#define VIDEOMODE_EXTENDED_TEXT 1
40#define VIDEOMODE_80X28 0x501C
41#define VIDEOMODE_80X30 0x501E
42#define VIDEOMODE_80X34 0x5022
43#define VIDEOMODE_80X43 0x502B
44#define VIDEOMODE_80X60 0x503C
45#define VIDEOMODE_132X25 0x8419
46#define VIDEOMODE_132X43 0x842B
47#define VIDEOMODE_132X50 0x8432
48#define VIDEOMODE_132X60 0x843C
50#define VERTRES_200_SCANLINES 0x00
51#define VERTRES_350_SCANLINES 0x01
52#define VERTRES_400_SCANLINES 0x02
159 Int386(0x10, &Regs, &Regs);
162 if (0x10 == Regs.
b.
bl)
198 Int386(0x10, &Regs, &Regs);
200 if (0x1a == Regs.
b.
al)
228 Int386(0x10, &Regs, &Regs);
246 Int386(0x10, &Regs, &Regs);
264 Int386(0x10, &Regs, &Regs);
288 Int386(0x10, &Regs, &Regs);
313 Int386(0x10, &Regs, &Regs);
347 Regs.
b.
ch = StartScanLine;
348 Regs.
b.
cl = EndScanLine;
349 Int386(0x10, &Regs, &Regs);
375 Regs.
b.
al = VerticalResolutionMode;
376 Int386(0x10, &Regs, &Regs);
486 Int386(0x10, &Regs, &Regs);
488 if (Regs.
w.
ax != 0x004F)
496 TRACE(
"BiosVesaGetSVGAModeInformation() mode 0x%x\n",
Mode);
516 TRACE(
"---VBE v1.2+ ---\n");
592 Int386(0x10, &Regs, &Regs);
594 if (0x004F != Regs.
w.
ax)
764 else if (0x13 == NewMode)
776 else if (0x0108 <= NewMode && NewMode <= 0x010C)
846 Int386(0x10, &Regs, &Regs);
877 Regs.
w.
dx = BankNumber;
878 Int386(0x10, &Regs, &Regs);
880 if (0x004F == Regs.
w.
ax)
892 if (
NULL == DisplayModeName ||
'\0' == *DisplayModeName)
900 TRACE(
"CGA or other display adapter detected.\n");
901 printf(
"CGA or other display adapter detected.\n");
902 printf(
"Using 80x25 text mode.\n");
907 TRACE(
"EGA display adapter detected.\n");
908 printf(
"EGA display adapter detected.\n");
909 printf(
"Using 80x25 text mode.\n");
914 TRACE(
"VGA display adapter detected.\n");
916 if (0 ==
_stricmp(DisplayModeName,
"NORMAL_VGA"))
920 else if (0 ==
_stricmp(DisplayModeName,
"EXTENDED_VGA"))
932 printf(
"Error: unable to set video display mode 0x%x\n", (
int)
VideoMode);
933 printf(
"Defaulting to 80x25 text mode.\n");
934 printf(
"Press any key to continue.\n");
983 BiosRegs.
d.
eax = 0x1130;
985 Int386(0x10, &BiosRegs, &BiosRegs);
989 Int386(0x10, &BiosRegs, &BiosRegs);
993 Int386(0x10, &BiosRegs, &BiosRegs);
997 Int386(0x10, &BiosRegs, &BiosRegs);
1001 Int386(0x10, &BiosRegs, &BiosRegs);
1005 Int386(0x10, &BiosRegs, &BiosRegs);
1031 Int386(0x10, &Regs, &Regs);
1051 ULONG BytesInLastBank;
1071 for (CurrentBank = 0; CurrentBank < BanksToCopy; CurrentBank++)
1094 AttrChar = ((
USHORT) Attr << 8) |
' ';
1110 *BufPtr = ((
USHORT) Attr << 8) | (
Ch & 0xff);
UINT32 strtoul(const char *String, char **Terminator, UINT32 Base)
#define DBG_DEFAULT_CHANNEL(ch)
enum tagVIDEODISPLAYMODE VIDEODISPLAYMODE
struct _VideoMode VideoMode
VOID NTAPI WRITE_PORT_USHORT(IN PUSHORT Port, IN USHORT Value)
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
#define READ_PORT_UCHAR(p)
#define WRITE_PORT_UCHAR(p, d)
int __cdecl Int386(int ivec, REGS *in, REGS *out)
#define VIDEOPORT_PALETTE_WRITE
#define VIDEOCARD_CGA_OR_OTHER
VOID PcVideoSetTextCursorPosition(UCHAR X, UCHAR Y)
static SVGA_MODE_INFORMATION VesaVideoModeInformation
VOID PcVideoPrepareForReactOS(VOID)
struct SVGA_MODE_INFORMATION * PSVGA_MODE_INFORMATION
static BOOLEAN PcVideoSetMode80x34(VOID)
#define VIDEOTEXT_MEM_ADDRESS
BOOLEAN PcVideoIsPaletteFixed(VOID)
static VOID PcVideoDisableCursorEmulation(VOID)
VOID PcVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue)
static BOOLEAN PcVideoSetMode80x25(VOID)
#define VIDEOPORT_PALETTE_READ
static VOID PcVideoSetFont8x8(VOID)
#define VIDEOPORT_PALETTE_DATA
static ULONG ScreenHeight
static ULONG PcVideoDetectVideoCard(VOID)
static ULONG CurrentMemoryBank
static VIDEODISPLAYMODE DisplayMode
static VOID PcVideoSetVerticalResolution(UCHAR VerticalResolutionMode)
VOID PcVideoGetFontsFromFirmware(PULONG RomFontPointers)
#define VIDEOTEXT_MEM_SIZE
#define VIDEOMODE_NORMAL_TEXT
static VOID PcVideoSetDisplayEnd(VOID)
static ULONG BytesPerScanLine
static BOOLEAN PcVideoSetMode80x60(VOID)
static VOID PcVideoSet480ScanLines(VOID)
static BOOLEAN PcVideoSetMode80x30(VOID)
#define VIDEOPORT_VERTICAL_RETRACE
static BOOLEAN PcVideoSetMode(USHORT NewMode)
#define VIDEOMODE_EXTENDED_TEXT
static VOID PcVideoDefineCursor(UCHAR StartScanLine, UCHAR EndScanLine)
UCHAR MachDefaultTextColor
static VOID PcVideoSetBiosMode(UCHAR VideoMode)
static BOOLEAN PcVideoSetMode80x43(VOID)
static VOID PcVideoSetFont8x14(VOID)
#define VIDEOVGA_MEM_ADDRESS
static BOOLEAN VesaVideoMode
static VOID PcVideoSetMemoryBank(USHORT BankNumber)
static BOOLEAN PcVideoSetBiosVesaMode(USHORT Mode)
VOID PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
static VOID PcVideoSelectAlternatePrintScreen(VOID)
#define VERTRES_350_SCANLINES
static BOOLEAN PcVideoVesaGetSVGAModeInformation(USHORT Mode, PSVGA_MODE_INFORMATION ModeInformation)
VOID PcVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue)
VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayModeName, BOOLEAN Init)
static BOOLEAN PcVideoSetMode80x50_80x43(VOID)
ULONG PcVideoGetBufferSize(VOID)
VOID PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
VOID PcVideoClearScreen(UCHAR Attr)
static BOOLEAN PcVideoSetMode80x28(VOID)
VOID PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer)
static VOID PcVideoSetBlinkBit(BOOLEAN Enable)
VOID PcVideoHideShowTextCursor(BOOLEAN Show)
static USHORT BiosVideoMode
#define __WARNING_DEREF_NULL_PTR
#define _PRAGMA_WARNING_SUPPRESS(x)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
#define BIOSCALLBUFSEGMENT
#define BIOSCALLBUFOFFSET
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth