Fix NES CPU, based on 6502 changes

This commit is contained in:
Adrian Conlon 2024-03-23 10:13:13 +00:00
parent b812554cb6
commit ae4726b18f
2 changed files with 5 additions and 7 deletions

View File

@ -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;
};
}

View File

@ -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();
}