Fixed high pitch bug

finally found this bug, fixes several games where sounds were higher pitch then supposed to be (notably Combat)
This commit is contained in:
alyosha-tas 2016-06-05 17:38:33 -04:00
parent ae39f13d5a
commit 41fd36a3c3
1 changed files with 2 additions and 1 deletions

View File

@ -97,7 +97,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
/// <returns>16 bit audio sample</returns>
public short Cycle()
{
if (++freqcnt == AUDF)
if (++freqcnt >= AUDF)
{
freqcnt = 0;
switch (AUDC)
@ -119,6 +119,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
if ((sr5 & 0x0f) == 0 || (sr5 & 0x0f) == 0x0f)
{
on = Run4();
Run5();
break;
}