diff --git a/M6502/MOS6502.cs b/M6502/MOS6502.cs index 66e8958..a016b57 100644 --- a/M6502/MOS6502.cs +++ b/M6502/MOS6502.cs @@ -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); diff --git a/M6502/Ricoh2A03.cs b/M6502/Ricoh2A03.cs index 5c691df..ef82bdb 100644 --- a/M6502/Ricoh2A03.cs +++ b/M6502/Ricoh2A03.cs @@ -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);