From cacf93293909d446837e085b3b09b553b2b7eff1 Mon Sep 17 00:00:00 2001 From: ugetab Date: Sat, 8 Aug 2009 05:20:52 +0000 Subject: [PATCH] Undid revision 1386. It broke the Trace Logger. Altered the 0x3800-0x3824 NSF exclusion code to be more efficient and more effective. --- src/debug.cpp | 9 +++++++-- src/drivers/win/tracer.cpp | 2 -- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/debug.cpp b/src/debug.cpp index 098b46e0..784ceb4b 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -611,7 +611,7 @@ void breakpoint() { //bbit edited: this is the end of the inserted code int debug_tracing; -int logging; +//int logging; //UGETAB: This is turning it into a local variable. Prevents logging. void DebugCycle() { if (scanline == 240) @@ -624,6 +624,11 @@ void DebugCycle() { else vblankScanLines = 0; + if (GameInfo->type==GIT_NSF) + { + if ((_PC >= 0x3801) && (_PC <= 0x3824)) return; + } + if (numWPs || dbgstate.step || dbgstate.runline || dbgstate.stepout || watchpoint[64].flags || dbgstate.badopbreak) breakpoint(); if(debug_loggingCD) LogCDData(); @@ -631,6 +636,6 @@ void DebugCycle() { //mbg 6/30/06 - this was commented out when i got here. i dont understand it anyway //if(logging || (hMemView && (EditingMode == 2))) LogInstruction(); -// extern volatile int logging; + extern volatile int logging; //UGETAB: This is required to be an extern, because the info isn't set here if(logging) FCEUD_TraceInstruction(); } diff --git a/src/drivers/win/tracer.cpp b/src/drivers/win/tracer.cpp index d0598e57..f67e93a9 100644 --- a/src/drivers/win/tracer.cpp +++ b/src/drivers/win/tracer.cpp @@ -319,8 +319,6 @@ void FCEUD_TraceInstruction(){ uint8 opcode[3], tmp; static int unloggedlines; - if((GameInfo->type==GIT_NSF) && (addr >= 0x3800) && (addr <= 0x3824)) return; - if(((logging_options & LOG_NEW_INSTRUCTIONS) && (oldcodecount != codecount)) || ((logging_options & LOG_NEW_DATA) && (olddatacount != datacount))){//something new was logged oldcodecount = codecount;