From feb219dd2e002a361ba75b51ed8fbd1ebc7a72b8 Mon Sep 17 00:00:00 2001 From: Stephen Crane Date: Sun, 24 Jan 2016 15:28:54 +0000 Subject: [PATCH] bugfix --- r6502.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/r6502.cpp b/r6502.cpp index b96a694..ea8ec7c 100644 --- a/r6502.cpp +++ b/r6502.cpp @@ -91,8 +91,7 @@ void r6502::irq() { void r6502::brk() { if (!P.bits.I) { - pusha(PC); - P.bits.B = 1; + pusha(PC+1); php(); P.bits.I = 1; PC = vector(ibvec);