added some more debugger help links

This commit is contained in:
thrust26 2021-04-19 21:38:36 +02:00
parent ea62581dd5
commit e62573601d
6 changed files with 27 additions and 6 deletions

View File

@ -117,7 +117,7 @@ CartRamWidget::InternalRamWidget::InternalRamWidget(GuiObject* boss,
CartDebugWidget& dbg) CartDebugWidget& dbg)
: RamWidget(boss, lfont, nfont, x, y, w, h, : RamWidget(boss, lfont, nfont, x, y, w, h,
dbg.internalRamSize(), std::min(dbg.internalRamSize() / 16, 16U), dbg.internalRamSize(), std::min(dbg.internalRamSize() / 16, 16U),
std::min(dbg.internalRamSize() / 16, 16U) * 16), std::min(dbg.internalRamSize() / 16, 16U) * 16, "CartridgeRAMInformation"),
myCart(dbg) myCart(dbg)
{ {
} }

View File

@ -48,6 +48,7 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
"PC ", TextAlign::Left); "PC ", TextAlign::Left);
myPCGrid = myPCGrid =
new DataGridWidget(boss, nfont, xpos + lwidth, ypos, 1, 1, 4, 16, Common::Base::Fmt::_16); new DataGridWidget(boss, nfont, xpos + lwidth, ypos, 1, 1, 4, 16, Common::Base::Fmt::_16);
myPCGrid->setHelpAnchor("CPURegisters", true);
myPCGrid->setTarget(this); myPCGrid->setTarget(this);
myPCGrid->setID(kPCRegID); myPCGrid->setID(kPCRegID);
addFocusWidget(myPCGrid); addFocusWidget(myPCGrid);
@ -79,6 +80,7 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
xpos = myCpuGridDecValue->getRight() + fontWidth * 2; xpos = myCpuGridDecValue->getRight() + fontWidth * 2;
myCpuGridBinValue = myCpuGridBinValue =
new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 8, 8, Common::Base::Fmt::_2); new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 8, 8, Common::Base::Fmt::_2);
myCpuGridBinValue->setHelpAnchor("CPURegisters", true);
myCpuGridBinValue->setTarget(this); myCpuGridBinValue->setTarget(this);
myCpuGridBinValue->setID(kCpuRegBinID); myCpuGridBinValue->setID(kCpuRegBinID);
addFocusWidget(myCpuGridBinValue); addFocusWidget(myCpuGridBinValue);
@ -123,6 +125,7 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
new StaticTextWidget(boss, lfont, xpos, ypos + 2, lwidth-2, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos + 2, lwidth-2, fontHeight,
"PS ", TextAlign::Left); "PS ", TextAlign::Left);
myPSRegister = new ToggleBitWidget(boss, nfont, xpos+lwidth, ypos, 8, 1); myPSRegister = new ToggleBitWidget(boss, nfont, xpos+lwidth, ypos, 8, 1);
myPSRegister->setHelpAnchor("CPURegisters", true);
myPSRegister->setTarget(this); myPSRegister->setTarget(this);
addFocusWidget(myPSRegister); addFocusWidget(myPSRegister);

View File

@ -540,22 +540,27 @@ void DebuggerDialog::addRomArea()
b = new ButtonWidget(this, *myLFont, buttonX, buttonY, b = new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Step", kDDStepCmd, true); bwidth, bheight, "Step", kDDStepCmd, true);
b->setHelpAnchor("GlobalButtons", true);
wid2.push_back(b); wid2.push_back(b);
buttonY += bheight + 4; buttonY += bheight + 4;
b = new ButtonWidget(this, *myLFont, buttonX, buttonY, b = new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Trace", kDDTraceCmd, true); bwidth, bheight, "Trace", kDDTraceCmd, true);
b->setHelpAnchor("GlobalButtons", true);
wid2.push_back(b); wid2.push_back(b);
buttonY += bheight + 4; buttonY += bheight + 4;
b = new ButtonWidget(this, *myLFont, buttonX, buttonY, b = new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Scan +1", kDDSAdvCmd, true); bwidth, bheight, "Scan +1", kDDSAdvCmd, true);
b->setHelpAnchor("GlobalButtons", true);
wid2.push_back(b); wid2.push_back(b);
buttonY += bheight + 4; buttonY += bheight + 4;
b = new ButtonWidget(this, *myLFont, buttonX, buttonY, b = new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Frame +1", kDDAdvCmd, true); bwidth, bheight, "Frame +1", kDDAdvCmd, true);
b->setHelpAnchor("GlobalButtons", true);
wid2.push_back(b); wid2.push_back(b);
buttonY += bheight + 4; buttonY += bheight + 4;
b = new ButtonWidget(this, *myLFont, buttonX, buttonY, b = new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Run", kDDRunCmd); bwidth, bheight, "Run", kDDRunCmd);
b->setHelpAnchor("GlobalButtons", true);
wid2.push_back(b); wid2.push_back(b);
addCancelWidget(b); addCancelWidget(b);
@ -567,6 +572,7 @@ void DebuggerDialog::addRomArea()
myRewindButton = myRewindButton =
new ButtonWidget(this, *myLFont, buttonX, buttonY, new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, LEFT_ARROW.data(), 7, 11, kDDRewindCmd, true); bwidth, bheight, LEFT_ARROW.data(), 7, 11, kDDRewindCmd, true);
myRewindButton->setHelpAnchor("GlobalButtons", true);
myRewindButton->clearFlags(Widget::FLAG_ENABLED); myRewindButton->clearFlags(Widget::FLAG_ENABLED);
buttonY += bheight + 4; buttonY += bheight + 4;
@ -575,6 +581,7 @@ void DebuggerDialog::addRomArea()
myUnwindButton = myUnwindButton =
new ButtonWidget(this, *myLFont, buttonX, buttonY, new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, RIGHT_ARROW.data(), 7, 11, kDDUnwindCmd, true); bwidth, bheight, RIGHT_ARROW.data(), 7, 11, kDDUnwindCmd, true);
myUnwindButton->setHelpAnchor("GlobalButtons", true);
myUnwindButton->clearFlags(Widget::FLAG_ENABLED); myUnwindButton->clearFlags(Widget::FLAG_ENABLED);
int xpos = buttonX - 8*myLFont->getMaxCharWidth() - 20, ypos = 30; int xpos = buttonX - 8*myLFont->getMaxCharWidth() - 20, ypos = 30;
@ -632,7 +639,6 @@ void DebuggerDialog::addRomArea()
addToFocusList(myRom->getFocusList(), myRomTab, tabID); addToFocusList(myRom->getFocusList(), myRomTab, tabID);
// The 'cart-specific' information tab (optional) // The 'cart-specific' information tab (optional)
tabID = myRomTab->addTab(" " + instance().console().cartridge().name() + " ", TabWidget::AUTO_WIDTH); tabID = myRomTab->addTab(" " + instance().console().cartridge().name() + " ", TabWidget::AUTO_WIDTH);
myCartInfo = instance().console().cartridge().infoWidget( myCartInfo = instance().console().cartridge().infoWidget(
myRomTab, *myLFont, *myNFont, 2, 2, tabWidth - 1, myRomTab, *myLFont, *myNFont, 2, 2, tabWidth - 1,

View File

@ -30,7 +30,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
uInt32 ramsize, uInt32 numrows, uInt32 pagesize) uInt32 ramsize, uInt32 numrows, uInt32 pagesize,
const string& helpAnchor)
: Widget(boss, lfont, x, y, w, h), : Widget(boss, lfont, x, y, w, h),
CommandSender(boss), CommandSender(boss),
_nfont{nfont}, _nfont{nfont},
@ -56,6 +57,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
bool useScrollbar = ramsize / numrows > 16; bool useScrollbar = ramsize / numrows > 16;
myRamGrid = new DataGridRamWidget(_boss, *this, _nfont, xpos, ypos, myRamGrid = new DataGridRamWidget(_boss, *this, _nfont, xpos, ypos,
16, myNumRows, 2, 8, Common::Base::Fmt::_16, useScrollbar); 16, myNumRows, 2, 8, Common::Base::Fmt::_16, useScrollbar);
myRamGrid->setHelpAnchor(helpAnchor, true);
myRamGrid->setTarget(this); myRamGrid->setTarget(this);
myRamGrid->setID(kRamGridID); myRamGrid->setID(kRamGridID);
addFocusWidget(myRamGrid); addFocusWidget(myRamGrid);
@ -66,18 +68,21 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
myUndoButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight, myUndoButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Undo", kUndoCmd); "Undo", kUndoCmd);
myUndoButton->setHelpAnchor("M6532Search", true);
wid.push_back(myUndoButton); wid.push_back(myUndoButton);
myUndoButton->setTarget(this); myUndoButton->setTarget(this);
by += bheight + VGAP; by += bheight + VGAP;
myRevertButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight, myRevertButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Revert", kRevertCmd); "Revert", kRevertCmd);
myRevertButton->setHelpAnchor("M6532Search", true);
wid.push_back(myRevertButton); wid.push_back(myRevertButton);
myRevertButton->setTarget(this); myRevertButton->setTarget(this);
by += bheight + VGAP * 6; by += bheight + VGAP * 6;
mySearchButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight, mySearchButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Search" + ELLIPSIS, kSearchCmd); "Search" + ELLIPSIS, kSearchCmd);
mySearchButton->setHelpAnchor("M6532Search", true);
mySearchButton->setToolTip("Search and highlight found values."); mySearchButton->setToolTip("Search and highlight found values.");
wid.push_back(mySearchButton); wid.push_back(mySearchButton);
mySearchButton->setTarget(this); mySearchButton->setTarget(this);
@ -85,6 +90,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
by += bheight + VGAP; by += bheight + VGAP;
myCompareButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight, myCompareButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Compare" + ELLIPSIS, kCmpCmd); "Compare" + ELLIPSIS, kCmpCmd);
myCompareButton->setHelpAnchor("M6532Search", true);
myCompareButton->setToolTip("Compare highlighted values."); myCompareButton->setToolTip("Compare highlighted values.");
wid.push_back(myCompareButton); wid.push_back(myCompareButton);
myCompareButton->setTarget(this); myCompareButton->setTarget(this);
@ -92,6 +98,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
by += bheight + VGAP; by += bheight + VGAP;
myRestartButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight, myRestartButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Reset", kRestartCmd); "Reset", kRestartCmd);
myRestartButton->setHelpAnchor("M6532Search", true);
myRestartButton->setToolTip("Reset search/compare mode."); myRestartButton->setToolTip("Reset search/compare mode.");
wid.push_back(myRestartButton); wid.push_back(myRestartButton);
myRestartButton->setTarget(this); myRestartButton->setTarget(this);
@ -135,6 +142,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
s = new StaticTextWidget(boss, lfont, xpos, ypos, "%"); s = new StaticTextWidget(boss, lfont, xpos, ypos, "%");
myBinValue = new DataGridWidget(boss, nfont, s->getRight() + myFontWidth * 0.1, ypos-2, myBinValue = new DataGridWidget(boss, nfont, s->getRight() + myFontWidth * 0.1, ypos-2,
1, 1, 8, 8, Common::Base::Fmt::_2); 1, 1, 8, 8, Common::Base::Fmt::_2);
myBinValue->setHelpAnchor(helpAnchor, true);
myBinValue->setTarget(this); myBinValue->setTarget(this);
myBinValue->setID(kRamBinID); myBinValue->setID(kRamBinID);
@ -143,6 +151,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
s = new StaticTextWidget(boss, lfont, xpos, ypos, "#"); s = new StaticTextWidget(boss, lfont, xpos, ypos, "#");
myDecValue = new DataGridWidget(boss, nfont, s->getRight(), ypos-2, myDecValue = new DataGridWidget(boss, nfont, s->getRight(), ypos-2,
1, 1, 3, 8, Common::Base::Fmt::_10); 1, 1, 3, 8, Common::Base::Fmt::_10);
myDecValue->setHelpAnchor(helpAnchor, true);
myDecValue->setTarget(this); myDecValue->setTarget(this);
myDecValue->setID(kRamDecID); myDecValue->setID(kRamDecID);
@ -150,6 +159,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
xpos -= 4.5 * myFontWidth; xpos -= 4.5 * myFontWidth;
myHexValue = new DataGridWidget(boss, nfont, xpos, ypos - 2, myHexValue = new DataGridWidget(boss, nfont, xpos, ypos - 2,
1, 1, 2, 8, Common::Base::Fmt::_16); 1, 1, 2, 8, Common::Base::Fmt::_16);
myHexValue->setHelpAnchor(helpAnchor, true);
myHexValue->setTarget(this); myHexValue->setTarget(this);
myHexValue->setID(kRamHexID); myHexValue->setID(kRamHexID);

View File

@ -35,7 +35,8 @@ class RamWidget : public Widget, public CommandSender
public: public:
RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont, RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
uInt32 ramsize, uInt32 numrows, uInt32 pagesize); uInt32 ramsize, uInt32 numrows, uInt32 pagesize,
const string& helpAnchor);
~RamWidget() override; ~RamWidget() override;
void loadConfig() override; void loadConfig() override;

View File

@ -24,9 +24,10 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RiotRamWidget::RiotRamWidget(GuiObject* boss, const GUI::Font& lfont, RiotRamWidget::RiotRamWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont, int x, int y, int w) const GUI::Font& nfont, int x, int y, int w)
: RamWidget(boss, lfont, nfont, x, y, w, 0, 128, 8, 128), : RamWidget(boss, lfont, nfont, x, y, w, 0, 128, 8, 128, "M6532"),
myDbg{instance().debugger().cartDebug()} myDbg{instance().debugger().cartDebug()}
{ {
// setHelpAnchor("M6532"); TODO: does not work due to use of "boss" insted of "this"
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -