From 3faec680b0d348295047296d1d6dabd4eea81dfc Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Mon, 7 Jan 2019 01:28:23 +0000 Subject: [PATCH] I think this fixes one of my NES issues. The fix-up required for the PC is handled by the fetchByte associated with the BRK instruction. Signed-off-by: Adrian Conlon --- M6502/src/mos6502.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/M6502/src/mos6502.cpp b/M6502/src/mos6502.cpp index f16f41c..9b7f966 100644 --- a/M6502/src/mos6502.cpp +++ b/M6502/src/mos6502.cpp @@ -58,13 +58,13 @@ void EightBit::MOS6502::handleRESET() { void EightBit::MOS6502::handleNMI() { raise(HALT()); - interrupt(); + Processor::execute(0); raise(NMI()); } void EightBit::MOS6502::handleIRQ() { raise(HALT()); - interrupt(); + Processor::execute(0); raise(INT()); } @@ -97,7 +97,7 @@ int EightBit::MOS6502::execute() { switch (opcode()) { - case 0x00: fetchByte(); interrupt(); break; // BRK (implied) + case 0x00: fetchByte(); interrupt(); break; // BRK (implied) case 0x01: A() = orr(A(), AM_IndexedIndirectX()); break; // ORA (indexed indirect X) case 0x02: break; case 0x03: slo(AM_IndexedIndirectX()); break; // *SLO (indexed indirect X)