mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-04-20 06:16:43 +00:00
Hack to allow single step tests to completely work: disable IO area triggers.
This commit is contained in:
+2
-2
@@ -37,9 +37,9 @@ namespace LR35902
|
||||
|
||||
private int allowed = 0;
|
||||
|
||||
protected Bus()
|
||||
protected Bus(bool ioTriggers = true)
|
||||
{
|
||||
this.IO = new IoRegisters(this);
|
||||
this.IO = new IoRegisters(this, ioTriggers);
|
||||
this.CPU = new LR35902(this);
|
||||
this.CPU.MachineTicked += this.CPU_MachineTicked;
|
||||
this.WrittenByte += this.Bus_WrittenByte;
|
||||
|
||||
@@ -90,12 +90,15 @@ namespace LR35902
|
||||
private bool p11 = true; // left/b
|
||||
private bool p10 = true; // right/a
|
||||
|
||||
public IoRegisters(Bus bus)
|
||||
public IoRegisters(Bus bus, bool triggered = true)
|
||||
: base(0x80)
|
||||
{
|
||||
this.bus = bus;
|
||||
this.bus.ReadingByte += this.Bus_ReadingByte;
|
||||
this.bus.WrittenByte += this.Bus_WrittenByte;
|
||||
if (triggered)
|
||||
{
|
||||
this.bus.ReadingByte += this.Bus_ReadingByte;
|
||||
this.bus.WrittenByte += this.Bus_WrittenByte;
|
||||
}
|
||||
}
|
||||
|
||||
public event EventHandler<LcdStatusModeEventArgs>? DisplayStatusModeUpdated;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
public Ram RAM { get; } = new(0x10000);
|
||||
|
||||
public TestRunner()
|
||||
: base(false)
|
||||
{
|
||||
this._mapping = new(this.RAM, 0x0000, (ushort)Mask.Sixteen, AccessLevel.ReadWrite);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user