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;
|
virtual ~Ricoh2A03() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual uint8_t sub(uint8_t operand, int borrow) noexcept final;
|
uint8_t sub(uint8_t operand, int borrow) noexcept final;
|
||||||
virtual uint8_t add(uint8_t operand, int carry) 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 {
|
uint8_t EightBit::Ricoh2A03::sub(uint8_t operand, int borrow) noexcept {
|
||||||
const auto data = BUS().DATA();
|
return MOS6502::sub_b(operand, borrow);
|
||||||
return MOS6502::sub_b(operand ,data, borrow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t EightBit::Ricoh2A03::add(uint8_t operand, int carry) noexcept {
|
void EightBit::Ricoh2A03::adc() noexcept {
|
||||||
const auto data = BUS().DATA();
|
MOS6502::adc_b();
|
||||||
return MOS6502::add_b(operand, data, carry);
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user