Fix ARR: hurrah 2A03 fixed as well

This commit is contained in:
Adrian Conlon committed 2026-05-20 20:56:40 +01:00
1 parent 9d8f2ceb81
commit 8041c04883
2 files changed
+4 -2

No files matched your search

+2 -2
View File
@@ -187,7 +187,7 @@ namespace M6502
#region Undocumented instructions with BCD effects
private void ARR()
protected virtual void ARR()
{
var value = this.Bus.Data;
if (this.Denary != 0)
@@ -215,7 +215,7 @@ namespace M6502
this.A += 0x60;
}
private void ARR_b(byte value)
protected void ARR_b(byte value)
{
this.A &= value;
this.A = this.Through(this.A >> 1 | this.Carry << 7);
+2
View File
@@ -8,6 +8,8 @@ namespace M6502
public class Ricoh2A03(Bus bus) : MOS6502(bus)
{
protected override void ARR() => this.ARR_b(this.Bus.Data);
protected override byte DecimalSUB(byte operand, int borrow)
{
return base.BinarySUB(operand, borrow);