mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-07-05 05:23:55 +00:00
Try to bring the Z80 fusetest back to life
This commit is contained in:
@ -13,6 +13,14 @@ namespace EightBit
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Instruction execution events
|
||||||
|
|
||||||
|
public event EventHandler<EventArgs>? ReadingMemory;
|
||||||
|
public event EventHandler<EventArgs>? ReadMemory;
|
||||||
|
public event EventHandler<EventArgs>? WritingMemory;
|
||||||
|
public event EventHandler<EventArgs>? WroteMemory;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
private PinLevel _resetLine;
|
private PinLevel _resetLine;
|
||||||
private PinLevel _intLine;
|
private PinLevel _intLine;
|
||||||
@ -142,6 +150,14 @@ namespace EightBit
|
|||||||
|
|
||||||
protected virtual void HandleINT() => this.RaiseINT();
|
protected virtual void HandleINT() => this.RaiseINT();
|
||||||
|
|
||||||
|
protected void OnReadingMemory() => this.ReadingMemory?.Invoke(this, EventArgs.Empty);
|
||||||
|
|
||||||
|
protected void OnReadMemory() => this.ReadMemory?.Invoke(this, EventArgs.Empty);
|
||||||
|
|
||||||
|
protected void OnWritingMemory() => this.WritingMemory?.Invoke(this, EventArgs.Empty);
|
||||||
|
|
||||||
|
protected void OnWroteMemory() => this.WroteMemory?.Invoke(this, EventArgs.Empty);
|
||||||
|
|
||||||
protected void MemoryWrite(byte low, byte high)
|
protected void MemoryWrite(byte low, byte high)
|
||||||
{
|
{
|
||||||
this.Bus.Address.Assign(low, high);
|
this.Bus.Address.Assign(low, high);
|
||||||
|
@ -98,8 +98,8 @@ namespace Z80.FuseTest
|
|||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
this.ReadByte += this.Event_ReadByte;
|
this.cpu.ReadMemory += this.Cpu_ReadMemory;
|
||||||
this.WrittenByte += this.Event_WrittenByte;
|
this.cpu.WroteMemory += this.Cpu_WroteMemory;
|
||||||
this.ports.ReadPort += this.Ports_ReadPort;
|
this.ports.ReadPort += this.Ports_ReadPort;
|
||||||
this.ports.WrittenPort += this.Ports_WrittenPort;
|
this.ports.WrittenPort += this.Ports_WrittenPort;
|
||||||
this.cpu.ExecutedInstruction += this.Cpu_ExecutedInstruction;
|
this.cpu.ExecutedInstruction += this.Cpu_ExecutedInstruction;
|
||||||
@ -107,8 +107,8 @@ namespace Z80.FuseTest
|
|||||||
|
|
||||||
private void Ports_ReadPort(object? sender, EventArgs e) => this.AddActualEvent("PR");
|
private void Ports_ReadPort(object? sender, EventArgs e) => this.AddActualEvent("PR");
|
||||||
private void Ports_WrittenPort(object? sender, EventArgs e) => this.AddActualEvent("PW");
|
private void Ports_WrittenPort(object? sender, EventArgs e) => this.AddActualEvent("PW");
|
||||||
private void Event_ReadByte(object? sender, EventArgs e) => this.AddActualEvent("MR");
|
private void Cpu_ReadMemory(object? sender, EventArgs e) => this.AddActualEvent("MR");
|
||||||
private void Event_WrittenByte(object? sender, EventArgs e) => this.AddActualEvent("MW");
|
private void Cpu_WroteMemory(object? sender, EventArgs e) => this.AddActualEvent("MW");
|
||||||
|
|
||||||
private void AddActualEvent(string specifier)
|
private void AddActualEvent(string specifier)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user