From 170d96898f3d744f131aa9c3a3cff8cf0463078c Mon Sep 17 00:00:00 2001 From: IrgendwerA8 Date: Thu, 30 Mar 2017 12:17:29 +0200 Subject: [PATCH] Fixed SED --- src/sim65/6502.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sim65/6502.c b/src/sim65/6502.c index 0320dd895..87cef2db6 100644 --- a/src/sim65/6502.c +++ b/src/sim65/6502.c @@ -39,6 +39,8 @@ 6502) * one cycle win for fetch-modify-write instructions ignored (e.g. ROL abs,x takes only 6 cycles if no page break occurs) + * BRK, IRQ, NMI and RESET are not different from 6502 which they are in + reality (e.g. D-flag handling) */ #include "memory.h" @@ -2581,7 +2583,9 @@ static void OPC_6502_F6 (void) static void OPC_6502_F8 (void) /* Opcode $F8: SED */ { + Cycles = 2; SET_DF (1); + Regs.PC += 1; } -- 2.39.5