mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-11-30 06:17:31 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user