mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[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). svn path=/trunk/; revision=64344
This commit is contained in:
parent
22a86674c9
commit
c1441679a5
1 changed files with 2 additions and 1 deletions
|
@ -79,6 +79,7 @@ static VOID PitSetOut(PPIT_CHANNEL Channel, BOOLEAN State)
|
|||
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 @@ static VOID PitDecrementCount(PPIT_CHANNEL Channel, DWORD Count)
|
|||
if (ReloadCount & 1)
|
||||
{
|
||||
Channel->FlipFlop = !Channel->FlipFlop;
|
||||
// PitSetOut(Channel, !Channel->Out);
|
||||
PitSetOut(Channel, !Channel->Out);
|
||||
}
|
||||
|
||||
/* Was there any rising edge? */
|
||||
|
|
Loading…
Reference in a new issue