Author: hbelusca
Date: Sat Feb 1 16:32:20 2014
New Revision: 61902
URL:
http://svn.reactos.org/svn/reactos?rev=61902&view=rev
Log:
[NTVDM]
- Define and export VDDSimulate16 and host_simulate.
- Move the big emulation loop from ntvdm.c to clock.c, and the console input pump thread
from ps2.c to ntvdm.c.
Indeed:
* Moving the emulation loop out of the main initialization function will be helpful if
one wants to modify how emulation is done,
* The console input pump thread deals also with console UI bits that have nothing to do
with keyboard/mouse/ps-2. Instead, the pump thread will dispatch keyboard and mouse events
to the ps/2 controller.
- Implement a custom menu in the console's system menu to be able to parametrize ROS
VDM (work-in-progress); at the moment only a menu item to show/hide mouse pointer, and
another one allowing us to quit properly the VDM are implemented. The menu code was taken
from the GUI frontend in winsrv.dll. Only english and french translations available at the
moment.
Added:
branches/ntvdm/subsystems/ntvdm/clock.c (with props)
branches/ntvdm/subsystems/ntvdm/clock.h (with props)
branches/ntvdm/subsystems/ntvdm/lang/en-US.rc (with props)
branches/ntvdm/subsystems/ntvdm/lang/fr-FR.rc (with props)
Modified:
branches/ntvdm/include/ddk/nt_vdd.h
branches/ntvdm/subsystems/ntvdm/CMakeLists.txt
branches/ntvdm/subsystems/ntvdm/emulator.c
branches/ntvdm/subsystems/ntvdm/hardware/ps2.c
branches/ntvdm/subsystems/ntvdm/hardware/ps2.h
branches/ntvdm/subsystems/ntvdm/ntvdm.c
branches/ntvdm/subsystems/ntvdm/ntvdm.h
branches/ntvdm/subsystems/ntvdm/ntvdm.rc
branches/ntvdm/subsystems/ntvdm/ntvdm.spec
branches/ntvdm/subsystems/ntvdm/resource.h
Modified: branches/ntvdm/include/ddk/nt_vdd.h
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/include/ddk/nt_vdd.h?rev=…
==============================================================================
--- branches/ntvdm/include/ddk/nt_vdd.h [iso-8859-1] (original)
+++ branches/ntvdm/include/ddk/nt_vdd.h [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -31,6 +31,10 @@
/*
* VDM Control
*/
+
+VOID
+WINAPI
+VDDSimulate16(VOID);
VOID
WINAPI
Modified: branches/ntvdm/subsystems/ntvdm/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/CMakeLis…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/CMakeLists.txt [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/CMakeLists.txt [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -19,6 +19,7 @@
dos/dos32krnl/dos.c
dos/dem.c
bop.c
+ clock.c
emulator.c
int32.c
io.c
Added: branches/ntvdm/subsystems/ntvdm/clock.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/clock.c?…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/clock.c (added)
+++ branches/ntvdm/subsystems/ntvdm/clock.c [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -0,0 +1,173 @@
+/*
+ * COPYRIGHT: GPL - See COPYING in the top level directory
+ * PROJECT: ReactOS Virtual DOS Machine
+ * FILE: clock.c
+ * PURPOSE: Clock for VDM
+ * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
+ * Hermes Belusca-Maito (hermes.belusca(a)sfr.fr)
+ */
+
+/* INCLUDES *******************************************************************/
+
+#define NDEBUG
+
+#include "emulator.h"
+
+// #include "clock.h"
+
+#include "hardware/cmos.h"
+#include "hardware/ps2.h"
+#include "hardware/timer.h"
+#include "hardware/vga.h"
+
+/* DEFINES ********************************************************************/
+
+/*
+ * Activate IPS_DISPLAY if you want to display the
+ * number of instructions per second, as well as
+ * the computed number of ticks for the PIT.
+ */
+// #define IPS_DISPLAY
+
+/*
+ * Activate WORKING_TIMER when the PIT timing problem is fixed.
+ */
+// #define WORKING_TIMER
+
+
+/* Processor speed */
+#define STEPS_PER_CYCLE 256
+#define KBD_INT_CYCLES 16
+
+/* VARIABLES ******************************************************************/
+
+LARGE_INTEGER StartPerfCount, Frequency;
+
+LARGE_INTEGER LastTimerTick, LastRtcTick, Counter;
+LONGLONG TimerTicks;
+DWORD StartTickCount, CurrentTickCount;
+DWORD LastClockUpdate;
+DWORD LastVerticalRefresh;
+INT KeyboardIntCounter = 0;
+
+#ifdef IPS_DISPLAY
+ DWORD LastCyclePrintout;
+ DWORD Cycles = 0;
+#endif
+
+/* PUBLIC FUNCTIONS ***********************************************************/
+
+VOID ClockUpdate(VOID)
+{
+ UINT i;
+
+#ifdef WORKING_TIMER
+ DWORD PitResolution = PitGetResolution();
+#endif
+ DWORD RtcFrequency = RtcGetTicksPerSecond();
+
+ /* Get the current number of ticks */
+ CurrentTickCount = GetTickCount();
+
+#ifdef WORKING_TIMER
+ if ((PitResolution <= 1000) && (RtcFrequency <= 1000))
+ {
+ /* Calculate the approximate performance counter value instead */
+ Counter.QuadPart = StartPerfCount.QuadPart
+ + (CurrentTickCount - StartTickCount)
+ * (Frequency.QuadPart / 1000);
+ }
+ else
+#endif
+ {
+ /* Get the current performance counter value */
+ QueryPerformanceCounter(&Counter);
+ }
+
+ /* Get the number of PIT ticks that have passed */
+ TimerTicks = ((Counter.QuadPart - LastTimerTick.QuadPart)
+ * PIT_BASE_FREQUENCY) / Frequency.QuadPart;
+
+ /* Update the PIT */
+ if (TimerTicks > 0)
+ {
+ PitClock(TimerTicks);
+ LastTimerTick = Counter;
+ }
+
+ /* Check for RTC update */
+ if ((CurrentTickCount - LastClockUpdate) >= 1000)
+ {
+ RtcTimeUpdate();
+ LastClockUpdate = CurrentTickCount;
+ }
+
+ /* Check for RTC periodic tick */
+ if ((Counter.QuadPart - LastRtcTick.QuadPart)
+ >= (Frequency.QuadPart / (LONGLONG)RtcFrequency))
+ {
+ RtcPeriodicTick();
+ LastRtcTick = Counter;
+ }
+
+ /* Check for vertical retrace */
+ if ((CurrentTickCount - LastVerticalRefresh) >= 15)
+ {
+ VgaRefreshDisplay();
+ LastVerticalRefresh = CurrentTickCount;
+ }
+
+ if (++KeyboardIntCounter == KBD_INT_CYCLES)
+ {
+ GenerateKeyboardInterrupts();
+ KeyboardIntCounter = 0;
+ }
+
+ /* Horizontal retrace occurs as fast as possible */
+ VgaHorizontalRetrace();
+
+ /* Continue CPU emulation */
+ // EmulatorSimulate();
+ for (i = 0; (i < STEPS_PER_CYCLE) && VdmRunning; i++)
+ {
+ EmulatorStep();
+#ifdef IPS_DISPLAY
+ Cycles++;
+#endif
+ }
+
+#ifdef IPS_DISPLAY
+ if ((CurrentTickCount - LastCyclePrintout) >= 1000)
+ {
+ DPRINT1("NTVDM: %lu Instructions Per Second; TimerTicks = %I64d\n",
Cycles, TimerTicks);
+ LastCyclePrintout = CurrentTickCount;
+ Cycles = 0;
+ }
+#endif
+}
+
+BOOLEAN ClockInitialize(VOID)
+{
+ /* Initialize the performance counter (needed for hardware timers) */
+ if (!QueryPerformanceFrequency(&Frequency))
+ {
+ wprintf(L"FATAL: Performance counter not available\n");
+ return FALSE;
+ }
+
+ /* Find the starting performance and tick count */
+ StartTickCount = GetTickCount();
+ QueryPerformanceCounter(&StartPerfCount);
+
+ /* Set the different last counts to the starting count */
+ LastClockUpdate = LastVerticalRefresh =
+#ifdef IPS_DISPLAY
+ LastCyclePrintout =
+#endif
+ StartTickCount;
+
+ /* Set the last timer ticks to the current time */
+ LastTimerTick = LastRtcTick = StartPerfCount;
+
+ return TRUE;
+}
Propchange: branches/ntvdm/subsystems/ntvdm/clock.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: branches/ntvdm/subsystems/ntvdm/clock.h
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/clock.h?…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/clock.h (added)
+++ branches/ntvdm/subsystems/ntvdm/clock.h [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -0,0 +1,20 @@
+/*
+ * COPYRIGHT: GPL - See COPYING in the top level directory
+ * PROJECT: ReactOS Virtual DOS Machine
+ * FILE: clock.h
+ * PURPOSE: Clock for VDM
+ * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
+ * Hermes Belusca-Maito (hermes.belusca(a)sfr.fr)
+ */
+
+#ifndef _CLOCK_H_
+#define _CLOCK_H_
+
+/* FUNCTIONS ******************************************************************/
+
+VOID ClockUpdate(VOID);
+BOOLEAN ClockInitialize(VOID);
+
+#endif // _CLOCK_H_
+
+/* EOF */
Propchange: branches/ntvdm/subsystems/ntvdm/clock.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/ntvdm/subsystems/ntvdm/emulator.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/emulator…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -12,6 +12,7 @@
#include "emulator.h"
+#include "clock.h"
#include "bios/bios.h"
#include "hardware/cmos.h"
#include "hardware/pic.h"
@@ -24,14 +25,18 @@
#include "vddsup.h"
#include "io.h"
+#include <isvbop.h>
+
/* PRIVATE VARIABLES **********************************************************/
FAST486_STATE EmulatorContext;
LPVOID BaseAddress = NULL;
BOOLEAN VdmRunning = TRUE;
-static BOOLEAN A20Line = FALSE;
+static BOOLEAN A20Line = FALSE;
static BYTE Port61hState = 0x00;
+
+static HANDLE InputThread = NULL;
LPCWSTR ExceptionName[] =
{
@@ -118,173 +123,6 @@
/* Get the interrupt number from the PIC */
return PicGetInterrupt();
-}
-
-VOID WINAPI EmulatorDebugBreak(LPWORD Stack)
-{
- DPRINT1("NTVDM: BOP_DEBUGGER\n");
- DebugBreak();
-}
-
-
-static BYTE WINAPI Port61hRead(ULONG Port)
-{
- return Port61hState;
-}
-
-static VOID WINAPI Port61hWrite(ULONG Port, BYTE Data)
-{
- // BOOLEAN SpeakerChange = FALSE;
- BYTE OldPort61hState = Port61hState;
-
- /* Only the four lowest bytes can be written */
- Port61hState = (Port61hState & 0xF0) | (Data & 0x0F);
-
- if ((OldPort61hState ^ Port61hState) & 0x01)
- {
- DPRINT("PIT 2 Gate %s\n", Port61hState & 0x01 ? "on" :
"off");
- // SpeakerChange = TRUE;
- }
-
- PitSetGate(2, !!(Port61hState & 0x01));
-
- if ((OldPort61hState ^ Port61hState) & 0x02)
- {
- /* There were some change for the speaker... */
- DPRINT("Speaker %s\n", Port61hState & 0x02 ? "on" :
"off");
- // SpeakerChange = TRUE;
- }
- // if (SpeakerChange) SpeakerChange();
- SpeakerChange();
-}
-
-static VOID WINAPI PitChan0Out(LPVOID Param, BOOLEAN State)
-{
- if (State)
- {
- DPRINT("PicInterruptRequest\n");
- PicInterruptRequest(0); // Raise IRQ 0
- }
- // else < Lower IRQ 0 >
-}
-
-static VOID WINAPI PitChan1Out(LPVOID Param, BOOLEAN State)
-{
-#if 0
- if (State)
- {
- /* Set bit 4 of Port 61h */
- Port61hState |= 1 << 4;
- }
- else
- {
- /* Clear bit 4 of Port 61h */
- Port61hState &= ~(1 << 4);
- }
-#else
- Port61hState = (Port61hState & 0xEF) | (State << 4);
-#endif
-}
-
-static VOID WINAPI PitChan2Out(LPVOID Param, BOOLEAN State)
-{
- // BYTE OldPort61hState = Port61hState;
-
-#if 0
- if (State)
- {
- /* Set bit 5 of Port 61h */
- Port61hState |= 1 << 5;
- }
- else
- {
- /* Clear bit 5 of Port 61h */
- Port61hState &= ~(1 << 5);
- }
-#else
- Port61hState = (Port61hState & 0xDF) | (State << 5);
-#endif
- DPRINT("Speaker PIT out\n");
- // if ((OldPort61hState ^ Port61hState) & 0x20)
- // SpeakerChange();
-}
-
-/* PUBLIC FUNCTIONS ***********************************************************/
-
-BOOLEAN EmulatorInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput)
-{
- /* Allocate memory for the 16-bit address space */
- BaseAddress = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, MAX_ADDRESS);
- if (BaseAddress == NULL)
- {
- wprintf(L"FATAL: Failed to allocate VDM memory.\n");
- return FALSE;
- }
-
- /* Initialize I/O ports */
- /* Initialize RAM */
-
- /* Initialize the CPU */
- Fast486Initialize(&EmulatorContext,
- EmulatorReadMemory,
- EmulatorWriteMemory,
- EmulatorReadIo,
- EmulatorWriteIo,
- NULL,
- EmulatorBiosOperation,
- EmulatorIntAcknowledge,
- NULL /* TODO: Use a TLB */);
-
- /* Enable interrupts */
- setIF(1);
-
- /* Initialize the PIC, the PIT, the CMOS and the PC Speaker */
- PicInitialize();
- PitInitialize();
- CmosInitialize();
- SpeakerInitialize();
-
- /* Set output functions */
- PitSetOutFunction(0, NULL, PitChan0Out);
- PitSetOutFunction(1, NULL, PitChan1Out);
- PitSetOutFunction(2, NULL, PitChan2Out);
-
- /* Register the I/O Ports */
- RegisterIoPort(CONTROL_SYSTEM_PORT61H, Port61hRead, Port61hWrite);
-
- /* Initialize the PS2 port */
- PS2Initialize(ConsoleInput);
-
- /* Set the console input mode */
- // SetConsoleMode(ConsoleInput, ENABLE_MOUSE_INPUT | ENABLE_PROCESSED_INPUT);
-
- /* Initialize the VGA */
- // if (!VgaInitialize(ConsoleOutput)) return FALSE;
- VgaInitialize(ConsoleOutput);
-
- /* Register the DebugBreak BOP */
- RegisterBop(BOP_DEBUGGER, EmulatorDebugBreak);
-
- /* Initialize VDD support */
- VDDSupInitialize();
-
- return TRUE;
-}
-
-VOID EmulatorCleanup(VOID)
-{
- // VgaCleanup();
- PS2Cleanup();
-
- SpeakerCleanup();
- CmosCleanup();
- // PitCleanup();
- // PicCleanup();
-
- // Fast486Cleanup();
-
- /* Free the memory allocated for the 16-bit address space */
- if (BaseAddress != NULL) HeapFree(GetProcessHeap(), 0, BaseAddress);
}
VOID EmulatorException(BYTE ExceptionNumber, LPWORD Stack)
@@ -328,6 +166,25 @@
Fast486ExecuteAt(&EmulatorContext, Segment, Offset);
}
+VOID EmulatorStep(VOID)
+{
+ /* Dump the state for debugging purposes */
+ // Fast486DumpState(&EmulatorContext);
+
+ /* Execute the next instruction */
+ Fast486StepInto(&EmulatorContext);
+}
+
+VOID EmulatorSimulate(VOID)
+{
+ UNIMPLEMENTED;
+}
+
+VOID EmulatorUnsimulate(VOID)
+{
+ UNIMPLEMENTED;
+}
+
VOID EmulatorInterrupt(BYTE Number)
{
/* Call the Fast486 API */
@@ -340,21 +197,211 @@
Fast486InterruptSignal(&EmulatorContext);
}
-VOID EmulatorStep(VOID)
-{
- /* Dump the state for debugging purposes */
- // Fast486DumpState(&EmulatorContext);
-
- /* Execute the next instruction */
- Fast486StepInto(&EmulatorContext);
-}
-
VOID EmulatorSetA20(BOOLEAN Enabled)
{
A20Line = Enabled;
}
-
+VOID WINAPI EmulatorDebugBreakBop(LPWORD Stack)
+{
+ DPRINT1("NTVDM: BOP_DEBUGGER\n");
+ DebugBreak();
+}
+
+VOID WINAPI EmulatorUnsimulateBop(LPWORD Stack)
+{
+ EmulatorUnsimulate();
+}
+
+static BYTE WINAPI Port61hRead(ULONG Port)
+{
+ return Port61hState;
+}
+
+static VOID WINAPI Port61hWrite(ULONG Port, BYTE Data)
+{
+ // BOOLEAN SpeakerChange = FALSE;
+ BYTE OldPort61hState = Port61hState;
+
+ /* Only the four lowest bytes can be written */
+ Port61hState = (Port61hState & 0xF0) | (Data & 0x0F);
+
+ if ((OldPort61hState ^ Port61hState) & 0x01)
+ {
+ DPRINT("PIT 2 Gate %s\n", Port61hState & 0x01 ? "on" :
"off");
+ // SpeakerChange = TRUE;
+ }
+
+ PitSetGate(2, !!(Port61hState & 0x01));
+
+ if ((OldPort61hState ^ Port61hState) & 0x02)
+ {
+ /* There were some change for the speaker... */
+ DPRINT("Speaker %s\n", Port61hState & 0x02 ? "on" :
"off");
+ // SpeakerChange = TRUE;
+ }
+ // if (SpeakerChange) SpeakerChange();
+ SpeakerChange();
+}
+
+static VOID WINAPI PitChan0Out(LPVOID Param, BOOLEAN State)
+{
+ if (State)
+ {
+ DPRINT("PicInterruptRequest\n");
+ PicInterruptRequest(0); // Raise IRQ 0
+ }
+ // else < Lower IRQ 0 >
+}
+
+static VOID WINAPI PitChan1Out(LPVOID Param, BOOLEAN State)
+{
+#if 0
+ if (State)
+ {
+ /* Set bit 4 of Port 61h */
+ Port61hState |= 1 << 4;
+ }
+ else
+ {
+ /* Clear bit 4 of Port 61h */
+ Port61hState &= ~(1 << 4);
+ }
+#else
+ Port61hState = (Port61hState & 0xEF) | (State << 4);
+#endif
+}
+
+static VOID WINAPI PitChan2Out(LPVOID Param, BOOLEAN State)
+{
+ // BYTE OldPort61hState = Port61hState;
+
+#if 0
+ if (State)
+ {
+ /* Set bit 5 of Port 61h */
+ Port61hState |= 1 << 5;
+ }
+ else
+ {
+ /* Clear bit 5 of Port 61h */
+ Port61hState &= ~(1 << 5);
+ }
+#else
+ Port61hState = (Port61hState & 0xDF) | (State << 5);
+#endif
+ DPRINT("Speaker PIT out\n");
+ // if ((OldPort61hState ^ Port61hState) & 0x20)
+ // SpeakerChange();
+}
+
+/* PUBLIC FUNCTIONS ***********************************************************/
+
+DWORD WINAPI PumpConsoleInput(LPVOID Parameter);
+
+BOOLEAN EmulatorInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput)
+{
+ /* Allocate memory for the 16-bit address space */
+ BaseAddress = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, MAX_ADDRESS);
+ if (BaseAddress == NULL)
+ {
+ wprintf(L"FATAL: Failed to allocate VDM memory.\n");
+ return FALSE;
+ }
+
+ /* Initialize I/O ports */
+ /* Initialize RAM */
+
+ /* Initialize the internal clock */
+ if (!ClockInitialize())
+ {
+ wprintf(L"FATAL: Failed to initialize the clock\n");
+ return FALSE;
+ }
+
+ /* Initialize the CPU */
+ Fast486Initialize(&EmulatorContext,
+ EmulatorReadMemory,
+ EmulatorWriteMemory,
+ EmulatorReadIo,
+ EmulatorWriteIo,
+ NULL,
+ EmulatorBiosOperation,
+ EmulatorIntAcknowledge,
+ NULL /* TODO: Use a TLB */);
+
+ /* Enable interrupts */
+ setIF(1);
+
+ /* Initialize DMA */
+
+ /* Initialize the PIC, the PIT, the CMOS and the PC Speaker */
+ PicInitialize();
+ PitInitialize();
+ CmosInitialize();
+ SpeakerInitialize();
+
+ /* Set output functions */
+ PitSetOutFunction(0, NULL, PitChan0Out);
+ PitSetOutFunction(1, NULL, PitChan1Out);
+ PitSetOutFunction(2, NULL, PitChan2Out);
+
+ /* Register the I/O Ports */
+ RegisterIoPort(CONTROL_SYSTEM_PORT61H, Port61hRead, Port61hWrite);
+
+ /* Initialize the PS2 port */
+ PS2Initialize(ConsoleInput);
+
+ /* Set the console input mode */
+ // SetConsoleMode(ConsoleInput, ENABLE_MOUSE_INPUT | ENABLE_PROCESSED_INPUT);
+
+ /* Start the input thread */
+ InputThread = CreateThread(NULL, 0, &PumpConsoleInput, ConsoleInput, 0, NULL);
+ // if (InputThread == NULL) return FALSE;
+
+ /* Initialize the VGA */
+ // if (!VgaInitialize(ConsoleOutput)) return FALSE;
+ VgaInitialize(ConsoleOutput);
+
+ /* Register the emulator BOPs */
+ RegisterBop(BOP_DEBUGGER , EmulatorDebugBreakBop);
+ RegisterBop(BOP_UNSIMULATE, EmulatorUnsimulateBop);
+
+ /* Initialize VDD support */
+ VDDSupInitialize();
+
+ return TRUE;
+}
+
+VOID EmulatorCleanup(VOID)
+{
+ // VgaCleanup();
+
+ /* Close the input thread handle */
+ if (InputThread != NULL) CloseHandle(InputThread);
+ InputThread = NULL;
+
+ PS2Cleanup();
+
+ SpeakerCleanup();
+ CmosCleanup();
+ // PitCleanup();
+ // PicCleanup();
+
+ // Fast486Cleanup();
+
+ /* Free the memory allocated for the 16-bit address space */
+ if (BaseAddress != NULL) HeapFree(GetProcessHeap(), 0, BaseAddress);
+}
+
+
+
+VOID
+WINAPI
+VDDSimulate16(VOID)
+{
+ EmulatorSimulate();
+}
VOID
WINAPI
Modified: branches/ntvdm/subsystems/ntvdm/hardware/ps2.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/hardware/ps2.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/hardware/ps2.c [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -25,7 +25,6 @@
static BOOLEAN KeyboardReadResponse = FALSE, KeyboardWriteResponse = FALSE;
static BYTE KeyboardConfig = PS2_DEFAULT_CONFIG;
static HANDLE QueueMutex = NULL;
-static HANDLE InputThread = NULL;
/* PRIVATE FUNCTIONS **********************************************************/
@@ -281,82 +280,53 @@
}
}
-static DWORD WINAPI InputThreadProc(LPVOID Parameter)
-{
- INT i;
- HANDLE ConsoleInput = (HANDLE)Parameter;
- INPUT_RECORD InputRecord;
- DWORD Count;
-
- while (VdmRunning)
- {
- /* Wait for an input record */
- if (!ReadConsoleInput(ConsoleInput, &InputRecord, 1, &Count))
- {
- DWORD LastError = GetLastError();
- DPRINT1("Error reading console input (0x%p, %lu) - Error %lu\n",
ConsoleInput, Count, LastError);
- return LastError;
- }
-
- ASSERT(Count != 0);
-
- /* Check the event type */
- switch (InputRecord.EventType)
- {
- case KEY_EVENT:
- {
- BYTE ScanCode = (BYTE)InputRecord.Event.KeyEvent.wVirtualScanCode;
-
- /* If this is a key release, set the highest bit in the scan code */
- if (!InputRecord.Event.KeyEvent.bKeyDown) ScanCode |= 0x80;
-
- /* Push the scan code onto the keyboard queue */
- for (i = 0; i < InputRecord.Event.KeyEvent.wRepeatCount; i++)
- {
- KeyboardQueuePush(ScanCode);
- }
-
- break;
- }
-
- case MOUSE_EVENT:
- {
- // TODO: NOT IMPLEMENTED
- UNIMPLEMENTED;
- break;
- }
-
- default:
- {
- /* Ignored */
- break;
- }
- }
- }
-
- return 0;
-}
-
/* PUBLIC FUNCTIONS ***********************************************************/
+VOID PS2Dispatch(PINPUT_RECORD InputRecord)
+{
+ /* Check the event type */
+ switch (InputRecord->EventType)
+ {
+ case KEY_EVENT:
+ {
+ WORD i;
+ BYTE ScanCode = (BYTE)InputRecord->Event.KeyEvent.wVirtualScanCode;
+
+ /* If this is a key release, set the highest bit in the scan code */
+ if (!InputRecord->Event.KeyEvent.bKeyDown) ScanCode |= 0x80;
+
+ /* Push the scan code onto the keyboard queue */
+ for (i = 0; i < InputRecord->Event.KeyEvent.wRepeatCount; i++)
+ {
+ KeyboardQueuePush(ScanCode);
+ }
+
+ break;
+ }
+
+ case MOUSE_EVENT:
+ {
+ // TODO: NOT IMPLEMENTED
+ UNIMPLEMENTED;
+ break;
+ }
+
+ /* We ignore all the rest */
+ default:
+ break;
+ }
+}
+
VOID GenerateKeyboardInterrupts(VOID)
{
- if (KeyboardQueuePop(&KeyboardData))
- {
- /* IRQ 1 */
- PicInterruptRequest(1);
- }
+ /* Generate an IRQ 1 if there is a key ready in the queue */
+ if (KeyboardQueuePop(&KeyboardData)) PicInterruptRequest(1);
}
BOOLEAN PS2Initialize(HANDLE ConsoleInput)
{
/* Create the mutex */
QueueMutex = CreateMutex(NULL, FALSE, NULL);
-
- /* Start the input thread */
- InputThread = CreateThread(NULL, 0, &InputThreadProc, ConsoleInput, 0, NULL);
-
- // if (InputThread == NULL) return FALSE;
/* Register the I/O Ports */
RegisterIoPort(PS2_CONTROL_PORT, PS2ReadPort, PS2WritePort);
@@ -367,10 +337,6 @@
VOID PS2Cleanup(VOID)
{
- /* Close the input thread handle */
- if (InputThread != NULL) CloseHandle(InputThread);
- InputThread = NULL;
-
CloseHandle(QueueMutex);
}
Modified: branches/ntvdm/subsystems/ntvdm/hardware/ps2.h
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/hardware/ps2.h [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/hardware/ps2.h [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -24,6 +24,7 @@
/* FUNCTIONS ******************************************************************/
+VOID PS2Dispatch(PINPUT_RECORD InputRecord);
VOID GenerateKeyboardInterrupts(VOID);
BOOLEAN PS2Initialize(HANDLE ConsoleInput);
Added: branches/ntvdm/subsystems/ntvdm/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/lang/en-…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/lang/en-US.rc (added)
+++ branches/ntvdm/subsystems/ntvdm/lang/en-US.rc [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -0,0 +1,13 @@
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+STRINGTABLE
+BEGIN
+ IDS_HIDE_MOUSE, "&Hide Mouse Pointer"
+ IDS_SHOW_MOUSE, "&Display Mouse Pointer"
+ IDS_VDM_MENU , "ReactOS &VDM"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_VDM_QUIT, "&Quit the ReactOS VDM"
+END
Propchange: branches/ntvdm/subsystems/ntvdm/lang/en-US.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: branches/ntvdm/subsystems/ntvdm/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/lang/fr-…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/lang/fr-FR.rc (added)
+++ branches/ntvdm/subsystems/ntvdm/lang/fr-FR.rc [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -0,0 +1,13 @@
+LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
+
+STRINGTABLE
+BEGIN
+ IDS_HIDE_MOUSE, "Mas&quer le pointeur de la souris"
+ IDS_SHOW_MOUSE, "&Afficher le pointeur de la souris"
+ IDS_VDM_MENU , "ReactOS &VDM"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_VDM_QUIT, "&Quitter la ReactOS VDM"
+END
Propchange: branches/ntvdm/subsystems/ntvdm/lang/fr-FR.rc
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.c?…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -13,12 +13,13 @@
#include "ntvdm.h"
#include "emulator.h"
+#include "clock.h"
+#include "hardware/ps2.h"
+#include "hardware/vga.h"
#include "bios/bios.h"
#include "dos/dem.h"
-#include "hardware/cmos.h"
-#include "hardware/ps2.h"
-#include "hardware/timer.h"
-#include "hardware/vga.h"
+
+#include "resource.h"
/*
* Activate this line if you want to be able to test NTVDM with:
@@ -26,19 +27,7 @@
*/
#define TESTING
-/*
- * Activate IPS_DISPLAY if you want to display the
- * number of instructions per second, as well as
- * the computed number of ticks for the PIT.
- */
-// #define IPS_DISPLAY
-
-/*
- * Activate WORKING_TIMER when the PIT timing problem is fixed.
- */
-// #define WORKING_TIMER
-
-/* PUBLIC VARIABLES ***********************************************************/
+/* VARIABLES ******************************************************************/
static HANDLE ConsoleInput = INVALID_HANDLE_VALUE;
static HANDLE ConsoleOutput = INVALID_HANDLE_VALUE;
@@ -46,6 +35,134 @@
static CONSOLE_CURSOR_INFO OrgConsoleCursorInfo;
static CONSOLE_SCREEN_BUFFER_INFO OrgConsoleBufferInfo;
+static HMENU hConsoleMenu = NULL;
+static INT VdmMenuPos = -1;
+static BOOLEAN ShowPointer = FALSE;
+
+/*
+ * Those menu helpers were taken from the GUI frontend in winsrv.dll
+ */
+typedef struct _VDM_MENUITEM
+{
+ UINT uID;
+ const struct _VDM_MENUITEM *SubMenu;
+ WORD wCmdID;
+} VDM_MENUITEM, *PVDM_MENUITEM;
+
+static const VDM_MENUITEM VdmMenuItems[] =
+{
+ { IDS_VDM_QUIT, NULL, ID_VDM_QUIT },
+
+ { 0, NULL, 0 } /* End of list */
+};
+
+static const VDM_MENUITEM VdmMainMenuItems[] =
+{
+ { -1, NULL, 0 }, /* Separator */
+ { IDS_HIDE_MOUSE, NULL, ID_SHOWHIDE_MOUSE }, /* Hide mouse; can be renamed to Show
mouse */
+ { IDS_VDM_MENU , VdmMenuItems, 0 }, /* ReactOS VDM Menu */
+
+ { 0, NULL, 0 } /* End of list */
+};
+
+static VOID
+AppendMenuItems(HMENU hMenu,
+ const VDM_MENUITEM *Items)
+{
+ UINT i = 0;
+ WCHAR szMenuString[255];
+ HMENU hSubMenu;
+
+ do
+ {
+ if (Items[i].uID != (UINT)-1)
+ {
+ if (LoadStringW(GetModuleHandle(NULL),
+ Items[i].uID,
+ szMenuString,
+ sizeof(szMenuString) / sizeof(szMenuString[0])) > 0)
+ {
+ if (Items[i].SubMenu != NULL)
+ {
+ hSubMenu = CreatePopupMenu();
+ if (hSubMenu != NULL)
+ {
+ AppendMenuItems(hSubMenu, Items[i].SubMenu);
+
+ if (!AppendMenuW(hMenu,
+ MF_STRING | MF_POPUP,
+ (UINT_PTR)hSubMenu,
+ szMenuString))
+ {
+ DestroyMenu(hSubMenu);
+ }
+ }
+ }
+ else
+ {
+ AppendMenuW(hMenu,
+ MF_STRING,
+ Items[i].wCmdID,
+ szMenuString);
+ }
+ }
+ }
+ else
+ {
+ AppendMenuW(hMenu,
+ MF_SEPARATOR,
+ 0,
+ NULL);
+ }
+ i++;
+ } while (!(Items[i].uID == 0 && Items[i].SubMenu == NULL &&
Items[i].wCmdID == 0));
+}
+
+static VOID
+CreateVdmMenu(HANDLE ConOutHandle)
+{
+ hConsoleMenu = ConsoleMenuControl(ConsoleOutput,
+ ID_SHOWHIDE_MOUSE,
+ ID_VDM_QUIT);
+ if (hConsoleMenu != NULL)
+ {
+ VdmMenuPos = GetMenuItemCount(hConsoleMenu);
+ AppendMenuItems(hConsoleMenu, VdmMainMenuItems);
+ DrawMenuBar(GetConsoleWindow());
+ }
+}
+
+static VOID
+DestroyVdmMenu(VOID)
+{
+ UINT i = 0;
+ const VDM_MENUITEM *Items = VdmMainMenuItems;
+
+ do
+ {
+ DeleteMenu(hConsoleMenu, VdmMenuPos, MF_BYPOSITION);
+ i++;
+ } while (!(Items[i].uID == 0 && Items[i].SubMenu == NULL &&
Items[i].wCmdID == 0));
+
+ DrawMenuBar(GetConsoleWindow());
+}
+
+static VOID ShowHideMousePointer(HANDLE ConOutHandle, BOOLEAN ShowPtr)
+{
+ WCHAR szMenuString[255] = L"";
+
+ ShowConsoleCursor(ConOutHandle, ShowPtr);
+
+ if (LoadStringW(GetModuleHandle(NULL),
+ (!ShowPtr ? IDS_SHOW_MOUSE : IDS_HIDE_MOUSE),
+ szMenuString,
+ sizeof(szMenuString) / sizeof(szMenuString[0])) > 0)
+ {
+ ModifyMenu(hConsoleMenu, ID_SHOWHIDE_MOUSE,
+ MF_BYCOMMAND, ID_SHOWHIDE_MOUSE, szMenuString);
+ }
+}
+
/* PUBLIC FUNCTIONS ***********************************************************/
VOID DisplayMessage(LPCWSTR Format, ...)
@@ -78,6 +195,74 @@
}
}
return TRUE;
+}
+
+VOID ConsoleInitUI(VOID)
+{
+ CreateVdmMenu(ConsoleOutput);
+}
+
+VOID ConsoleCleanupUI(VOID)
+{
+ /* Display again properly the mouse pointer */
+ if (ShowPointer) ShowHideMousePointer(ConsoleOutput, ShowPointer);
+
+ DestroyVdmMenu();
+}
+
+DWORD WINAPI PumpConsoleInput(LPVOID Parameter)
+{
+ HANDLE ConsoleInput = (HANDLE)Parameter;
+ INPUT_RECORD InputRecord;
+ DWORD Count;
+
+ while (VdmRunning)
+ {
+ /* Wait for an input record */
+ if (!ReadConsoleInput(ConsoleInput, &InputRecord, 1, &Count))
+ {
+ DWORD LastError = GetLastError();
+ DPRINT1("Error reading console input (0x%p, %lu) - Error %lu\n",
ConsoleInput, Count, LastError);
+ return LastError;
+ }
+
+ ASSERT(Count != 0);
+
+ /* Check the event type */
+ switch (InputRecord.EventType)
+ {
+ case KEY_EVENT:
+ case MOUSE_EVENT:
+ /* Send it to the PS/2 controller */
+ PS2Dispatch(&InputRecord);
+ break;
+
+ case MENU_EVENT:
+ {
+ switch (InputRecord.Event.MenuEvent.dwCommandId)
+ {
+ case ID_SHOWHIDE_MOUSE:
+ ShowHideMousePointer(ConsoleOutput, ShowPointer);
+ ShowPointer = !ShowPointer;
+ break;
+
+ case ID_VDM_QUIT:
+ VdmRunning = FALSE;
+ break;
+
+ default:
+ break;
+ }
+
+ break;
+ }
+
+ default:
+ break;
+ }
+ }
+
+ return 0;
}
BOOL ConsoleInit(VOID)
@@ -133,6 +318,9 @@
wprintf(L"FATAL: Cannot save console cursor/screen-buffer info\n");
return FALSE;
}
+
+ /* Initialize the UI */
+ ConsoleInitUI();
return TRUE;
}
@@ -166,6 +354,9 @@
SetConsoleMode(ConsoleOutput, OrgConsoleOutputMode);
SetConsoleMode(ConsoleInput , OrgConsoleInputMode );
+ /* Cleanup the UI */
+ ConsoleCleanupUI();
+
/* Close the console handles */
if (ConsoleOutput != INVALID_HANDLE_VALUE) CloseHandle(ConsoleOutput);
if (ConsoleInput != INVALID_HANDLE_VALUE) CloseHandle(ConsoleInput);
@@ -173,19 +364,7 @@
INT wmain(INT argc, WCHAR *argv[])
{
- INT i;
CHAR CommandLine[DOS_CMDLINE_LENGTH];
- LARGE_INTEGER StartPerfCount;
- LARGE_INTEGER Frequency, LastTimerTick, LastRtcTick, Counter;
- LONGLONG TimerTicks;
- DWORD StartTickCount, CurrentTickCount;
- DWORD LastClockUpdate;
- DWORD LastVerticalRefresh;
-#ifdef IPS_DISPLAY
- DWORD LastCyclePrintout;
- DWORD Cycles = 0;
-#endif
- INT KeyboardIntCounter = 0;
#ifndef TESTING
UNREFERENCED_PARAMETER(argc);
@@ -222,13 +401,6 @@
goto Cleanup;
}
- /* Initialize the performance counter (needed for hardware timers) */
- if (!QueryPerformanceFrequency(&Frequency))
- {
- wprintf(L"FATAL: Performance counter not available\n");
- goto Cleanup;
- }
-
/* Initialize the system BIOS */
if (!BiosInitialize(ConsoleInput, ConsoleOutput))
{
@@ -250,107 +422,8 @@
goto Cleanup;
}
- /* Find the starting performance and tick count */
- StartTickCount = GetTickCount();
- QueryPerformanceCounter(&StartPerfCount);
-
- /* Set the different last counts to the starting count */
- LastClockUpdate = LastVerticalRefresh =
-#ifdef IPS_DISPLAY
- LastCyclePrintout =
-#endif
- StartTickCount;
-
- /* Set the last timer ticks to the current time */
- LastTimerTick = LastRtcTick = StartPerfCount;
-
/* Main loop */
- while (VdmRunning)
- {
-#ifdef WORKING_TIMER
- DWORD PitResolution = PitGetResolution();
-#endif
- DWORD RtcFrequency = RtcGetTicksPerSecond();
-
- /* Get the current number of ticks */
- CurrentTickCount = GetTickCount();
-
-#ifdef WORKING_TIMER
- if ((PitResolution <= 1000) && (RtcFrequency <= 1000))
- {
- /* Calculate the approximate performance counter value instead */
- Counter.QuadPart = StartPerfCount.QuadPart
- + (CurrentTickCount - StartTickCount)
- * (Frequency.QuadPart / 1000);
- }
- else
-#endif
- {
- /* Get the current performance counter value */
- QueryPerformanceCounter(&Counter);
- }
-
- /* Get the number of PIT ticks that have passed */
- TimerTicks = ((Counter.QuadPart - LastTimerTick.QuadPart)
- * PIT_BASE_FREQUENCY) / Frequency.QuadPart;
-
- /* Update the PIT */
- if (TimerTicks > 0)
- {
- PitClock(TimerTicks);
- LastTimerTick = Counter;
- }
-
- /* Check for RTC update */
- if ((CurrentTickCount - LastClockUpdate) >= 1000)
- {
- RtcTimeUpdate();
- LastClockUpdate = CurrentTickCount;
- }
-
- /* Check for RTC periodic tick */
- if ((Counter.QuadPart - LastRtcTick.QuadPart)
- >= (Frequency.QuadPart / (LONGLONG)RtcFrequency))
- {
- RtcPeriodicTick();
- LastRtcTick = Counter;
- }
-
- /* Check for vertical retrace */
- if ((CurrentTickCount - LastVerticalRefresh) >= 15)
- {
- VgaRefreshDisplay();
- LastVerticalRefresh = CurrentTickCount;
- }
-
- KeyboardIntCounter++;
- if (KeyboardIntCounter == KBD_INT_CYCLES)
- {
- GenerateKeyboardInterrupts();
- KeyboardIntCounter = 0;
- }
-
- /* Horizontal retrace occurs as fast as possible */
- VgaHorizontalRetrace();
-
- /* Continue CPU emulation */
- for (i = 0; (i < STEPS_PER_CYCLE) && VdmRunning; i++)
- {
- EmulatorStep();
-#ifdef IPS_DISPLAY
- Cycles++;
-#endif
- }
-
-#ifdef IPS_DISPLAY
- if ((CurrentTickCount - LastCyclePrintout) >= 1000)
- {
- DPRINT1("NTVDM: %lu Instructions Per Second; TimerTicks = %I64d\n",
Cycles, TimerTicks);
- LastCyclePrintout = CurrentTickCount;
- Cycles = 0;
- }
-#endif
- }
+ while (VdmRunning) ClockUpdate();
/* Perform another screen refresh */
VgaRefreshDisplay();
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.h
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.h?…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -25,15 +25,10 @@
#include <winuser.h>
#include <vddsvc.h>
-// #include "registers.h"
#include <debug.h>
/* DEFINES ********************************************************************/
-
-/* Processor speed */
-#define STEPS_PER_CYCLE 256
-#define KBD_INT_CYCLES 16
/* FUNCTIONS ******************************************************************/
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.rc
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.rc…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/ntvdm.rc [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/ntvdm.rc [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -1,5 +1,6 @@
#include <windef.h>
#include <winuser.h>
+// #include <commctrl.h>
#include "resource.h"
@@ -14,3 +15,10 @@
/* UTF-8 */
#pragma code_page(65001)
+
+#ifdef LANGUAGE_EN_US
+ #include "lang/en-US.rc"
+#endif
+#ifdef LANGUAGE_FR_FR
+ #include "lang/fr-FR.rc"
+#endif
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.spec
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.sp…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/ntvdm.spec [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/ntvdm.spec [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -1,3 +1,7 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; NTVDM Registers exports ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
@ stdcall getAF()
@ stdcall getAH()
@ stdcall getAL()
@@ -89,6 +93,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; NTVDM CCPU MIPS exports ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
@ stdcall c_getAF() getAF
@ stdcall c_getAH() getAH
@ stdcall c_getAL() getAL
@@ -174,6 +179,9 @@
@ stdcall c_setZF(long) setZF
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; NTVDM DOS-32 Emulation exports ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ stdcall demClientErrorEx(long long long)
@ stdcall demFileDelete(ptr)
@@ -192,6 +200,9 @@
;@ stdcall demWOWLFNInit
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; NTVDM Miscellaneous exports ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ stdcall MGetVdmPointer(long long long)
@ stdcall Sim32pGetVDMPointer(long long)
@@ -204,4 +215,6 @@
@ stdcall VDDInstallIOHook(long long ptr ptr)
@ stdcall VDDDeInstallIOHook(long long ptr)
+@ stdcall VDDSimulate16()
+@ stdcall host_simulate() VDDSimulate16
@ stdcall VDDTerminateVDM()
Modified: branches/ntvdm/subsystems/ntvdm/resource.h
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/resource…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/resource.h [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/resource.h [iso-8859-1] Sat Feb 1 16:32:20 2014
@@ -1,4 +1,13 @@
#pragma once
+
+#define ID_SHOWHIDE_MOUSE 1000
+#define ID_VDM_QUIT 1001
+
+#define IDS_HIDE_MOUSE 100
+#define IDS_SHOW_MOUSE 101
+#define IDS_VDM_MENU 102
+
+#define IDS_VDM_QUIT 200
#define IDI_APPICON 1