diff --git a/src/debugger/TIADebug.cxx b/src/debugger/TIADebug.cxx index 80a790fb3..b2e1ad755 100644 --- a/src/debugger/TIADebug.cxx +++ b/src/debugger/TIADebug.cxx @@ -108,6 +108,16 @@ const DebuggerState& TIADebug::getState() myState.aud.push_back(audV0()); myState.aud.push_back(audV1()); + // internal TIA state + myState.info.clear(); + myState.info.push_back(frameCount()); + myState.info.push_back(frameCycles()); + myState.info.push_back(vsyncAsInt()); + myState.info.push_back(vblankAsInt()); + myState.info.push_back(scanlines()); + myState.info.push_back(scanlinesLastFrame()); + myState.info.push_back(clocksThisLine()); + return myState; } @@ -168,6 +178,16 @@ void TIADebug::saveOldState() myOldState.aud.push_back(audC1()); myOldState.aud.push_back(audV0()); myOldState.aud.push_back(audV1()); + + // internal TIA state + myOldState.info.clear(); + myOldState.info.push_back(frameCount()); + myOldState.info.push_back(frameCycles()); + myOldState.info.push_back(vsyncAsInt()); + myOldState.info.push_back(vblankAsInt()); + myOldState.info.push_back(scanlines()); + myOldState.info.push_back(scanlinesLastFrame()); + myOldState.info.push_back(clocksThisLine()); } /* the set methods now use mySystem.poke(). This will save us the diff --git a/src/debugger/TIADebug.hxx b/src/debugger/TIADebug.hxx index 38dd9e6dd..55fe764d0 100644 --- a/src/debugger/TIADebug.hxx +++ b/src/debugger/TIADebug.hxx @@ -45,6 +45,7 @@ class TiaState : public DebuggerState IntArray pf; IntArray size; IntArray aud; + IntArray info; }; class TIADebug : public DebuggerSystem diff --git a/src/debugger/gui/TiaInfoWidget.cxx b/src/debugger/gui/TiaInfoWidget.cxx index 224c26690..abacbf2fa 100644 --- a/src/debugger/gui/TiaInfoWidget.cxx +++ b/src/debugger/gui/TiaInfoWidget.cxx @@ -127,19 +127,26 @@ void TiaInfoWidget::loadConfig() { Debugger& dbg = instance().debugger(); TIADebug& tia = dbg.tiaDebug(); + const TiaState& oldTia = static_cast(tia.getOldState()); - myFrameCount->setText(" " + Common::Base::toString(tia.frameCount(), Common::Base::F_10)); - myFrameCycles->setText(" " + Common::Base::toString(tia.frameCycles(), Common::Base::F_10)); + myFrameCount->setText(" " + Common::Base::toString(tia.frameCount(), Common::Base::F_10), + tia.frameCount() != oldTia.info[0]); + myFrameCycles->setText(" " + Common::Base::toString(tia.frameCycles(), Common::Base::F_10), + tia.frameCycles() != oldTia.info[1]); - myVSync->setState(tia.vsync()); - myVBlank->setState(tia.vblank()); + myVSync->setState(tia.vsync(), tia.vsyncAsInt() != oldTia.info[2]); + myVBlank->setState(tia.vblank(), tia.vblankAsInt() != oldTia.info[3]); int clk = tia.clocksThisLine(); - myScanlineCount->setText( - Common::Base::toString(tia.scanlines(), Common::Base::F_10)); + myScanlineCount->setText(Common::Base::toString(tia.scanlines(), Common::Base::F_10), + tia.scanlines() != oldTia.info[4]); myScanlineCountLast->setText( - Common::Base::toString(tia.scanlinesLastFrame(), Common::Base::F_10)); - myScanlineCycles->setText(Common::Base::toString(clk/3, Common::Base::F_10)); - myPixelPosition->setText(Common::Base::toString(clk-68, Common::Base::F_10)); - myColorClocks->setText(Common::Base::toString(clk, Common::Base::F_10)); + Common::Base::toString(tia.scanlinesLastFrame(), Common::Base::F_10), + tia.scanlinesLastFrame() != oldTia.info[5]); + myScanlineCycles->setText(Common::Base::toString(clk/3, Common::Base::F_10), + clk != oldTia.info[6]); + myPixelPosition->setText(Common::Base::toString(clk-68, Common::Base::F_10), + clk != oldTia.info[6]); + myColorClocks->setText(Common::Base::toString(clk, Common::Base::F_10), + clk != oldTia.info[6]); } diff --git a/src/gui/Widget.cxx b/src/gui/Widget.cxx index 274b47346..3f963c08c 100644 --- a/src/gui/Widget.cxx +++ b/src/gui/Widget.cxx @@ -544,6 +544,7 @@ CheckboxWidget::CheckboxWidget(GuiObject* boss, const GUI::Font& font, _state(false), _holdFocus(true), _drawBox(true), + _changed(false), _fillColor(kColor), _boxY(0), _textY(0) @@ -632,13 +633,14 @@ void CheckboxWidget::setFill(FillType type) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void CheckboxWidget::setState(bool state) +void CheckboxWidget::setState(bool state, bool changed) { if(_state != state) { _state = state; setDirty(); } + _changed = changed; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -651,14 +653,14 @@ void CheckboxWidget::drawWidget(bool hilite) if(_drawBox) s.box(_x, _y + _boxY, 14, 14, kColor, kShadowColor); // Do we draw a square or cross? - s.fillRect(_x + 2, _y + _boxY + 2, 10, 10, isEnabled() ? _bgcolor : kColor); + s.fillRect(_x + 2, _y + _boxY + 2, 10, 10, _changed ? kDbgChangedColor : isEnabled() ? _bgcolor : kColor); if(_state) s.drawBitmap(_img, _x + 3, _y + _boxY + 3, isEnabled() ? kCheckColor : kShadowColor); #else if(_drawBox) s.frameRect(_x, _y + _boxY, 14, 14, hilite ? kScrollColorHi : kShadowColor); // Do we draw a square or cross? - s.fillRect(_x + 1, _y + _boxY + 1, 12, 12, isEnabled() ? _bgcolor : kColor); + s.fillRect(_x + 1, _y + _boxY + 1, 12, 12, _changed ? kDbgChangedColor : isEnabled() ? _bgcolor : kColor); if(_state) s.drawBitmap(_img, _x + 2, _y + _boxY + 2, isEnabled() ? hilite ? kScrollColorHi : kCheckColor diff --git a/src/gui/Widget.hxx b/src/gui/Widget.hxx index 047cebe01..b7430567a 100644 --- a/src/gui/Widget.hxx +++ b/src/gui/Widget.hxx @@ -263,7 +263,7 @@ class CheckboxWidget : public ButtonWidget void setEditable(bool editable); void setFill(FillType type); - void setState(bool state); + void setState(bool state, bool changed = false); void toggleState() { setState(!_state); } bool getState() const { return _state; } @@ -280,6 +280,7 @@ class CheckboxWidget : public ButtonWidget bool _state; bool _holdFocus; bool _drawBox; + bool _changed; uInt32* _img; uInt32 _fillColor;