mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-01-22 16:16:17 +00:00
Tie the 6502 disassembler to the "core" processor.
This commit is contained in:
@@ -7,10 +7,10 @@ namespace EightBit
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
public class Disassembler(Bus bus, M6502 processor, Files.Symbols.Parser symbols)
|
||||
public class Disassembler(Bus bus, M6502Core processor, Files.Symbols.Parser symbols)
|
||||
{
|
||||
private readonly Bus bus = bus;
|
||||
private readonly M6502 processor = processor;
|
||||
private readonly M6502Core processor = processor;
|
||||
private readonly Files.Symbols.Parser symbols = symbols;
|
||||
private ushort address;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
public Checker(TestRunner runner)
|
||||
{
|
||||
this.Runner = runner;
|
||||
this.Disassembler = new(this.Runner, this.Runner.CPU, this.Symbols);
|
||||
this.Disassembler = new(this.Runner, (EightBit.M6502Core)this.Runner.CPU, this.Symbols);
|
||||
}
|
||||
|
||||
public void Check(Test test)
|
||||
@@ -201,6 +201,12 @@
|
||||
var y_good = this.Check("Y", final.Y, cpu.Y);
|
||||
var p_good = this.Check("P", final.P, cpu.P);
|
||||
|
||||
if (!p_good)
|
||||
{
|
||||
this.Messages.Add($"Expected flags: {EightBit.Disassembler.DumpFlags(final.P)}");
|
||||
this.Messages.Add($"Actual flags : {EightBit.Disassembler.DumpFlags(cpu.P)}");
|
||||
}
|
||||
|
||||
if (final.RAM == null)
|
||||
{
|
||||
throw new InvalidOperationException("Expected RAM cannot be null");
|
||||
|
||||
Reference in New Issue
Block a user