6502X: When !RDY is asserted, still do other operations. Plus, do dummy reads on stack ops

This commit is contained in:
SaxxonPike 2019-07-09 05:24:47 -05:00
parent 6ed11de85b
commit 3efea15038
1 changed files with 27 additions and 24 deletions

View File

@ -927,9 +927,6 @@ namespace BizHawk.Emulation.Cores.Components.M6502
}
void IndIdx_READ_Stage5()
{
rdy_freeze = !RDY;
if (RDY)
{
if (!alu_temp.Bit(8))
{
@ -939,8 +936,11 @@ namespace BizHawk.Emulation.Cores.Components.M6502
}
else
{
_link.ReadMemory((ushort)ea);
ea = (ushort)(ea + 0x100);
rdy_freeze = !RDY;
if (RDY)
{
_link.ReadMemory((ushort) ea);
ea = (ushort) (ea + 0x100);
}
}
}
@ -1196,13 +1196,17 @@ namespace BizHawk.Emulation.Cores.Components.M6502
void NOP()
{
rdy_freeze = !RDY;
if (RDY)
{
FetchDummy();
}
}
void DecS()
{
rdy_freeze = !RDY;
if (RDY)
{
S--;
_link.DummyReadMemory((ushort) (0x100 | --S));
}
}
void IncS()
@ -1210,7 +1214,7 @@ namespace BizHawk.Emulation.Cores.Components.M6502
rdy_freeze = !RDY;
if (RDY)
{
S++;
_link.DummyReadMemory((ushort) (0x100 | S++));
}
}
void JSR()
@ -2255,20 +2259,19 @@ namespace BizHawk.Emulation.Cores.Components.M6502
}
void AbsIdx_READ_Stage4()
{
rdy_freeze = !RDY;
if (RDY)
{
if (!alu_temp.Bit(8))
{
mi++;
ExecuteOneRetry();
return;
}
else
{
alu_temp = _link.ReadMemory((ushort)ea);
ea = (ushort)(ea + 0x100);
rdy_freeze = !RDY;
if (RDY)
{
alu_temp = _link.ReadMemory((ushort) ea);
ea = (ushort) (ea + 0x100);
}
}