get the C# code up to date with the C++ code. Much better support for undocumented modes/instructions etc.

This commit is contained in:
Adrian Conlon
2024-05-28 13:59:37 +01:00
parent 6d7e936a60
commit 9e9d86423d
4 changed files with 824 additions and 597 deletions
+29 -5
View File
@@ -49,7 +49,7 @@ namespace EightBit
public abstract int Step();
public abstract int Execute();
public abstract void Execute();
public int Run(int limit)
{
@@ -62,10 +62,10 @@ namespace EightBit
return current;
}
public int Execute(byte value)
public void Execute(byte value)
{
this.OpCode = value;
return this.Execute();
this.Execute();
}
public abstract Register16 PeekWord(ushort address);
@@ -184,9 +184,33 @@ namespace EightBit
protected abstract void SetWord(Register16 value);
protected abstract Register16 GetWordPaged(byte page, byte offset);
protected abstract Register16 GetWordPaged();
protected abstract void SetWordPaged(byte page, byte offset, Register16 value);
protected Register16 GetWordPaged(Register16 address)
{
this.Bus.Address.Word = address.Word;
return this.GetWordPaged();
}
protected Register16 GetWordPaged(byte page, byte offset)
{
this.Bus.Address.Word = new Register16(offset, page).Word;
return this.GetWordPaged();
}
protected abstract void SetWordPaged(Register16 value);
protected void SetWordPaged(Register16 address, Register16 value)
{
this.Bus.Address.Word = address.Word;
this.SetWordPaged(value);
}
protected void SetWordPaged(byte page, byte offset, Register16 value)
{
this.Bus.Address.Word = new Register16(offset, page).Word;
this.SetWordPaged(value);
}
protected abstract Register16 FetchWord();