2005-08-30 17:51:26 +00:00
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// SSSS tt lll lll
|
|
|
|
// SS SS tt ll ll
|
|
|
|
// SS tttttt eeee ll ll aaaa
|
|
|
|
// SSSS tt ee ee ll ll aa
|
|
|
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
|
|
|
// SS SS tt ee ll ll aa aa
|
|
|
|
// SSSS ttt eeeee llll llll aaaaa
|
|
|
|
//
|
2015-12-29 19:22:46 +00:00
|
|
|
// Copyright (c) 1995-2016 by Bradford W. Mott, Stephen Anthony
|
2010-04-10 21:37:23 +00:00
|
|
|
// and the Stella Team
|
2005-08-30 17:51:26 +00:00
|
|
|
//
|
2010-01-10 03:23:32 +00:00
|
|
|
// See the file "License.txt" for information on usage and redistribution of
|
2005-08-30 17:51:26 +00:00
|
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
//
|
2009-05-13 13:55:40 +00:00
|
|
|
// $Id$
|
2005-08-30 17:51:26 +00:00
|
|
|
//============================================================================
|
|
|
|
|
2007-09-03 18:37:24 +00:00
|
|
|
#include "DataGridWidget.hxx"
|
|
|
|
#include "EditTextWidget.hxx"
|
2005-08-30 17:51:26 +00:00
|
|
|
#include "GuiObject.hxx"
|
|
|
|
#include "InputTextDialog.hxx"
|
2007-09-03 18:37:24 +00:00
|
|
|
#include "OSystem.hxx"
|
OK, this is the first pass at a huge reorganization of the debugger
classes. First off, the distella code has been integrated into a
DiStella class. This code isn't yet tied to the debugger, but it does
at least compile and generate valid output.
The RamDebug class has been replaced by a CartDebug class, which
takes responsibility for the previous RamDebug stuff as well as
things related to Cart address space (read from write ports,
disassembly, etc).
Fixed E7 bankswitching when reading from the write port in the upper
256byte area.
Fixed 'read from write port functionality' in general for all carts
that supported it previously. Basically, if _rwport is enabled, the
address is checked to be an actual read (vs. one that's part of a
normal write cycle), *and* it's actually an illegal access (each
cart/bankswitch type now provides a hint to indicate this condition).
Still TODO is clean up the rework, properly integrate DiStella, and
fix labels and defines (which seem to be completely broken).
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1922 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-01-17 16:48:45 +00:00
|
|
|
#include "CartDebug.hxx"
|
2007-09-03 18:37:24 +00:00
|
|
|
#include "Widget.hxx"
|
|
|
|
|
2005-08-30 17:51:26 +00:00
|
|
|
#include "RamWidget.hxx"
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2013-08-26 13:01:29 +00:00
|
|
|
RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
|
2015-09-07 23:12:00 +00:00
|
|
|
int x, int y, int w, int h,
|
|
|
|
uInt32 ramsize, uInt32 numrows, uInt32 pagesize)
|
|
|
|
: Widget(boss, lfont, x, y, w, h),
|
2005-08-30 17:51:26 +00:00
|
|
|
CommandSender(boss),
|
2015-09-07 23:12:00 +00:00
|
|
|
_nfont(nfont),
|
|
|
|
myFontWidth(lfont.getMaxCharWidth()),
|
|
|
|
myFontHeight(lfont.getFontHeight()),
|
|
|
|
myLineHeight(lfont.getLineHeight()),
|
|
|
|
myButtonHeight(myLineHeight + 4),
|
|
|
|
myCurrentRamBank(0),
|
|
|
|
myRamSize(ramsize),
|
|
|
|
myNumRows(numrows),
|
|
|
|
myPageSize(pagesize)
|
2005-08-30 17:51:26 +00:00
|
|
|
{
|
2015-09-07 23:12:00 +00:00
|
|
|
const int bwidth = lfont.getStringWidth("Compare "),
|
|
|
|
bheight = myLineHeight + 2;
|
|
|
|
|
2015-09-12 18:51:35 +00:00
|
|
|
int ypos = y + myLineHeight;
|
2005-08-30 17:51:26 +00:00
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
// Add RAM grid (with scrollbar)
|
2015-09-12 18:51:35 +00:00
|
|
|
int xpos = x + _font.getStringWidth("xxxx");
|
2015-09-07 23:12:00 +00:00
|
|
|
myRamGrid = new DataGridWidget(_boss, _nfont, xpos, ypos,
|
|
|
|
16, myNumRows, 2, 8, Common::Base::F_16, true);
|
2005-08-30 17:51:26 +00:00
|
|
|
myRamGrid->setTarget(this);
|
2015-09-07 23:12:00 +00:00
|
|
|
myRamGrid->setID(kRamHexID);
|
2005-08-30 17:51:26 +00:00
|
|
|
addFocusWidget(myRamGrid);
|
|
|
|
|
|
|
|
// Create actions buttons to the left of the RAM grid
|
2015-09-07 23:12:00 +00:00
|
|
|
int bx = xpos + myRamGrid->getWidth() + 4;
|
|
|
|
int by = ypos;
|
|
|
|
myUndoButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
|
Huge GUI-related changes. The GUI in launcher/options/command modes
is now fully navigable via the keyboard be means of 'tab-like'
functionality. This means that eventually systems without a keyboard
will also be able to navigate the interface without resorting to the
buggy joymouse code (which is soon to be removed).
Laid the infrastructure for remapping GUI events, whereby (for example)
a widget checks for Event::UISelect for 'doing its thing', vs. looking
at the Enter/Return key. So widgets now respond to events, and events
can (eventually) be remapped to *any* device.
Currently, these UI events are as follows:
UIUp, UIDown, UILeft, UIRight, UIHome, UIEnd, UIPgUp, UIPgDown,
UIPrevDir, UINavNext, UINavPrev, UITabNext, UITabPrev, UISelect
At present, they're hardcoded to key events only, so pressing 'Return'
will send a UISelect, cursor up a UIUp, etc. When the remapping code
is complete, *any* input will be able to send these events, and that
remapping will be distinct from emulation mode. So, for example,
cursor up in GUI mode might generate a UIUp event, but in emulation
mode might generate a left joystick up event.
Modified 'tab' key while in emulation mode to only enter the options
menu. Once inside the menu, the tab key acts as navigation between
elements, and exiting the options menu requires navigating to the
'Exit menu' button.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1100 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-05-04 17:45:25 +00:00
|
|
|
"Undo", kUndoCmd);
|
2005-08-30 17:51:26 +00:00
|
|
|
myUndoButton->setTarget(this);
|
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
by += bheight + 4;
|
|
|
|
myRevertButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
|
2013-04-17 15:00:32 +00:00
|
|
|
"Revert", kRevertCmd);
|
2005-08-30 17:51:26 +00:00
|
|
|
myRevertButton->setTarget(this);
|
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
by += 2 * bheight + 2;
|
|
|
|
mySearchButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
|
2013-04-17 15:00:32 +00:00
|
|
|
"Search", kSearchCmd);
|
2005-08-30 17:51:26 +00:00
|
|
|
mySearchButton->setTarget(this);
|
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
by += bheight + 4;
|
|
|
|
myCompareButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
|
2013-04-17 15:00:32 +00:00
|
|
|
"Compare", kCmpCmd);
|
2005-08-30 17:51:26 +00:00
|
|
|
myCompareButton->setTarget(this);
|
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
by += bheight + 4;
|
|
|
|
myRestartButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
|
2013-04-17 15:00:32 +00:00
|
|
|
"Reset", kRestartCmd);
|
2005-08-30 17:51:26 +00:00
|
|
|
myRestartButton->setTarget(this);
|
|
|
|
|
|
|
|
// Labels for RAM grid
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
myRamStart =
|
2015-09-07 23:12:00 +00:00
|
|
|
new StaticTextWidget(_boss, lfont, xpos - _font.getStringWidth("xxxx"),
|
|
|
|
ypos - myLineHeight,
|
|
|
|
lfont.getStringWidth("xxxx"), myFontHeight,
|
|
|
|
"00xx", kTextAlignLeft);
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
|
2005-08-30 17:51:26 +00:00
|
|
|
for(int col = 0; col < 16; ++col)
|
|
|
|
{
|
2015-09-07 23:12:00 +00:00
|
|
|
new StaticTextWidget(_boss, lfont, xpos + col*myRamGrid->colWidth() + 8,
|
|
|
|
ypos - myLineHeight,
|
|
|
|
myFontWidth, myFontHeight,
|
2013-07-27 22:28:41 +00:00
|
|
|
Common::Base::toString(col, Common::Base::F_16_1),
|
2006-02-22 17:38:04 +00:00
|
|
|
kTextAlignLeft);
|
2005-08-30 17:51:26 +00:00
|
|
|
}
|
2015-09-07 23:12:00 +00:00
|
|
|
|
|
|
|
uInt32 row;
|
|
|
|
for(row = 0; row < myNumRows; ++row)
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
{
|
|
|
|
myRamLabels[row] =
|
2015-09-07 23:12:00 +00:00
|
|
|
new StaticTextWidget(_boss, _font, xpos - _font.getStringWidth("x "),
|
|
|
|
ypos + row*myLineHeight + 2,
|
|
|
|
myFontWidth, myFontHeight, "", kTextAlignLeft);
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
}
|
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
// For smaller grids, make sure RAM cell detail fields are below the RESET button
|
|
|
|
row = myNumRows < 8 ? 9 : myNumRows + 1;
|
|
|
|
ypos += row * myLineHeight;
|
2013-08-19 15:23:33 +00:00
|
|
|
|
|
|
|
// We need to define these widgets from right to left since the leftmost
|
|
|
|
// one resizes as much as possible
|
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
// Add Binary display of selected RAM cell
|
|
|
|
xpos = x + w - 13*myFontWidth - 20;
|
|
|
|
new StaticTextWidget(boss, lfont, xpos, ypos, 4*myFontWidth, myFontHeight,
|
|
|
|
"Bin:", kTextAlignLeft);
|
|
|
|
myBinValue = new DataGridWidget(boss, nfont, xpos + 4*myFontWidth + 5, ypos-2,
|
|
|
|
1, 1, 8, 8, Common::Base::F_2);
|
|
|
|
myBinValue->setTarget(this);
|
|
|
|
myBinValue->setID(kRamBinID);
|
|
|
|
|
|
|
|
// Add Decimal display of selected RAM cell
|
|
|
|
xpos -= 8*myFontWidth + 5 + 20;
|
|
|
|
new StaticTextWidget(boss, lfont, xpos, ypos, 4*myFontWidth, myFontHeight,
|
2013-08-19 15:23:33 +00:00
|
|
|
"Dec:", kTextAlignLeft);
|
2015-09-07 23:12:00 +00:00
|
|
|
myDecValue = new DataGridWidget(boss, nfont, xpos + 4*myFontWidth + 5, ypos-2,
|
|
|
|
1, 1, 3, 8, Common::Base::F_10);
|
|
|
|
myDecValue->setTarget(this);
|
|
|
|
myDecValue->setID(kRamDecID);
|
2013-08-19 15:23:33 +00:00
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
addFocusWidget(myDecValue);
|
|
|
|
addFocusWidget(myBinValue);
|
|
|
|
|
|
|
|
// Add Label of selected RAM cell
|
|
|
|
int xpos_r = xpos - 20;
|
2013-08-19 15:23:33 +00:00
|
|
|
xpos = x + 10;
|
2015-09-07 23:12:00 +00:00
|
|
|
new StaticTextWidget(boss, lfont, xpos, ypos, 6*myFontWidth, myFontHeight,
|
2006-02-22 17:38:04 +00:00
|
|
|
"Label:", kTextAlignLeft);
|
2015-09-07 23:12:00 +00:00
|
|
|
xpos += 6*myFontWidth + 5;
|
2013-08-26 13:01:29 +00:00
|
|
|
myLabel = new EditTextWidget(boss, nfont, xpos, ypos-2, xpos_r-xpos,
|
2015-09-07 23:12:00 +00:00
|
|
|
myLineHeight);
|
2005-08-30 17:51:26 +00:00
|
|
|
myLabel->setEditable(false);
|
|
|
|
|
|
|
|
// Inputbox which will pop up when searching RAM
|
2015-09-07 23:12:00 +00:00
|
|
|
StringList labels = { "Search: " };
|
2014-11-09 04:01:31 +00:00
|
|
|
myInputBox = make_ptr<InputTextDialog>(boss, lfont, nfont, labels);
|
2005-08-30 17:51:26 +00:00
|
|
|
myInputBox->setTarget(this);
|
|
|
|
|
|
|
|
// Start with these buttons disabled
|
|
|
|
myCompareButton->clearFlags(WIDGET_ENABLED);
|
|
|
|
myRestartButton->clearFlags(WIDGET_ENABLED);
|
2015-09-07 23:12:00 +00:00
|
|
|
|
|
|
|
// Calculate final height
|
|
|
|
if(_h == 0) _h = ypos + myLineHeight - y;
|
2005-08-30 17:51:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void RamWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
|
|
|
{
|
2009-06-03 14:49:42 +00:00
|
|
|
// We simply change the values in the DataGridWidget
|
2005-08-30 17:51:26 +00:00
|
|
|
// It will then send the 'kDGItemDataChangedCmd' signal to change the actual
|
|
|
|
// memory location
|
2015-09-14 18:14:00 +00:00
|
|
|
int addr = 0, value = 0;
|
2005-08-30 17:51:26 +00:00
|
|
|
|
|
|
|
switch(cmd)
|
|
|
|
{
|
2013-04-20 22:23:42 +00:00
|
|
|
case DataGridWidget::kItemDataChangedCmd:
|
2009-06-04 09:54:18 +00:00
|
|
|
{
|
2015-09-07 23:12:00 +00:00
|
|
|
switch(id)
|
2009-06-04 09:54:18 +00:00
|
|
|
{
|
2015-09-07 23:12:00 +00:00
|
|
|
case kRamHexID:
|
|
|
|
addr = myRamGrid->getSelectedAddr();
|
|
|
|
value = myRamGrid->getSelectedValue();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case kRamDecID:
|
|
|
|
addr = myRamGrid->getSelectedAddr();
|
|
|
|
value = myDecValue->getSelectedValue();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case kRamBinID:
|
|
|
|
addr = myRamGrid->getSelectedAddr();
|
|
|
|
value = myBinValue->getSelectedValue();
|
|
|
|
break;
|
2009-06-04 09:54:18 +00:00
|
|
|
}
|
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
uInt8 oldval = getValue(addr);
|
|
|
|
setValue(addr, value);
|
|
|
|
|
2005-08-30 17:51:26 +00:00
|
|
|
myUndoAddress = addr;
|
2009-06-04 09:54:18 +00:00
|
|
|
myUndoValue = oldval;
|
2005-08-30 17:51:26 +00:00
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
myRamGrid->setValueInternal(addr - myCurrentRamBank*myPageSize, value, true);
|
|
|
|
myDecValue->setValueInternal(0, value, true);
|
|
|
|
myBinValue->setValueInternal(0, value, true);
|
|
|
|
|
2005-08-30 17:51:26 +00:00
|
|
|
myRevertButton->setEnabled(true);
|
|
|
|
myUndoButton->setEnabled(true);
|
|
|
|
break;
|
2009-06-04 09:54:18 +00:00
|
|
|
}
|
2005-08-30 17:51:26 +00:00
|
|
|
|
2013-04-20 22:23:42 +00:00
|
|
|
case DataGridWidget::kSelectionChangedCmd:
|
2008-02-24 16:51:52 +00:00
|
|
|
{
|
2005-08-30 17:51:26 +00:00
|
|
|
addr = myRamGrid->getSelectedAddr();
|
|
|
|
value = myRamGrid->getSelectedValue();
|
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
myLabel->setText(getLabel(addr));
|
|
|
|
myDecValue->setValueInternal(0, value, false);
|
|
|
|
myBinValue->setValueInternal(0, value, false);
|
2005-08-30 17:51:26 +00:00
|
|
|
break;
|
2008-02-24 16:51:52 +00:00
|
|
|
}
|
2005-08-30 17:51:26 +00:00
|
|
|
|
|
|
|
case kRevertCmd:
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
for(uInt32 i = 0; i < myOldValueList.size(); ++i)
|
2015-09-07 23:12:00 +00:00
|
|
|
setValue(i, myOldValueList[i]);
|
2005-08-30 17:51:26 +00:00
|
|
|
fillGrid(true);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case kUndoCmd:
|
2015-09-07 23:12:00 +00:00
|
|
|
setValue(myUndoAddress, myUndoValue);
|
2005-08-30 17:51:26 +00:00
|
|
|
myUndoButton->setEnabled(false);
|
|
|
|
fillGrid(false);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case kSearchCmd:
|
2008-06-19 19:15:44 +00:00
|
|
|
showInputBox(kSValEntered);
|
2005-08-30 17:51:26 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case kCmpCmd:
|
2008-06-19 19:15:44 +00:00
|
|
|
showInputBox(kCValEntered);
|
2005-08-30 17:51:26 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case kRestartCmd:
|
|
|
|
doRestart();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case kSValEntered:
|
|
|
|
{
|
|
|
|
const string& result = doSearch(myInputBox->getResult());
|
|
|
|
if(result != "")
|
|
|
|
myInputBox->setTitle(result);
|
|
|
|
else
|
2013-07-30 21:43:20 +00:00
|
|
|
myInputBox->close();
|
2005-08-30 17:51:26 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case kCValEntered:
|
|
|
|
{
|
|
|
|
const string& result = doCompare(myInputBox->getResult());
|
|
|
|
if(result != "")
|
|
|
|
myInputBox->setTitle(result);
|
|
|
|
else
|
2013-07-30 21:43:20 +00:00
|
|
|
myInputBox->close();
|
2005-08-30 17:51:26 +00:00
|
|
|
break;
|
|
|
|
}
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
|
|
|
|
case kSetPositionCmd:
|
|
|
|
myCurrentRamBank = data;
|
|
|
|
showSearchResults();
|
|
|
|
fillGrid(false);
|
|
|
|
break;
|
2005-08-30 17:51:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-18 18:39:57 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void RamWidget::setOpsWidget(DataGridOpsWidget* w)
|
|
|
|
{
|
|
|
|
myRamGrid->setOpsWidget(w);
|
2015-09-07 23:12:00 +00:00
|
|
|
myBinValue->setOpsWidget(w);
|
|
|
|
myDecValue->setOpsWidget(w);
|
2010-10-18 18:39:57 +00:00
|
|
|
}
|
|
|
|
|
2005-08-30 17:51:26 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void RamWidget::loadConfig()
|
|
|
|
{
|
|
|
|
fillGrid(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void RamWidget::fillGrid(bool updateOld)
|
|
|
|
{
|
|
|
|
IntArray alist;
|
|
|
|
IntArray vlist;
|
|
|
|
BoolArray changed;
|
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
uInt32 start = myCurrentRamBank * myPageSize;
|
|
|
|
fillList(start, myPageSize, alist, vlist, changed);
|
2005-08-30 17:51:26 +00:00
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
if(updateOld)
|
|
|
|
myOldValueList = currentRam(start);
|
2005-08-30 17:51:26 +00:00
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
myRamGrid->setNumRows(myRamSize / myPageSize);
|
2005-08-30 17:51:26 +00:00
|
|
|
myRamGrid->setList(alist, vlist, changed);
|
|
|
|
if(updateOld)
|
|
|
|
{
|
|
|
|
myRevertButton->setEnabled(false);
|
|
|
|
myUndoButton->setEnabled(false);
|
|
|
|
}
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
|
|
|
|
// Update RAM labels
|
2015-09-07 23:12:00 +00:00
|
|
|
uInt32 rport = readPort(start), page = rport & 0xf0;
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
char buf[5];
|
2016-04-03 00:35:00 +00:00
|
|
|
std::snprintf(buf, 5, "%04X", rport);
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
buf[2] = buf[3] = 'x';
|
|
|
|
myRamStart->setLabel(buf);
|
2015-09-07 23:12:00 +00:00
|
|
|
for(uInt32 row = 0; row < myNumRows; ++row, page += 0x10)
|
|
|
|
myRamLabels[row]->setLabel(Common::Base::toString(page>>4, Common::Base::F_16_1));
|
2005-08-30 17:51:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2008-06-19 19:15:44 +00:00
|
|
|
void RamWidget::showInputBox(int cmd)
|
|
|
|
{
|
|
|
|
// Add inputbox in the middle of the RAM widget
|
2008-12-23 18:54:05 +00:00
|
|
|
uInt32 x = getAbsX() + ((getWidth() - myInputBox->getWidth()) >> 1);
|
|
|
|
uInt32 y = getAbsY() + ((getHeight() - myInputBox->getHeight()) >> 1);
|
|
|
|
myInputBox->show(x, y);
|
2013-05-29 16:27:12 +00:00
|
|
|
myInputBox->setText("");
|
2008-06-19 19:15:44 +00:00
|
|
|
myInputBox->setTitle("");
|
|
|
|
myInputBox->setFocus(0);
|
|
|
|
myInputBox->setEmitSignal(cmd);
|
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
string RamWidget::doSearch(const string& str)
|
2005-08-30 17:51:26 +00:00
|
|
|
{
|
|
|
|
bool comparisonSearch = true;
|
|
|
|
|
|
|
|
if(str.length() == 0)
|
|
|
|
{
|
|
|
|
// An empty field means return all memory locations
|
|
|
|
comparisonSearch = false;
|
|
|
|
}
|
|
|
|
else if(str.find_first_of("+-", 0) != string::npos)
|
|
|
|
{
|
|
|
|
// Don't accept these characters here, only in compare
|
|
|
|
return "Invalid input +|-";
|
|
|
|
}
|
|
|
|
|
2008-06-13 13:14:52 +00:00
|
|
|
int searchVal = instance().debugger().stringToValue(str);
|
2005-08-30 17:51:26 +00:00
|
|
|
|
|
|
|
// Clear the search array of previous items
|
|
|
|
mySearchAddr.clear();
|
|
|
|
mySearchValue.clear();
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
mySearchState.clear();
|
2005-08-30 17:51:26 +00:00
|
|
|
|
|
|
|
// Now, search all memory locations for this value, and add it to the
|
|
|
|
// search array
|
2015-09-07 23:12:00 +00:00
|
|
|
const ByteArray& ram = currentRam(0);
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
bool hitfound = false;
|
2015-09-07 23:12:00 +00:00
|
|
|
for(uInt32 addr = 0; addr < ram.size(); ++addr)
|
2005-08-30 17:51:26 +00:00
|
|
|
{
|
2015-09-07 23:12:00 +00:00
|
|
|
int value = ram[addr];
|
2005-08-30 17:51:26 +00:00
|
|
|
if(comparisonSearch && searchVal != value)
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
{
|
|
|
|
mySearchState.push_back(false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
mySearchAddr.push_back(addr);
|
|
|
|
mySearchValue.push_back(value);
|
|
|
|
mySearchState.push_back(true);
|
|
|
|
hitfound = true;
|
|
|
|
}
|
2005-08-30 17:51:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// If we have some hits, enable the comparison methods
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
if(hitfound)
|
2005-08-30 17:51:26 +00:00
|
|
|
{
|
|
|
|
mySearchButton->setEnabled(false);
|
|
|
|
myCompareButton->setEnabled(true);
|
|
|
|
myRestartButton->setEnabled(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Finally, show the search results in the list
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
showSearchResults();
|
2005-08-30 17:51:26 +00:00
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
return EmptyString;
|
2005-08-30 17:51:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2008-06-19 19:15:44 +00:00
|
|
|
string RamWidget::doCompare(const string& str)
|
2005-08-30 17:51:26 +00:00
|
|
|
{
|
|
|
|
bool comparitiveSearch = false;
|
|
|
|
int searchVal = 0, offset = 0;
|
|
|
|
|
|
|
|
if(str.length() == 0)
|
|
|
|
return "Enter an absolute or comparitive value";
|
|
|
|
|
|
|
|
// Do some pre-processing on the string
|
|
|
|
string::size_type pos = str.find_first_of("+-", 0);
|
|
|
|
if(pos > 0 && pos != string::npos)
|
|
|
|
{
|
|
|
|
// Only accept '+' or '-' at the start of the string
|
|
|
|
return "Input must be [+|-]NUM";
|
|
|
|
}
|
|
|
|
|
|
|
|
// A comparitive search searches memory for locations that have changed by
|
|
|
|
// the specified amount, vs. for exact values
|
|
|
|
if(str[0] == '+' || str[0] == '-')
|
|
|
|
{
|
|
|
|
comparitiveSearch = true;
|
|
|
|
bool negative = false;
|
|
|
|
if(str[0] == '-')
|
|
|
|
negative = true;
|
|
|
|
|
|
|
|
string tmp = str;
|
|
|
|
tmp.erase(0, 1); // remove the operator
|
2008-06-13 13:14:52 +00:00
|
|
|
offset = instance().debugger().stringToValue(tmp);
|
2005-08-30 17:51:26 +00:00
|
|
|
if(negative)
|
|
|
|
offset = -offset;
|
|
|
|
}
|
|
|
|
else
|
2008-06-13 13:14:52 +00:00
|
|
|
searchVal = instance().debugger().stringToValue(str);
|
2005-08-30 17:51:26 +00:00
|
|
|
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
// Now, search all memory locations previously 'found' for this value
|
2015-09-07 23:12:00 +00:00
|
|
|
const ByteArray& ram = currentRam(0);
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
bool hitfound = false;
|
2006-03-29 13:53:00 +00:00
|
|
|
IntArray tempAddrList, tempValueList;
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
mySearchState.clear();
|
2015-09-07 23:12:00 +00:00
|
|
|
for(uInt32 i = 0; i < ram.size(); ++i)
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
mySearchState.push_back(false);
|
|
|
|
|
2014-11-17 14:17:19 +00:00
|
|
|
for(uInt32 i = 0; i < mySearchAddr.size(); ++i)
|
2005-08-30 17:51:26 +00:00
|
|
|
{
|
|
|
|
if(comparitiveSearch)
|
|
|
|
{
|
|
|
|
searchVal = mySearchValue[i] + offset;
|
|
|
|
if(searchVal < 0 || searchVal > 255)
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
int addr = mySearchAddr[i];
|
2015-09-07 23:12:00 +00:00
|
|
|
if(ram[addr] == searchVal)
|
2006-03-29 13:53:00 +00:00
|
|
|
{
|
|
|
|
tempAddrList.push_back(addr);
|
|
|
|
tempValueList.push_back(searchVal);
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
mySearchState[addr] = hitfound = true;
|
2006-03-29 13:53:00 +00:00
|
|
|
}
|
2005-08-30 17:51:26 +00:00
|
|
|
}
|
|
|
|
|
2006-03-29 13:53:00 +00:00
|
|
|
// Update the searchArray for the new addresses and data
|
|
|
|
mySearchAddr = tempAddrList;
|
|
|
|
mySearchValue = tempValueList;
|
2005-08-30 17:51:26 +00:00
|
|
|
|
|
|
|
// If we have some hits, enable the comparison methods
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
if(hitfound)
|
2005-08-30 17:51:26 +00:00
|
|
|
{
|
|
|
|
myCompareButton->setEnabled(true);
|
|
|
|
myRestartButton->setEnabled(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Finally, show the search results in the list
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
showSearchResults();
|
2005-08-30 17:51:26 +00:00
|
|
|
|
2015-09-07 23:12:00 +00:00
|
|
|
return EmptyString;
|
2005-08-30 17:51:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void RamWidget::doRestart()
|
|
|
|
{
|
|
|
|
// Erase all search buffers, reset to start mode
|
|
|
|
mySearchAddr.clear();
|
|
|
|
mySearchValue.clear();
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
mySearchState.clear();
|
|
|
|
showSearchResults();
|
2005-08-30 17:51:26 +00:00
|
|
|
|
|
|
|
mySearchButton->setEnabled(true);
|
|
|
|
myCompareButton->setEnabled(false);
|
|
|
|
myRestartButton->setEnabled(false);
|
|
|
|
}
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void RamWidget::showSearchResults()
|
|
|
|
{
|
|
|
|
// Only update the search results for the bank currently being shown
|
|
|
|
BoolArray temp;
|
2015-09-07 23:12:00 +00:00
|
|
|
uInt32 start = myCurrentRamBank * myPageSize;
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
if(mySearchState.size() == 0 || start > mySearchState.size())
|
|
|
|
{
|
2015-09-07 23:12:00 +00:00
|
|
|
for(uInt32 i = 0; i < myPageSize; ++i)
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
temp.push_back(false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-09-07 23:12:00 +00:00
|
|
|
for(uInt32 i = start; i < start + myPageSize; ++i)
|
Added support for accessing/modifying extended RAM (aka SuperChip) from
the debugger RAM UI. A scrollbar is now present, which can scroll
through each 128 byte 'bank'. Labels indicate the current readport,
so you can distinguish between different areas of RAM. For now,
F4SC, F6SC, F8SC, and FASC have been converted, but I'm looking into the
other schemes now.
The RAM UI takes care of all read/write port issues. From the POV of
the UI, the RAM can be treated as zero-page; translation is done
behind the scene. Searching/comparing and change-tracking are also
supported.
The 'ram' command in the debugger prompt now reflects all RAM, and
readport/writeport addresses are shown, making it easier to use the
command withot having to look up the offsets.
Debugger width has been bumped to 1050 pixels wide to accomodate the
new functionality. We'll see how much trouble this causes ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1747 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-06-02 17:25:14 +00:00
|
|
|
temp.push_back(mySearchState[i]);
|
|
|
|
}
|
|
|
|
myRamGrid->setHiliteList(temp);
|
|
|
|
}
|