Author: aandrejevic Date: Sun Jun 23 00:20:24 2013 New Revision: 59298
URL: http://svn.reactos.org/svn/reactos?rev=59298&view=rev Log: [NTVDM] Perform multiple CPU instructions in one emulator cycle.
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.c branches/ntvdm/subsystems/ntvdm/ntvdm.h
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.c?r... ============================================================================== --- branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] Sun Jun 23 00:20:24 2013 @@ -156,9 +156,9 @@ }
/* Continue CPU emulation */ - EmulatorStep(); + for (i = 0; i < STEPS_PER_CYCLE; i++) EmulatorStep();
- Cycles++; + Cycles += STEPS_PER_CYCLE; if ((CurrentTickCount - LastCyclePrintout) >= 1000) { DPRINT1("NTVDM: %d Instructions Per Second\n", Cycles);
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.h URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.h?r... ============================================================================== --- branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] Sun Jun 23 00:20:24 2013 @@ -32,6 +32,7 @@ #define SPECIAL_INT_NUM 0xFF #define SEGMENT_TO_MCB(seg) ((PDOS_MCB)((ULONG_PTR)BaseAddress + TO_LINEAR((seg), 0))) #define SEGMENT_TO_PSP(seg) ((PDOS_PSP)((ULONG_PTR)BaseAddress + TO_LINEAR((seg), 0))) +#define STEPS_PER_CYCLE 256
/* DOS constants */ #define DOS_VERSION 0x0600