mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-04-19 15:16:41 +00:00
Fix a number of write timing issues
This commit is contained in:
+10
-3
@@ -480,16 +480,21 @@ namespace Z80
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void MemoryWrite()
|
||||
protected void MemoryUpdate(int ticks)
|
||||
{
|
||||
this.LowerMREQ();
|
||||
this.LowerWR();
|
||||
this.Tick(3);
|
||||
this.Tick(ticks);
|
||||
base.MemoryWrite();
|
||||
this.RaiseWR();
|
||||
this.RaiseMREQ();
|
||||
}
|
||||
|
||||
protected override void MemoryWrite()
|
||||
{
|
||||
this.MemoryUpdate(3);
|
||||
}
|
||||
|
||||
protected override byte MemoryRead()
|
||||
{
|
||||
this.Tick();
|
||||
@@ -760,6 +765,7 @@ namespace Z80
|
||||
{
|
||||
_ = this.MemoryRead();
|
||||
}
|
||||
this.Tick();
|
||||
// Will need a post-MemoryWrite
|
||||
return ref this.Bus.Data;
|
||||
case 7:
|
||||
@@ -774,7 +780,8 @@ namespace Z80
|
||||
this.R(r, AccessLevel.WriteOnly) = value;
|
||||
if (r == 6)
|
||||
{
|
||||
this.MemoryWrite();
|
||||
this.MemoryUpdate(1);
|
||||
this.Tick();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user