ReactOS  0.4.15-dev-4857-g47842d7
vbe.h File Reference
Include dependency graph for vbe.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _VBE_INFORMATION
 
struct  _VBE_MODE_INFO
 
struct  _VBE_MODE
 

Macros

#define OEM_NAME   "Cirrus Logic GD-5434 VGA"
 
#define OEM_NAME_PTR   0xF01D5091
 
#define VBE_MODE_COUNT   40
 
#define VBE_MODE_SUPPORTED   (1 << 0)
 
#define VBE_MODE_OPTIONAL_INFO   (1 << 1)
 
#define VBE_MODE_BIOS_SUPPORT   (1 << 2)
 
#define VBE_MODE_COLOR   (1 << 3)
 
#define VBE_MODE_GRAPHICS   (1 << 4)
 
#define VBE_WINDOW_EXISTS   (1 << 0)
 
#define VBE_WINDOW_READABLE   (1 << 1)
 
#define VBE_WINDOW_WRITABLE   (1 << 2)
 
#define VBE_MODEL_TEXT   0
 
#define VBE_MODEL_CGA   1
 
#define VBE_MODEL_HGC   2
 
#define VBE_MODEL_EGA   3
 
#define VBE_MODEL_PACKED   4
 
#define VBE_MODEL_UNCHAINED   5
 
#define VBE_MODEL_DIRECT   6
 
#define VBE_MODEL_YUV   7
 

Typedefs

typedef struct _VBE_INFORMATION VBE_INFORMATION
 
typedef struct _VBE_INFORMATIONPVBE_INFORMATION
 
typedef struct _VBE_MODE_INFO VBE_MODE_INFO
 
typedef struct _VBE_MODE_INFOPVBE_MODE_INFO
 
typedef const struct _VBE_MODE_INFOPCVBE_MODE_INFO
 
typedef struct _VBE_MODE VBE_MODE
 
typedef struct _VBE_MODEPVBE_MODE
 
typedef const struct _VBE_MODEPCVBE_MODE
 

Functions

 C_ASSERT (sizeof(VBE_INFORMATION)==256)
 
 C_ASSERT (sizeof(VBE_MODE_INFO) % sizeof(WORD)==0)
 
VOID WINAPI VbeService (LPWORD Stack)
 
VOID WINAPI VbeResetExtendedRegisters (VOID)
 
BOOLEAN WINAPI VbeSetExtendedVideoMode (BYTE ModeNumber)
 
BOOLEAN VbeInitialize (VOID)
 

Macro Definition Documentation

◆ OEM_NAME

#define OEM_NAME   "Cirrus Logic GD-5434 VGA"

Definition at line 16 of file vbe.h.

◆ OEM_NAME_PTR

#define OEM_NAME_PTR   0xF01D5091

Definition at line 17 of file vbe.h.

◆ VBE_MODE_BIOS_SUPPORT

#define VBE_MODE_BIOS_SUPPORT   (1 << 2)

Definition at line 24 of file vbe.h.

◆ VBE_MODE_COLOR

#define VBE_MODE_COLOR   (1 << 3)

Definition at line 25 of file vbe.h.

◆ VBE_MODE_COUNT

#define VBE_MODE_COUNT   40

Definition at line 19 of file vbe.h.

◆ VBE_MODE_GRAPHICS

#define VBE_MODE_GRAPHICS   (1 << 4)

Definition at line 26 of file vbe.h.

◆ VBE_MODE_OPTIONAL_INFO

#define VBE_MODE_OPTIONAL_INFO   (1 << 1)

Definition at line 23 of file vbe.h.

◆ VBE_MODE_SUPPORTED

#define VBE_MODE_SUPPORTED   (1 << 0)

Definition at line 22 of file vbe.h.

◆ VBE_MODEL_CGA

#define VBE_MODEL_CGA   1

Definition at line 35 of file vbe.h.

◆ VBE_MODEL_DIRECT

#define VBE_MODEL_DIRECT   6

Definition at line 40 of file vbe.h.

◆ VBE_MODEL_EGA

#define VBE_MODEL_EGA   3

Definition at line 37 of file vbe.h.

◆ VBE_MODEL_HGC

#define VBE_MODEL_HGC   2

Definition at line 36 of file vbe.h.

◆ VBE_MODEL_PACKED

#define VBE_MODEL_PACKED   4

Definition at line 38 of file vbe.h.

◆ VBE_MODEL_TEXT

#define VBE_MODEL_TEXT   0

Definition at line 34 of file vbe.h.

◆ VBE_MODEL_UNCHAINED

#define VBE_MODEL_UNCHAINED   5

Definition at line 39 of file vbe.h.

◆ VBE_MODEL_YUV

#define VBE_MODEL_YUV   7

Definition at line 41 of file vbe.h.

◆ VBE_WINDOW_EXISTS

#define VBE_WINDOW_EXISTS   (1 << 0)

Definition at line 29 of file vbe.h.

◆ VBE_WINDOW_READABLE

#define VBE_WINDOW_READABLE   (1 << 1)

Definition at line 30 of file vbe.h.

◆ VBE_WINDOW_WRITABLE

#define VBE_WINDOW_WRITABLE   (1 << 2)

Definition at line 31 of file vbe.h.

Typedef Documentation

◆ PCVBE_MODE

Definition at line 105 of file vbe.h.

◆ PCVBE_MODE_INFO

Definition at line 93 of file vbe.h.

◆ PVBE_INFORMATION

◆ PVBE_MODE

◆ PVBE_MODE_INFO

◆ VBE_INFORMATION

◆ VBE_MODE

◆ VBE_MODE_INFO

Function Documentation

◆ C_ASSERT() [1/2]

C_ASSERT ( sizeof(VBE_INFORMATION = =256)

◆ C_ASSERT() [2/2]

C_ASSERT ( sizeof(VBE_MODE_INFO) % sizeof(WORD = =0)

◆ VbeInitialize()

BOOLEAN VbeInitialize ( VOID  )

Definition at line 763 of file vbe.c.

764 {
766  BYTE SeqIndex = IOReadB(VGA_SEQ_INDEX);
767 
768  /* Store the OEM name */
770 
771  /* Unlock SVGA extensions on the card */
774 
775  /* Check if it worked */
777 
778  IOWriteB(VGA_SEQ_INDEX, SeqIndex);
779  return Success;
780 }
#define OEM_NAME_PTR
Definition: vbe.h:17
#define SVGA_SEQ_UNLOCKED
Definition: svga.h:117
#define VGA_SEQ_INDEX
Definition: svga.h:55
UCHAR IOReadB(USHORT Port)
Definition: io.c:64
unsigned char BOOLEAN
#define FAR_POINTER(x)
Definition: emulator.h:35
VOID IOWriteB(USHORT Port, UCHAR Buffer)
Definition: io.c:111
#define OEM_NAME
Definition: vbe.h:16
unsigned char BYTE
Definition: xxhash.c:193
#define VGA_SEQ_DATA
Definition: svga.h:56
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388

Referenced by VidBiosPost().

◆ VbeResetExtendedRegisters()

VOID WINAPI VbeResetExtendedRegisters ( VOID  )

Definition at line 380 of file vbe.c.

381 {
382  BYTE i;
383 
384  /* Disable interrupts */
385  BOOLEAN Interrupts = getIF();
386  setIF(0);
387 
388  /* Turn the video off */
391 
392  /* Synchronous reset on */
395 
396  /* Clear the extended sequencer registers, except for the VCLKs and MCLK */
398  {
400  && (i < SVGA_SEQ_VCLK0_NUMERATOR_REG || i > SVGA_SEQ_VCLK3_NUMERATOR_REG))
401  {
403  IOWriteB(VGA_SEQ_DATA, 0x00);
404  }
405  }
406 
407  /* Reset the VCLKs */
409  IOWriteB(VGA_SEQ_DATA, 0x66);
411  IOWriteB(VGA_SEQ_DATA, 0x3B);
412 
414  IOWriteB(VGA_SEQ_DATA, 0x5B);
416  IOWriteB(VGA_SEQ_DATA, 0x2F);
417 
419  IOWriteB(VGA_SEQ_DATA, 0x45);
421  IOWriteB(VGA_SEQ_DATA, 0x30);
422 
424  IOWriteB(VGA_SEQ_DATA, 0x7E);
426  IOWriteB(VGA_SEQ_DATA, 0x33);
427 
428  /* Reset the MCLK */
430  IOWriteB(VGA_SEQ_DATA, 0x1C);
431 
432  /* Synchronous reset off */
435 
436  /* Reset the extended CRTC registers */
438  {
439  if ((i < SVGA_CRTC_UNUSED0_REG || i > SVGA_CRTC_UNUSED6_REG) && i != SVGA_CRTC_UNUSED7_REG)
440  {
442  IOWriteB(VGA_CRTC_DATA, 0x00);
443  }
444  }
445 
446  /* Reset the extended GC registers */
448  {
450  && (i < SVGA_GC_UNUSED1_REG || i > SVGA_GC_UNUSED10_REG))
451  {
453  IOWriteB(VGA_GC_DATA, 0x00);
454  }
455  }
456 
457  /*
458  * And finally, reset the hidden register. This requires 4 dummy reads from
459  * the DAC mask register.
460  */
461  for (i = 0; i < 4; i++) IOReadB(VGA_DAC_MASK);
462  IOWriteB(VGA_DAC_MASK, 0x00);
463 
464  /* Turn the video on */
467 
468  /* Restore interrupts */
469  setIF(Interrupts);
470 }
#define VGA_SEQ_CLOCK_SD
Definition: svga.h:108
#define VGA_SEQ_RESET_AR
Definition: svga.h:100
#define VGA_SEQ_INDEX
Definition: svga.h:55
UCHAR IOReadB(USHORT Port)
Definition: io.c:64
unsigned char BOOLEAN
#define VGA_GC_INDEX
Definition: svga.h:68
#define VGA_GC_DATA
Definition: svga.h:69
VOID IOWriteB(USHORT Port, UCHAR Buffer)
Definition: io.c:111
unsigned char BYTE
Definition: xxhash.c:193
ULONG WINAPI getIF(VOID)
Definition: registers.c:636
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define VGA_SEQ_DATA
Definition: svga.h:56
#define VGA_DAC_MASK
Definition: svga.h:58
VOID WINAPI setIF(ULONG)
Definition: registers.c:643
#define VGA_SEQ_RESET_SR
Definition: svga.h:101
#define VGA_CRTC_DATA
Definition: vidbios.h:115
#define VGA_CRTC_INDEX
Definition: vidbios.h:114

Referenced by VidBiosSetVideoMode().

◆ VbeService()

VOID WINAPI VbeService ( LPWORD  Stack)

Definition at line 472 of file vbe.c.

473 {
474  INT i;
475 
476  switch (getAL())
477  {
478  /* Get VBE Information */
479  case 0x00:
480  {
482  PWORD Data = (PWORD)&Info;
483 
484  /* Function recognized */
485  setAL(0x4F);
486 
487  ZeroMemory(&Info, sizeof(VBE_INFORMATION));
488  Info.Signature = 'ASEV';
489  Info.Version = 0x0102;
490  Info.OemName = OEM_NAME_PTR;
491  Info.Capabilities = 0;
492  Info.ModeList = MAKELONG(LOWORD(getDI()
493  + FIELD_OFFSET(VBE_INFORMATION, ModeListBuffer)),
494  getES());
495  Info.VideoMemory = HIWORD(SVGA_BANK_SIZE * VGA_NUM_BANKS);
496 
497  /* Fill the mode list */
498  for (i = 0; i < VBE_MODE_COUNT; i++)
499  {
500  /* Some modes don't have VESA numbers */
501  if (Modes[i].VesaNumber != 0xFFFF)
502  {
503  Info.ModeListBuffer[i] = Modes[i].VesaNumber;
504  }
505  }
506 
507  Info.ModeListBuffer[VBE_MODE_COUNT] = 0xFFFF;
508 
509  /* Copy the data to the caller */
510  for (i = 0; i < sizeof(VBE_INFORMATION) / sizeof(WORD); i++)
511  {
512  *(PWORD)SEG_OFF_TO_PTR(getES(), LOWORD(getDI() + i * 2)) = Data[i];
513  }
514 
515  setAH(0);
516  break;
517  }
518 
519  /* Get VBE Mode Information */
520  case 0x01:
521  {
523  PWORD Data = NULL;
524 
525  /* Function recognized */
526  setAL(0x4F);
527 
528  if (Mode == NULL)
529  {
530  /* Mode not found */
531  setAH(1);
532  break;
533  }
534 
535  Data = (PWORD)Mode->Info;
536  if (Data == NULL)
537  {
538  DPRINT1("WARNING: The mode information for mode %02X (%03X) is missing!\n",
539  Mode->Number,
540  Mode->VesaNumber);
541 
542  setAH(1);
543  break;
544  }
545 
546  /* Clear the buffer */
547  for (i = 0; i < 128; i++)
548  {
549  *(PWORD)SEG_OFF_TO_PTR(getES(), LOWORD(getDI() + i * 2)) = 0;
550  }
551 
552  /* Copy the data to the caller */
553  for (i = 0; i < sizeof(VBE_MODE_INFO) / sizeof(WORD); i++)
554  {
555  *(PWORD)SEG_OFF_TO_PTR(getES(), LOWORD(getDI() + i * 2)) = Data[i];
556  }
557 
558  setAH(0);
559  break;
560  }
561 
562  /* Set VBE Mode */
563  case 0x02:
564  {
565  WORD VesaNumber = getBX();
566  setAL(0x4F);
567 
568  if (VesaNumber <= BIOS_MAX_VIDEO_MODE)
569  {
570  /* Call the VGA BIOS */
571  setAH(0x00);
572  setAL(VesaNumber);
574 
575  setAH(Bda->VideoMode != VesaNumber);
576  }
577  else
578  {
579  /* This is an extended video mode */
580  PCVBE_MODE Mode = VbeGetModeByNumber(VesaNumber);
581 
582  if (Mode) setAH(!VbeSetExtendedVideoMode(Mode->Number));
583  else setAH(1);
584  }
585 
586  break;
587  }
588 
589  /* Get Current VBE Mode */
590  case 0x03:
591  {
593 
594  setAL(0x4F);
595 
596  if (Mode)
597  {
598  setBX(Mode->VesaNumber != 0xFFFF
599  ? Mode->VesaNumber : Mode->Number);
600  setAH(0);
601  }
602  else
603  {
604  setAH(1);
605  }
606 
607  break;
608  }
609 
610  /* CPU Video Memory Control */
611  case 0x05:
612  {
613  BYTE Window = getBL();
614  BYTE OldGcIndex = IOReadB(VGA_GC_INDEX);
615 
616  switch (getBH())
617  {
618  /* Select Memory Window */
619  case 0:
620  {
621  setAL(0x4F);
622 
623  if (getDH() != 0)
624  {
625  /* Offset too high */
626  setAH(1);
627  break;
628  }
629 
632 
633  setAH(0);
634  break;
635  }
636 
637  /* Return Memory Window */
638  case 1:
639  {
642 
643  setAX(0x004F);
644  break;
645  }
646 
647  default:
648  {
649  DPRINT("VESA INT 0x10, AL = 0x05, Unknown subfunction: %02X", getBH());
650  }
651  }
652 
653  IOWriteB(VGA_GC_INDEX, OldGcIndex);
654  break;
655  }
656 
657  /* Get/Set Display Start */
658  case 0x07:
659  {
660  DWORD StartAddress;
661  BYTE Value;
663  BYTE OldCrtcIndex = IOReadB(VGA_CRTC_INDEX_COLOR);
664 
665  if (getBL() & 0x80)
666  {
667  /* Wait for a vertical retrace */
669  {
670  setCF(1);
671  break;
672  }
673 
674  setCF(0);
675  }
676 
677  switch (getBL() & 0x7F)
678  {
679  /* Set Display Start */
680  case 0x00:
681  {
682  setAL(0x4F);
683 
684  if (Mode == NULL || Mode->Info == NULL)
685  {
686  /* This is not a VBE mode */
687  // TODO: Support anyway, perhaps? It can be done.
688  setAH(0x01);
689  break;
690  }
691 
692  StartAddress = getCX() + getDX() * Mode->Info->BytesPerScanline;
693 
697  Value |= (StartAddress >> 12) & SVGA_CRTC_EXT_ADDR_BIT19;
699 
703  Value |= (StartAddress >> 16) & SVGA_CRTC_EXT_ADDR_BIT16;
704  Value |= (StartAddress >> 15) & SVGA_CRTC_EXT_ADDR_BITS1718;
706 
708  IOWriteB(VGA_CRTC_DATA_COLOR, (StartAddress >> 8) & 0xFF);
710  IOWriteB(VGA_CRTC_DATA_COLOR, StartAddress & 0xFF);
711 
712  setAH(0);
713  break;
714  }
715 
716  /* Get Display Start */
717  case 0x01:
718  {
719  setAL(0x4F);
720  StartAddress = 0;
721 
722  if (Mode == NULL || Mode->Info == NULL)
723  {
724  /* This is not a VBE mode */
725  // TODO: Support anyway, perhaps? It can be done.
726  setAH(0x01);
727  break;
728  }
729 
731  StartAddress = (IOReadB(VGA_CRTC_DATA_COLOR) & SVGA_CRTC_EXT_ADDR_BIT19) << 12;
732 
735  StartAddress |= (Value & SVGA_CRTC_EXT_ADDR_BIT16) << 16;
736  StartAddress |= (Value & SVGA_CRTC_EXT_ADDR_BITS1718) << 15;
737 
739  StartAddress |= IOReadB(VGA_CRTC_DATA_COLOR) << 8;
741  StartAddress |= IOReadB(VGA_CRTC_DATA_COLOR);
742 
743  setCX(StartAddress % Mode->Info->BytesPerScanline);
744  setDX(StartAddress / Mode->Info->BytesPerScanline);
745 
746  setAH(0);
747  break;
748  }
749  }
750 
751  IOWriteB(VGA_CRTC_INDEX_COLOR, OldCrtcIndex);
752  break;
753  }
754 
755  default:
756  {
757  DPRINT1("VESA BIOS Extensions function %02Xh NOT IMPLEMENTED!\n", getAL());
758  break;
759  }
760  }
761 }
#define VGA_CRTC_INDEX_COLOR
Definition: svga.h:65
USHORT WINAPI getBX(VOID)
Definition: registers.c:170
Definition: vbe.h:97
_In_ ULONG Mode
Definition: hubbusif.h:303
USHORT WINAPI getCX(VOID)
Definition: registers.c:228
VOID WINAPI setAH(UCHAR)
Definition: registers.c:135
BYTE VideoMode
Definition: bios.h:59
VOID WINAPI setAX(USHORT)
Definition: registers.c:121
static const VBE_MODE Modes[VBE_MODE_COUNT]
Definition: vbe.c:189
VOID Int32Call(IN PCALLBACK16 Context, IN BYTE IntNumber)
Definition: int32.c:151
VOID WINAPI setAL(UCHAR)
Definition: registers.c:149
PBIOS_DATA_AREA Bda
Definition: bios.c:42
#define ZeroMemory
Definition: winbase.h:1667
UCHAR WINAPI getAL(VOID)
Definition: registers.c:142
if(dx==0 &&dy==0)
Definition: linetemp.h:174
UCHAR WINAPI getDH(VOID)
Definition: registers.c:300
#define SEG_OFF_TO_PTR(seg, off)
Definition: emulator.h:32
int32_t INT
Definition: typedefs.h:58
UCHAR WINAPI getDL(VOID)
Definition: registers.c:314
#define BIOS_VIDEO_INTERRUPT
Definition: vidbios.h:15
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:683
#define SVGA_CRTC_EXT_ADDR_BIT19
Definition: svga.h:199
Definition: window.c:28
#define OEM_NAME_PTR
Definition: vbe.h:17
VOID WINAPI setCF(ULONG)
Definition: registers.c:573
UCHAR IOReadB(USHORT Port)
Definition: io.c:64
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define SVGA_CRTC_EXT_ADDR_BITS1718
Definition: svga.h:195
BOOLEAN WINAPI VbeSetExtendedVideoMode(BYTE ModeNumber)
Definition: vbe.c:356
WORD VesaNumber
Definition: vbe.h:100
#define VGA_GC_INDEX
Definition: svga.h:68
#define VGA_GC_DATA
Definition: svga.h:69
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
WORD * PWORD
Definition: pedump.c:67
VOID IOWriteB(USHORT Port, UCHAR Buffer)
Definition: io.c:111
USHORT WINAPI getES(VOID)
Definition: registers.c:522
CALLBACK16 BiosContext
Definition: bios32.c:45
#define VGA_CRTC_DATA_COLOR
Definition: svga.h:66
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
UCHAR WINAPI getBH(VOID)
Definition: registers.c:184
VOID WINAPI setDX(USHORT)
Definition: registers.c:293
#define VGA_NUM_BANKS
Definition: svga.h:14
PCVBE_MODE VbeGetModeByNumber(WORD Number)
Definition: vbe.c:220
USHORT WINAPI getDX(VOID)
Definition: registers.c:286
VOID WINAPI setBX(USHORT)
Definition: registers.c:177
unsigned char BYTE
Definition: xxhash.c:193
#define VGA_INSTAT1_READ_COLOR
Definition: svga.h:45
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
UCHAR WINAPI getBL(VOID)
Definition: registers.c:198
#define BIOS_MAX_VIDEO_MODE
Definition: vidbios.h:20
struct _VBE_INFORMATION VBE_INFORMATION
USHORT WINAPI getDI(VOID)
Definition: registers.c:434
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define NULL
Definition: types.h:112
#define VBE_MODE_COUNT
Definition: vbe.h:19
VOID WINAPI setCX(USHORT)
Definition: registers.c:235
#define VGA_STAT_VRETRACE
Definition: svga.h:92
#define DPRINT1
Definition: precomp.h:8
struct _VBE_MODE_INFO VBE_MODE_INFO
#define SVGA_BANK_SIZE
Definition: svga.h:31
#define HIWORD(l)
Definition: typedefs.h:247
#define SVGA_CRTC_EXT_ADDR_BIT16
Definition: svga.h:193
#define DPRINT
Definition: sndvol32.h:71
#define LOWORD(l)
Definition: pedump.c:82

Referenced by VidBiosVideoService().

◆ VbeSetExtendedVideoMode()

BOOLEAN WINAPI VbeSetExtendedVideoMode ( BYTE  ModeNumber)

Definition at line 356 of file vbe.c.

357 {
358  PCVBE_MODE Mode = VbeGetModeByNumber(ModeNumber);
359  if (Mode == NULL) return FALSE;
360 
361  /* At this point, Mode->Registers shouldn't be NULL unless the mode is unimplemented */
362  if (Mode->Registers == NULL)
363  {
364  DPRINT1("Extended video mode %02X still UNIMPLEMENTED.\n", ModeNumber);
365  return FALSE;
366  }
367 
368  /* Set the registers */
369  VbeSetExtendedRegisters(Mode->Registers);
370 
371  /* Update the current video mode in the BDA */
372  Bda->VideoMode = ModeNumber;
373 
374  /* Clear the screen */
375  VgaClearMemory();
376 
377  return TRUE;
378 }
Definition: vbe.h:97
_In_ ULONG Mode
Definition: hubbusif.h:303
#define TRUE
Definition: types.h:120
BYTE VideoMode
Definition: bios.h:59
PBIOS_DATA_AREA Bda
Definition: bios.c:42
VOID VgaClearMemory(VOID)
Definition: svga.c:2074
static VOID VbeSetExtendedRegisters(PSVGA_REGISTERS Registers)
Definition: vbe.c:240
#define FALSE
Definition: types.h:117
PCVBE_MODE VbeGetModeByNumber(WORD Number)
Definition: vbe.c:220
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8

Referenced by VbeService(), and VidBiosSetVideoMode().