[NTVDM]
authorAleksandar Andrejevic <aandrejevic@reactos.org>
Mon, 2 Jun 2014 18:24:58 +0000 (18:24 +0000)
committerAleksandar Andrejevic <aandrejevic@reactos.org>
Mon, 2 Jun 2014 18:24:58 +0000 (18:24 +0000)
Initialize the VGA-related BDA data fields.

svn path=/trunk/; revision=63534

reactos/subsystems/ntvdm/bios/bios.h
reactos/subsystems/ntvdm/bios/vidbios.c

index 9b47f16..21eee31 100644 (file)
@@ -76,7 +76,8 @@ typedef struct
     WORD KeybdBufferEnd;                        // 0x82
     BYTE ScreenRows;                            // 0x84
     WORD CharacterHeight;                       // 0x85
-    BYTE EGAFlags[2];                           // 0x87
+    BYTE VGAOptions;                            // 0x87
+    BYTE VGASwitches;                           // 0x88
     BYTE VGAFlags[2];                           // 0x89
     DWORD Reserved3;                            // 0x8b
     BYTE Reserved4;                             // 0x8f
index c5d94e0..8f50d32 100644 (file)
@@ -1572,6 +1572,10 @@ BOOLEAN VidBiosInitialize(VOID)
     ((PULONG)BaseAddress)[0x43] = (ULONG)NULL;
     ((PULONG)BaseAddress)[0x44] = (ULONG)NULL;
 
+    /* Initialize the VGA BDA data */
+    Bda->VGAOptions = 0x30;     /* 256 KB Video RAM */
+    Bda->VGASwitches = 0x09;    /* High-resolution */
+
     //
     // FIXME: At the moment we always set a VGA mode. In the future,
     // we should set this mode **only** when: