[NTVDM]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Thu, 7 May 2015 23:54:47 +0000 (23:54 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Thu, 7 May 2015 23:54:47 +0000 (23:54 +0000)
- Move some interrupt initialization where it belongs and activate few other ones.
- Initialize interruct vector for INT 2Ah (Network check) because some apps directly call it and crash if it contains NULL.

svn path=/trunk/; revision=67595

reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c
reactos/subsystems/mvdm/ntvdm/bios/bios32/vidbios32.c
reactos/subsystems/mvdm/ntvdm/bios/vidbios.c
reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c

index 0de3fa0..3c6b6ad 100644 (file)
@@ -570,7 +570,6 @@ static VOID InitializeBiosInt32(VOID)
     RegisterBiosInt32(0x17, NULL);
     RegisterBiosInt32(0x1B, NULL);
     RegisterBiosInt32(0x4A, NULL); // User Alarm Handler
-    RegisterBiosInt32(0x6D, NULL); // Video BIOS Entry Point
 
     /* Relocated services by the BIOS (when needed) */
     RegisterBiosInt32(0x40, NULL); // ROM BIOS Diskette Handler relocated by Hard Disk BIOS
index 4b8ce6f..7a40da8 100644 (file)
@@ -29,6 +29,10 @@ BOOLEAN VidBios32Initialize(VOID)
     /* Register the BIOS 32-bit Interrupts */
     RegisterBiosInt32(BIOS_VIDEO_INTERRUPT, VidBiosVideoService);
 
+    /* Vectors that should be implemented */
+    RegisterBiosInt32(0x42, NULL); // Relocated Default INT 10h Video Services
+    RegisterBiosInt32(0x6D, NULL); // Video BIOS Entry Point
+
     return TRUE;
 }
 
index 82b2d5f..5e4720e 100644 (file)
@@ -3275,15 +3275,17 @@ VOID VidBiosDetachFromConsole(VOID)
 
 BOOLEAN VidBiosInitialize(VOID)
 {
-    /* Some interrupts are in fact addresses to tables */
-    ((PULONG)BaseAddress)[0x1D] = (ULONG)NULL;
-    // Far pointer to the 8x8 characters 80h-FFh
+    /* Some vectors are in fact addresses to tables */
+    ((PULONG)BaseAddress)[0x1D] = (ULONG)NULL; // Video Parameter Tables
+    // Far pointer to the 8x8 graphics font for the 8x8 characters 80h-FFh
     ((PULONG)BaseAddress)[0x1F] = MAKELONG(FONT_8x8_HIGH_OFFSET, VIDEO_BIOS_DATA_SEG);
-    // ((PULONG)BaseAddress)[0x42] = (ULONG)NULL;
-    // Far pointer to the 8x16 characters 00h-...
+    // Far pointer to the character table (EGA, MCGA, VGA) for the 8x16 characters 00h-...
     ((PULONG)BaseAddress)[0x43] = MAKELONG(FONT_8x16_OFFSET, VIDEO_BIOS_DATA_SEG);
-    ((PULONG)BaseAddress)[0x44] = (ULONG)NULL;
-    // ((PULONG)BaseAddress)[0x6D] = (ULONG)NULL;
+    ((PULONG)BaseAddress)[0x44] = (ULONG)NULL; // ROM BIOS Character Font, Characters 00h-7Fh (PCjr)
+
+    /* Relocated services by the BIOS (when needed) */
+    ((PULONG)BaseAddress)[0x42] = (ULONG)NULL; // Relocated Default INT 10h Video Services
+    ((PULONG)BaseAddress)[0x6D] = (ULONG)NULL; // Video BIOS Entry Point
 
     /* Fill the tables */
     RtlMoveMemory(SEG_OFF_TO_PTR(VIDEO_BIOS_DATA_SEG, FONT_8x8_OFFSET),
index ae33157..014e52f 100644 (file)
@@ -775,7 +775,7 @@ VOID WINAPI DosInt21h(LPWORD Stack)
         /* Get Interrupt Vector */
         case 0x35:
         {
-            DWORD FarPointer = ((PDWORD)BaseAddress)[getAL()];
+            ULONG FarPointer = ((PULONG)BaseAddress)[getAL()];
 
             /* Read the address from the IDT into ES:BX */
             setES(HIWORD(FarPointer));
@@ -2015,6 +2015,9 @@ BOOLEAN DosKRNLInitialize(VOID)
     RegisterDosInt32(0x29, DosFastConOut    ); // DOS 2+ Fast Console Output
     RegisterDosInt32(0x2F, DosInt2Fh        );
 
+    /* Unimplemented DOS interrupts */
+    RegisterDosInt32(0x2A, NULL); // Network - Installation Check
+
     /* Load the CON driver */
     ConDrvInitialize();