From 9aecdf3873157c2bcb58225939606568432821e9 Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Tue, 20 Aug 2019 15:33:41 +0200 Subject: [PATCH] improve breakpoint calculation, only consider low 13 bit for PC --- src/debugger/Debugger.cxx | 2 +- src/emucore/M6502.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debugger/Debugger.cxx b/src/debugger/Debugger.cxx index 364129e9b..19fcf5955 100644 --- a/src/debugger/Debugger.cxx +++ b/src/debugger/Debugger.cxx @@ -383,7 +383,7 @@ string Debugger::getCondition(uInt16 addr, Int8 bank) { stringstream condition; - condition << "(pc == " << Base::HEX4 << addr << ")"; + condition << "((pc&1fff) == " << Base::HEX4 << (addr & 0x1fff) << ")"; if(bank != ANY_BANK && myCartDebug->bankCount() > 1) condition << " && (_bank == #" << int(bank) << ")"; diff --git a/src/emucore/M6502.hxx b/src/emucore/M6502.hxx index 49d829841..712434fa2 100644 --- a/src/emucore/M6502.hxx +++ b/src/emucore/M6502.hxx @@ -139,7 +139,7 @@ class M6502 : public Serializable @return The program counter register */ - uInt16 getPC() const { return PC; } + // uInt16 getPC() const { return PC; } /** Check the type of the last peek().