Fixes 6532 INSTAT

Fixes Tapper not running (other issues with that game remain)
This commit is contained in:
alyosha-tas 2016-05-06 22:58:41 -04:00
parent b8e5177d00
commit 70fdbba229
1 changed files with 8 additions and 7 deletions

View File

@ -74,13 +74,14 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
return Timer.Value;
}
// TODO: fix this to match real behaviour
// This is an undocumented instruction whose behaviour is more dynamic then indicated here
if ((registerAddr & 0x5) == 0x5)
{
// Read interrupt flag
if (Timer.InterruptEnabled && Timer.InterruptFlag)
if (Timer.InterruptFlag) //Timer.InterruptEnabled && )
{
return 0x80;
return 0xC0;
}
return 0x00;
@ -112,7 +113,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
// Write to Timer/1
Timer.PrescalerShift = 0;
Timer.Value = value;
Timer.PrescalerCount = 0;
Timer.PrescalerCount = 0;// 1 << Timer.PrescalerShift;
Timer.InterruptFlag = false;
}
else if (registerAddr == 0x05)
@ -120,7 +121,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
// Write to Timer/8
Timer.PrescalerShift = 3;
Timer.Value = value;
Timer.PrescalerCount = 0;
Timer.PrescalerCount = 0;// 1 << Timer.PrescalerShift;
Timer.InterruptFlag = false;
}
else if (registerAddr == 0x06)
@ -128,7 +129,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
// Write to Timer/64
Timer.PrescalerShift = 6;
Timer.Value = value;
Timer.PrescalerCount = 0;
Timer.PrescalerCount = 0;// 1 << Timer.PrescalerShift;
Timer.InterruptFlag = false;
}
else if (registerAddr == 0x07)
@ -136,7 +137,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
// Write to Timer/1024
Timer.PrescalerShift = 10;
Timer.Value = value;
Timer.PrescalerCount = 0;
Timer.PrescalerCount = 0;// 1 << Timer.PrescalerShift;
Timer.InterruptFlag = false;
}
}