mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-01-26 12:16:36 +00:00
Add a couple of debug assertions
This commit is contained in:
26
Z80/Z80.cs
26
Z80/Z80.cs
@@ -509,18 +509,18 @@ namespace Z80
|
||||
protected override byte MemoryRead()
|
||||
{
|
||||
this.OnReadingMemory();
|
||||
this.Tick();
|
||||
this.LowerMREQ();
|
||||
this.LowerRD();
|
||||
this.Tick();
|
||||
_ = base.MemoryRead();
|
||||
this.RaiseRD();
|
||||
this.RaiseMREQ();
|
||||
if (this.M1.Lowered())
|
||||
{
|
||||
this.RefreshMemory();
|
||||
}
|
||||
this.Tick();
|
||||
this.Tick();
|
||||
this.LowerMREQ();
|
||||
this.LowerRD();
|
||||
this.Tick();
|
||||
_ = base.MemoryRead();
|
||||
this.RaiseRD();
|
||||
this.RaiseMREQ();
|
||||
if (this.M1.Lowered())
|
||||
{
|
||||
this.RefreshMemory();
|
||||
}
|
||||
this.Tick();
|
||||
this.OnReadMemory();
|
||||
return this.Bus.Data;
|
||||
}
|
||||
@@ -582,7 +582,9 @@ namespace Z80
|
||||
this.Tick();
|
||||
this.PushWord(this.PC);
|
||||
this.Bus.Address.Assign((byte)(data & ~1), this.IV);
|
||||
Debug.Assert(this.Bus.Address.Low % 2 == 0);
|
||||
this.PC.Assign(this.GetWord());
|
||||
Debug.Assert(this.Bus.Address.Low % 2 == 1);
|
||||
Debug.Assert(this.Cycles == 19);
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user