From 43dfb729d39a8277b8e0df1eea93a189a3d70656 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 2 Sep 2023 14:45:13 -0400 Subject: [PATCH] Explain even better. --- Processors/6502/Implementation/6502Implementation.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Processors/6502/Implementation/6502Implementation.hpp b/Processors/6502/Implementation/6502Implementation.hpp index 1100e2ed8..5d0662445 100644 --- a/Processors/6502/Implementation/6502Implementation.hpp +++ b/Processors/6502/Implementation/6502Implementation.hpp @@ -305,8 +305,9 @@ template void Proces // So just test for carry (well, actually borrow, which is !carry). // The bottom nibble is adjusted if there was borrow into the top nibble; - // on a 6502 this doesn't cause additional carry but on a 65C02 it does. - // This difference affects invalid BCD numbers only. + // on a 6502 additional borrow isn't propagated but on a 65C02 it is. + // This difference affects invalid BCD numbers only — valid numbers will + // never be less than -9 so adding 10 will always generate carry. if(!Numeric::carried_in<4>(a_, operand_, result)) { if constexpr (is_65c02(personality)) { result += 0xfa;