mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-21 18:29:57 +00:00
Fix NES CPU, based on 6502 changes
This commit is contained in:
parent
b812554cb6
commit
ae4726b18f
@ -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;
|
||||
};
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user