Merge pull request #640 from alyosha-tas/master

Fixed high pitch bug
This commit is contained in:
alyosha-tas 2016-06-05 17:40:13 -04:00
commit dc5ec20a39
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> /// <returns>16 bit audio sample</returns>
public short Cycle() public short Cycle()
{ {
if (++freqcnt == AUDF) if (++freqcnt >= AUDF)
{ {
freqcnt = 0; freqcnt = 0;
switch (AUDC) switch (AUDC)
@ -119,6 +119,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
if ((sr5 & 0x0f) == 0 || (sr5 & 0x0f) == 0x0f) if ((sr5 & 0x0f) == 0 || (sr5 & 0x0f) == 0x0f)
{ {
on = Run4(); on = Run4();
Run5();
break; break;
} }