Work towards accurate bus/memory/io timings. Especially Z80 m-cycle timing.

Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2020-07-05 00:09:51 +01:00
parent cd4af67177
commit 47ecdad3e8
11 changed files with 264 additions and 250 deletions

View File

@@ -35,16 +35,16 @@ namespace EightBit
protected override Register16 GetWord()
{
this.intermediate.Low = this.BusRead();
this.intermediate.Low = this.MemoryRead();
++this.Bus.Address.Word;
this.intermediate.High = this.BusRead();
this.intermediate.High = this.MemoryRead();
return this.intermediate;
}
protected override Register16 GetWordPaged(byte page, byte offset)
{
this.intermediate.Low = this.BusRead(offset, page);
this.intermediate.High = this.BusRead(++offset, page);
this.intermediate.Low = this.MemoryRead(offset, page);
this.intermediate.High = this.MemoryRead(++offset, page);
return this.intermediate;
}
@@ -63,15 +63,15 @@ namespace EightBit
protected override void SetWord(Register16 value)
{
this.BusWrite(value.Low);
this.MemoryWrite(value.Low);
++this.Bus.Address.Word;
this.BusWrite(value.High);
this.MemoryWrite(value.High);
}
protected override void SetWordPaged(byte page, byte offset, Register16 value)
{
this.BusWrite(offset, page, value.Low);
this.BusWrite(++offset, page, value.High);
this.MemoryWrite(offset, page, value.Low);
this.MemoryWrite(++offset, page, value.High);
}
}
}