diff --git a/stella/src/debugger/TIADebug.hxx b/stella/src/debugger/TIADebug.hxx index 34e4d4d3a..469d206e1 100644 --- a/stella/src/debugger/TIADebug.hxx +++ b/stella/src/debugger/TIADebug.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: TIADebug.hxx,v 1.24 2009-01-01 18:13:35 stephena Exp $ +// $Id: TIADebug.hxx,v 1.25 2009-01-12 15:11:54 stephena Exp $ //============================================================================ #ifndef TIA_DEBUG_HXX @@ -205,6 +205,8 @@ class TIADebug : public DebuggerSystem int clocksThisLine(); bool vsync(); bool vblank(); + int vsyncAsInt() { return int(vsync()); } // so we can use _vsync pseudo-register + int vblankAsInt() { return int(vblank()); } // so we can use _vblank pseudo-register private: /** Display a color patch for color at given index in the palette */ diff --git a/stella/src/emucore/FrameBuffer.cxx b/stella/src/emucore/FrameBuffer.cxx index 7656dd757..f9afc2858 100644 --- a/stella/src/emucore/FrameBuffer.cxx +++ b/stella/src/emucore/FrameBuffer.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: FrameBuffer.cxx,v 1.157 2009-01-10 18:52:55 stephena Exp $ +// $Id: FrameBuffer.cxx,v 1.158 2009-01-12 15:11:55 stephena Exp $ //============================================================================ #include @@ -158,7 +158,12 @@ void FrameBuffer::update() case EventHandler::S_EMULATE: { // Run the console for one frame + // Note that the debugger can cause a breakpoint to occur, which changes + // the EventHandler state 'behind our back' - we need to check for that myOSystem->console().mediaSource().update(); + #ifdef DEBUGGER_SUPPORT + if(myOSystem->eventHandler().state() != EventHandler::S_EMULATE) break; + #endif if(myOSystem->eventHandler().frying()) myOSystem->console().fry(); diff --git a/stella/src/yacc/YaccParser.cxx b/stella/src/yacc/YaccParser.cxx index aa26fe96f..99eca9aef 100644 --- a/stella/src/yacc/YaccParser.cxx +++ b/stella/src/yacc/YaccParser.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: YaccParser.cxx,v 1.25 2009-01-01 18:13:40 stephena Exp $ +// $Id: YaccParser.cxx,v 1.26 2009-01-12 15:11:55 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -214,6 +214,18 @@ TIADEBUG_INT_METHOD getTiaSpecial(char *c) { if(strcmp(c, "_scan") == 0) return &TIADebug::scanlines; + if(strcmp(c, "_fcount") == 0) + return &TIADebug::frameCount; + + if(strcmp(c, "_cclocks") == 0) + return &TIADebug::clocksThisLine; + + if(strcmp(c, "_vsync") == 0) + return &TIADebug::vsyncAsInt; + + if(strcmp(c, "_vblank") == 0) + return &TIADebug::vblankAsInt; + return 0; }