Perform multiple CPU instructions in one emulator cycle.


svn path=/branches/ntvdm/; revision=59298
This commit is contained in:
Aleksandar Andrejevic 2013-06-23 00:20:24 +00:00
parent 030a935096
commit e7ce79fc05
2 changed files with 3 additions and 2 deletions

View file

@ -156,9 +156,9 @@ INT wmain(INT argc, WCHAR *argv[])
}
/* 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);

View file

@ -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