From 3a2d27a636bb0132d17640cd5aa4e429de42f0d2 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 8 Jul 2022 11:15:48 -0400 Subject: [PATCH] Correct for switched BRK presumption. --- Processors/6502/Implementation/6502Implementation.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Processors/6502/Implementation/6502Implementation.hpp b/Processors/6502/Implementation/6502Implementation.hpp index 6caafebbc..601d7f2cb 100644 --- a/Processors/6502/Implementation/6502Implementation.hpp +++ b/Processors/6502/Implementation/6502Implementation.hpp @@ -171,8 +171,8 @@ template void Proces case CyclePullY: s_++; read_mem(y_, s_ | 0x100); break; case CyclePullOperand: s_++; read_mem(operand_, s_ | 0x100); break; case OperationSetFlagsFromOperand: set_flags(operand_); continue; - case OperationSetOperandFromFlagsWithBRKSet: operand_ = flags_.get() | Flag::Break; continue; - case OperationSetOperandFromFlags: operand_ = flags_.get(); continue; + case OperationSetOperandFromFlagsWithBRKSet: operand_ = flags_.get(); continue; + case OperationSetOperandFromFlags: operand_ = flags_.get() & ~Flag::Break; continue; case OperationSetFlagsFromA: flags_.set_nz(a_); continue; case OperationSetFlagsFromX: flags_.set_nz(x_); continue; case OperationSetFlagsFromY: flags_.set_nz(y_); continue;