1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00

Ensures ADC and SBC decimal take an extra cycle on the 65C02.

This commit is contained in:
Thomas Harte 2018-08-10 22:52:55 -04:00
parent 261fb3d4f8
commit 878c63dcd2

View File

@ -288,6 +288,8 @@ if(number_of_cycles <= Cycles(0)) break;
if(personality_ != P6502) {
negative_result_ = zero_result_ = a_;
read_mem(operand_, address_.full);
break;
}
continue;
} else {
@ -312,6 +314,8 @@ if(number_of_cycles <= Cycles(0)) break;
if(personality_ != P6502) {
negative_result_ = zero_result_ = a_;
read_mem(operand_, address_.full);
break;
}
} else {
const uint16_t result = static_cast<uint16_t>(a_) + static_cast<uint16_t>(operand_) + static_cast<uint16_t>(carry_flag_);