mirror of https://github.com/stella-emu/stella.git
Added previous scanline count to TIA info area of debugger.
This commit is contained in:
parent
3ad77117ec
commit
25e96c3164
|
@ -721,6 +721,12 @@ int TIADebug::scanlines() const
|
||||||
return myTIA.scanlines();
|
return myTIA.scanlines();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
int TIADebug::scanlinesLastFrame() const
|
||||||
|
{
|
||||||
|
return myTIA.myFrameManager.scanlinesLastFrame();
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
int TIADebug::clocksThisLine() const
|
int TIADebug::clocksThisLine() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -158,6 +158,7 @@ class TIADebug : public DebuggerSystem
|
||||||
|
|
||||||
// Read-only internal TIA state
|
// Read-only internal TIA state
|
||||||
int scanlines() const;
|
int scanlines() const;
|
||||||
|
int scanlinesLastFrame() const;
|
||||||
int frameCount() const;
|
int frameCount() const;
|
||||||
int clocksThisLine() const;
|
int clocksThisLine() const;
|
||||||
bool vsync() const;
|
bool vsync() const;
|
||||||
|
|
|
@ -68,16 +68,23 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
xpos = x + lwidth + myFrameCycles->getWidth() + 8; ypos = y + 10;
|
xpos = x + lwidth + myFrameCycles->getWidth() + 8; ypos = y + 10;
|
||||||
lwidth = lfont.getStringWidth(longstr ? "Color Clock " : "Pixel Pos ");
|
lwidth = lfont.getStringWidth(longstr ? "Color Clock " : "Pixel Pos ");
|
||||||
fwidth = 3 * lfont.getMaxCharWidth() + 4;
|
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, "");
|
lineHeight, "");
|
||||||
myScanlineCount->setEditable(false, true);
|
myScanlineCount->setEditable(false, true);
|
||||||
|
|
||||||
ypos += lineHeight + 5;
|
ypos += lineHeight + 5;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
|
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,
|
myScanlineCycles = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
|
||||||
lineHeight, "");
|
lineHeight, "");
|
||||||
|
@ -128,7 +135,10 @@ void TiaInfoWidget::loadConfig()
|
||||||
myVBlank->setState(tia.vblank());
|
myVBlank->setState(tia.vblank());
|
||||||
|
|
||||||
int clk = tia.clocksThisLine();
|
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));
|
myScanlineCycles->setText(Common::Base::toString(clk/3, Common::Base::F_10));
|
||||||
myPixelPosition->setText(Common::Base::toString(clk-68, 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));
|
myColorClocks->setText(Common::Base::toString(clk, Common::Base::F_10));
|
||||||
|
|
|
@ -39,6 +39,7 @@ class TiaInfoWidget : public Widget, public CommandSender
|
||||||
EditTextWidget* myFrameCycles;
|
EditTextWidget* myFrameCycles;
|
||||||
|
|
||||||
EditTextWidget* myScanlineCount;
|
EditTextWidget* myScanlineCount;
|
||||||
|
EditTextWidget* myScanlineCountLast;
|
||||||
EditTextWidget* myScanlineCycles;
|
EditTextWidget* myScanlineCycles;
|
||||||
EditTextWidget* myPixelPosition;
|
EditTextWidget* myPixelPosition;
|
||||||
EditTextWidget* myColorClocks;
|
EditTextWidget* myColorClocks;
|
||||||
|
|
Loading…
Reference in New Issue