mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-04-24 02:17:47 +00:00
Prefer to use events directly, rather than through "On" methods
This commit is contained in:
+2
-3
@@ -42,6 +42,7 @@ namespace LR35902
|
||||
this.IO = new IoRegisters(this);
|
||||
this.CPU = new LR35902(this);
|
||||
this.CPU.MachineTicked += this.CPU_MachineTicked;
|
||||
this.WrittenByte += this.Bus_WrittenByte;
|
||||
}
|
||||
|
||||
public LR35902 CPU { get; }
|
||||
@@ -173,10 +174,8 @@ namespace LR35902
|
||||
return new MemoryMapping(this.highInternalRam, 0xff80, 0xffff, AccessLevel.ReadWrite);
|
||||
}
|
||||
|
||||
protected override void OnWrittenByte()
|
||||
private void Bus_WrittenByte(object? sender, EventArgs e)
|
||||
{
|
||||
base.OnWrittenByte();
|
||||
|
||||
var address = this.Address.Word;
|
||||
var value = this.Data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user