Add a Ricoh2A03 implmentation + tests. one test failing...

This commit is contained in:
Adrian Conlon committed 2026-05-20 20:45:25 +01:00
1 parent d5f2137f54
commit 9d8f2ceb81
2 files changed
+37

No files matched your search

+16
View File
@@ -91,4 +91,20 @@ namespace M6502.HarteTest
public async Task OpcodeSingleStep(string filePath)
=> await HarteTestHelper.RunOpcodeAsync(filePath, new TestRunner(r => new WDC65C02(r))).ConfigureAwait(false);
}
[TestClass]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Maintainability", "CA1515:Consider making public types internal", Justification = "Test class needs to be externally visible")]
public class Ricoh2A03SingleStepTests
{
private const string TestDataDirectory = @"C:\github\spectrum\libraries\EightBit\modules\65x02\nes6502\v1";
public static IEnumerable<object[]> OpcodeFiles => HarteTestHelper.GetOpcodeFiles(TestDataDirectory);
public static string GetDisplayName(MethodInfo m, object[] data) => HarteTestHelper.GetDisplayName(m, data);
[TestMethod]
[DynamicData(nameof(OpcodeFiles), DynamicDataSourceType.Property, DynamicDataDisplayName = nameof(GetDisplayName))]
public async Task OpcodeSingleStep(string filePath)
=> await HarteTestHelper.RunOpcodeAsync(filePath, new TestRunner(r => new Ricoh2A03(r))).ConfigureAwait(false);
}
}
+21
View File
@@ -0,0 +1,21 @@
// <copyright file="Ricoh2A03.cs" company="Adrian Conlon">
// Copyright (c) Adrian Conlon. All rights reserved.
// </copyright>
namespace M6502
{
using EightBit;
public class Ricoh2A03(Bus bus) : MOS6502(bus)
{
protected override byte DecimalSUB(byte operand, int borrow)
{
return base.BinarySUB(operand, borrow);
}
protected override byte DecimalADC(byte data)
{
return base.BinaryADC(data);
}
}
}