[NTVDM]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 16 Sep 2014 00:25:40 +0000 (00:25 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 16 Sep 2014 00:25:40 +0000 (00:25 +0000)
- Code formatting and precise an info in a comment,
- Remove an unneeded commented call, and
- Mention that INT 15h functions C1h and C2h need to be implemented for PS/2 support.

svn path=/trunk/; revision=64167

reactos/subsystems/ntvdm/bios/bios.h
reactos/subsystems/ntvdm/bios/bios32/bios32.c
reactos/subsystems/ntvdm/bios/bios32/kbdbios32.c

index 21eee31..a285426 100644 (file)
@@ -20,7 +20,8 @@
 #define BDA_SEGMENT     0x40
 #define BIOS_SEGMENT    0xF000
 
 #define BDA_SEGMENT     0x40
 #define BIOS_SEGMENT    0xF000
 
-#define BIOS_EQUIPMENT_LIST     0x2C // HACK: Disable FPU for now
+// HACK: Disable FPU for now
+#define BIOS_EQUIPMENT_LIST     0x2C // Bit 2 set: Mouse present
 
 #pragma pack(push, 1)
 
 
 #pragma pack(push, 1)
 
index 7bf9a83..39deaa1 100644 (file)
@@ -128,6 +128,13 @@ static VOID WINAPI BiosMiscService(LPWORD Stack)
             break;
         }
 
             break;
         }
 
+        case 0xC1:
+        case 0xC2:
+        {
+            DPRINT1("INT 15h, AH = 0x%02X must be implemented in order to support vendor mouse drivers\n");
+            break;
+        }
+
         default:
         {
             DPRINT1("BIOS Function INT 15h, AH = 0x%02X NOT IMPLEMENTED\n",
         default:
         {
             DPRINT1("BIOS Function INT 15h, AH = 0x%02X NOT IMPLEMENTED\n",
@@ -412,8 +419,9 @@ BOOLEAN Bios32Initialize(VOID)
     /* Initialize platform hardware (PIC/PIT chips, ...) */
     BiosHwSetup();
 
     /* Initialize platform hardware (PIC/PIT chips, ...) */
     BiosHwSetup();
 
-    /* Initialize the Keyboard and Video BIOS */
-    if (!KbdBios32Initialize() || !VidBios32Initialize() || !MouseBios32Initialize()) return FALSE;
+    /* Initialize the Keyboard, Video and Mouse BIOS */
+    if (!KbdBios32Initialize() || !VidBios32Initialize() || !MouseBios32Initialize())
+        return FALSE;
 
     ///////////// MUST BE DONE AFTER IVT INITIALIZATION !! /////////////////////
 
 
     ///////////// MUST BE DONE AFTER IVT INITIALIZATION !! /////////////////////
 
index 11cbd28..70b0513 100644 (file)
@@ -198,7 +198,7 @@ static VOID WINAPI BiosKeyboardIrq(LPWORD Stack)
     WORD Character;
 
     /* Get the scan code and virtual key code */
     WORD Character;
 
     /* Get the scan code and virtual key code */
-    ScanCode = IOReadB(PS2_DATA_PORT);
+    ScanCode   = IOReadB(PS2_DATA_PORT);
     VirtualKey = MapVirtualKey(ScanCode & 0x7F, MAPVK_VSC_TO_VK);
 
     /* Check if this is a key press or release */
     VirtualKey = MapVirtualKey(ScanCode & 0x7F, MAPVK_VSC_TO_VK);
 
     /* Check if this is a key press or release */
@@ -280,7 +280,6 @@ BOOLEAN KbdBios32Initialize(VOID)
 
     /* Set up the HW vector interrupts */
     EnableHwIRQ(1, BiosKeyboardIrq);
 
     /* Set up the HW vector interrupts */
     EnableHwIRQ(1, BiosKeyboardIrq);
-    // EnableHwIRQ(12, BiosMouseIrq);
 
     return TRUE;
 }
 
     return TRUE;
 }