Author: hbelusca
Date: Thu Jun 4 02:14:24 2015
New Revision: 68005
URL: http://svn.reactos.org/svn/reactos?rev=68005&view=rev
Log:
[NTVDM]: Fix my fix of r68003.
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c [iso-8859-1] Thu Jun 4 02:14:24 2015
@@ -784,6 +784,7 @@
WINAPI
Bios32Post(LPWORD Stack)
{
+ static BOOLEAN FirstBoot = TRUE;
#if 0
BOOLEAN Success;
#endif
@@ -884,12 +885,23 @@
switch (Bda->SoftReset)
{
case 0x0000:
- DisplayMessage(L"NTVDM is performing a COLD reboot! The program you are currently testing does not seem to behave correctly! The VDM will shut down...");
- // Fall through
+ {
+ if (!FirstBoot)
+ {
+ DisplayMessage(L"NTVDM is performing a COLD reboot! The program you are currently testing does not seem to behave correctly! The VDM will shut down...");
+ EmulatorTerminate();
+ return;
+ }
+ FirstBoot = FALSE;
+ break;
+ }
+
case 0x1234:
+ {
DisplayMessage(L"NTVDM is performing a WARM reboot! This is not supported at the moment. The VDM will shut down...");
EmulatorTerminate();
return;
+ }
default:
break;
Author: hbelusca
Date: Thu Jun 4 01:53:22 2015
New Revision: 68004
URL: http://svn.reactos.org/svn/reactos?rev=68004&view=rev
Log:
[INCLUDE:ASM]: fix the .space macro definition for MASM: it aims at imitating the .space macro of GAS. Its syntax is: ".space size_in_bytes optional_fill_byte_defaults_to_zero" . As previously declared, it was doing the reverse: filling *just* one (zero?) bytes with 'count' interpreted as a byte value. Also add a .skip macro that exactly does the same (and is equivalent of the same one in GAS).
Modified:
trunk/reactos/include/asm/asm.inc
Modified: trunk/reactos/include/asm/asm.inc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/asm/asm.inc?rev=68…
==============================================================================
--- trunk/reactos/include/asm/asm.inc [iso-8859-1] (original)
+++ trunk/reactos/include/asm/asm.inc [iso-8859-1] Thu Jun 4 01:53:22 2015
@@ -141,8 +141,12 @@
ENDM
ENDM
-.space MACRO count
- DB 0 DUP (count)
+.skip MACRO size, fill:=<0>
+ DB size DUP (fill)
+ENDM
+
+.space MACRO size, fill:=<0>
+ .skip size, fill
ENDM
ljmp MACRO segment, offset
Author: hbelusca
Date: Thu Jun 4 00:13:43 2015
New Revision: 68003
URL: http://svn.reactos.org/svn/reactos?rev=68003&view=rev
Log:
[NTVDM]: Do not rely on 0xCCCC for cold reboot checks. Fix some sentences.
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c [iso-8859-1] Thu Jun 4 00:13:43 2015
@@ -125,10 +125,8 @@
};
/*
- * Normally at F000:E05B there is the POST that finally calls the bootstrap
- * interrupt. It should also check the value of Bda->SoftReset. Since we do
- * all the POST in 32 bit from the start, we just place there the bootstrap
- * interrupt call.
+ * POST code at F000:E05B. All the POST is done in 32 bit
+ * and only at the end it calls the bootstrap interrupt.
*/
static BYTE PostCode[] =
{
@@ -828,7 +826,7 @@
/* Shutdown after Block Move Test (unsupported) */
case 0x09:
{
- DisplayMessage(L"Unsupported CMOS Shutdown Status value 0x%02X. The VDM is stopping...", ShutdownStatus);
+ DisplayMessage(L"Unsupported CMOS Shutdown Status value 0x%02X. The VDM will shut down.", ShutdownStatus);
EmulatorTerminate();
return;
}
@@ -883,19 +881,18 @@
* - if the word is 1234h, perform a warm reboot (aka. Ctrl-Alt-Del). Some stuff is skipped.
*/
- // FIXME: This is a debug temporary check:
- // Since NTVDM memory is by default initialized with 0xCC, it is also
- // the case for the BDA. So at first boot we get SoftReset == 0xCCCC.
- // After we zero out the BDA and put valid values in it.
- // If for some reason an app calls the BIOS initialization code,
- // SoftReset is normally zero (unless the app puts a non-null value in SoftReset)
- // and we can detect that. With the current state of NTVDM, apps calling
- // by hand the BIOS init code is a sign of a bug, e.g. see MSD.EXE version 2+.
- if (Bda->SoftReset != 0xCCCC)
+ switch (Bda->SoftReset)
{
- DisplayMessage(L"NTVDM is performing a COLD reboot! The program you are currently testing seems to not behave correctly! The VDM is stopping...");
- EmulatorTerminate();
- return;
+ case 0x0000:
+ DisplayMessage(L"NTVDM is performing a COLD reboot! The program you are currently testing does not seem to behave correctly! The VDM will shut down...");
+ // Fall through
+ case 0x1234:
+ DisplayMessage(L"NTVDM is performing a WARM reboot! This is not supported at the moment. The VDM will shut down...");
+ EmulatorTerminate();
+ return;
+
+ default:
+ break;
}
/* Initialize the BDA and the BIOS ROM Information */