Author: hbelusca
Date: Thu Sep 24 00:27:59 2015
New Revision: 69339
URL:
http://svn.reactos.org/svn/reactos?rev=69339&view=rev
Log:
[NTVDM]
- Fix ZF and CF flags setting in function INT 2Fh, AX=1214h.
- Use CreateEventW explicitely.
- Set the VdmTaskEvent event at startup. This allows user input by default (even if we
don't run our own DOS) in NTVDM. Fixes keyboard input not working when testing
boot&usage of MSDOS 6.
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.c
trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c
trunk/reactos/subsystems/mvdm/ntvdm/emulator.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.c [iso-8859-1] Thu Sep 24 00:27:59 2015
@@ -1015,7 +1015,7 @@
sizeof(*DosStartProc32.ComSpecInfo));
ASSERT(DosStartProc32.ComSpecInfo);
- DosStartProc32.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ DosStartProc32.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
ASSERT(DosStartProc32.hEvent);
#endif
Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c [iso-8859-1] Thu Sep 24
00:27:59 2015
@@ -2184,8 +2184,16 @@
PVOID PointerFromFarPointer2 = SEG_OFF_TO_PTR(getES(), getDI());
BOOLEAN AreEqual = (PointerFromFarPointer1 ==
PointerFromFarPointer2);
- setZF(AreEqual);
- setCF(!AreEqual);
+ if (AreEqual)
+ {
+ Stack[STACK_FLAGS] |= EMULATOR_FLAG_ZF;
+ Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF;
+ }
+ else
+ {
+ Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_ZF;
+ Stack[STACK_FLAGS] |= EMULATOR_FLAG_CF;
+ }
break;
}
Modified: trunk/reactos/subsystems/mvdm/ntvdm/emulator.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/emul…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/emulator.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/emulator.c [iso-8859-1] Thu Sep 24 00:27:59 2015
@@ -475,7 +475,7 @@
/**************** ATTACH INPUT WITH CONSOLE *****************/
/* Create the task event */
- VdmTaskEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ VdmTaskEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
ASSERT(VdmTaskEvent != NULL);
/* Start the input thread */
@@ -486,6 +486,7 @@
EmulatorCleanup();
return FALSE;
}
+ ResumeEventThread();
/************************************************************/
/* Initialize the VGA */