Added previous scanline count to TIA info area of debugger.

This commit is contained in:
Stephen Anthony 2017-05-27 15:38:45 -02:30
parent 3ad77117ec
commit 25e96c3164
4 changed files with 23 additions and 5 deletions

View File

@ -721,6 +721,12 @@ int TIADebug::scanlines() const
return myTIA.scanlines();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int TIADebug::scanlinesLastFrame() const
{
return myTIA.myFrameManager.scanlinesLastFrame();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int TIADebug::clocksThisLine() const
{

View File

@ -158,6 +158,7 @@ class TIADebug : public DebuggerSystem
// Read-only internal TIA state
int scanlines() const;
int scanlinesLastFrame() const;
int frameCount() const;
int clocksThisLine() const;
bool vsync() const;

View File

@ -68,16 +68,23 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
xpos = x + lwidth + myFrameCycles->getWidth() + 8; ypos = y + 10;
lwidth = lfont.getStringWidth(longstr ? "Color Clock " : "Pixel Pos ");
fwidth = 3 * lfont.getMaxCharWidth() + 4;
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
"Scanline ", kTextAlignLeft);
myScanlineCount = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
new StaticTextWidget(boss, lfont, xpos, ypos,
lfont.getStringWidth(longstr ? "Scanline" : "Scn Ln"), lineHeight,
longstr ? "Scanline" : "Scn Ln", kTextAlignLeft);
myScanlineCountLast = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
lineHeight, "");
myScanlineCountLast->setEditable(false, true);
myScanlineCount = new EditTextWidget(boss, nfont,
xpos+lwidth - myScanlineCountLast->getWidth() - 2, ypos-1, fwidth,
lineHeight, "");
myScanlineCount->setEditable(false, true);
ypos += lineHeight + 5;
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
longstr ? "Scan Cycle " : "S. Cycle ", kTextAlignLeft);
longstr ? "Scan Cycle " : "Scn Cycle", kTextAlignLeft);
myScanlineCycles = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
lineHeight, "");
@ -128,7 +135,10 @@ void TiaInfoWidget::loadConfig()
myVBlank->setState(tia.vblank());
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));
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));

View File

@ -39,6 +39,7 @@ class TiaInfoWidget : public Widget, public CommandSender
EditTextWidget* myFrameCycles;
EditTextWidget* myScanlineCount;
EditTextWidget* myScanlineCountLast;
EditTextWidget* myScanlineCycles;
EditTextWidget* myPixelPosition;
EditTextWidget* myColorClocks;