Author: hbelusca
Date: Sat Sep 27 15:31:12 2014
New Revision: 64344
URL: http://svn.reactos.org/svn/reactos?rev=64344&view=rev
Log:
[NTVDM]: Timer
- Add a hack for the signal out so that, when the PIT gate is off, no callback is called. This should be improved so that also no Out state is set, and other things too.
- Really set the out signal when the flipflop changes, in square-wave mode. Contributes to fix the speaker (see next commit).
Modified:
trunk/reactos/subsystems/ntvdm/hardware/timer.c
Modified: trunk/reactos/subsystems/ntvdm/hardware/timer.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/hardware/…
==============================================================================
--- trunk/reactos/subsystems/ntvdm/hardware/timer.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/ntvdm/hardware/timer.c [iso-8859-1] Sat Sep 27 15:31:12 2014
@@ -79,6 +79,7 @@
Channel->Out = State;
/* Call the callback */
+ if (!Channel->Gate) return; // HACK: This is a HACK until gates are properly used (needed for the speaker to work properly).
if (Channel->OutFunction) Channel->OutFunction(Channel->OutParam, State);
}
@@ -423,7 +424,7 @@
if (ReloadCount & 1)
{
Channel->FlipFlop = !Channel->FlipFlop;
- // PitSetOut(Channel, !Channel->Out);
+ PitSetOut(Channel, !Channel->Out);
}
/* Was there any rising edge? */