diff --git a/Ricoh2A03/inc/Ricoh2A03.h b/Ricoh2A03/inc/Ricoh2A03.h index 1264900..d32ee6d 100644 --- a/Ricoh2A03/inc/Ricoh2A03.h +++ b/Ricoh2A03/inc/Ricoh2A03.h @@ -11,7 +11,7 @@ namespace EightBit { virtual ~Ricoh2A03() = default; protected: - virtual uint8_t sub(uint8_t operand, int borrow) noexcept final; - virtual uint8_t add(uint8_t operand, int carry) noexcept final; + uint8_t sub(uint8_t operand, int borrow) noexcept final; + void adc() noexcept final; }; } \ No newline at end of file diff --git a/Ricoh2A03/src/Ricoh2A03.cpp b/Ricoh2A03/src/Ricoh2A03.cpp index b63690c..f99fa76 100644 --- a/Ricoh2A03/src/Ricoh2A03.cpp +++ b/Ricoh2A03/src/Ricoh2A03.cpp @@ -6,11 +6,9 @@ EightBit::Ricoh2A03::Ricoh2A03(Bus& bus) } uint8_t EightBit::Ricoh2A03::sub(uint8_t operand, int borrow) noexcept { - const auto data = BUS().DATA(); - return MOS6502::sub_b(operand ,data, borrow); + return MOS6502::sub_b(operand, borrow); } -uint8_t EightBit::Ricoh2A03::add(uint8_t operand, int carry) noexcept { - const auto data = BUS().DATA(); - return MOS6502::add_b(operand, data, carry); +void EightBit::Ricoh2A03::adc() noexcept { + MOS6502::adc_b(); }