Added the following pseudo-registers to the debugger:

_fcount  : current frame count
  _cclocks : frame color clocks
  _vsync   : whether vsync is currently on (0 or 1)
  _vblank  : whether vblank is currently on (0 or 1)

Fixed issue with breakpoints starting the debugger causing a crash.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1614 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-01-12 15:11:55 +00:00
parent 7800ae585d
commit b8320c2785
3 changed files with 22 additions and 3 deletions

View File

@ -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 */

View File

@ -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 <algorithm>
@ -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();

View File

@ -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;
}