mirror of https://github.com/stella-emu/stella.git
Added 'dis.relocate' commandline argument, which passes the
Distella '-r' option (Relocate calls out of address range) to the disassembler core. Also added UI item to dynamically change the setting. Renamed 'resolvedata', 'showaddr' and 'gfxformat' commandline arguments to start with 'dis', indicating that they're part of the disassembler. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2504 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
60912d6f38
commit
01d8c298ae
|
@ -40,13 +40,18 @@
|
||||||
a multi-file archive before using each ROM. Thanks go to Roland
|
a multi-file archive before using each ROM. Thanks go to Roland
|
||||||
Schabenberger (webOS maintainer) for this idea and sample code.
|
Schabenberger (webOS maintainer) for this idea and sample code.
|
||||||
|
|
||||||
* Fixed several bugs in debugger disassembly:
|
* Several improvements to the debugger/disassembler:
|
||||||
|
- The 'resolvedata', 'showaddr' and 'gfxformat' commandline
|
||||||
|
arguments are renamed to start with 'dis', indicating that
|
||||||
|
they're used with the built-in disassembler.
|
||||||
- Zero-page code addresses no longer have their high-byte
|
- Zero-page code addresses no longer have their high-byte
|
||||||
truncated, and system equates (TIA and I/O registers) are now
|
truncated, and system equates (TIA and I/O registers) are now
|
||||||
properly marked as such.
|
properly marked as such.
|
||||||
- The Distella '-r' option (Relocate calls out of address range)
|
- The Distella '-r' option (Relocate calls out of address range)
|
||||||
is no longer the default, resulting in output more consistent
|
is no longer the default, resulting in output more consistent
|
||||||
with normal usage of Distella.
|
with normal usage of Distella. Related to this, added the
|
||||||
|
'-dis.relocate' commandline argument (and associated UI item)
|
||||||
|
to toggle this dynamically.
|
||||||
|
|
||||||
* Fixed bug in EFSC bankswitch scheme state saving; the Superchip RAM
|
* Fixed bug in EFSC bankswitch scheme state saving; the Superchip RAM
|
||||||
wasn't actually being loaded and saved to state files.
|
wasn't actually being loaded and saved to state files.
|
||||||
|
|
|
@ -1084,7 +1084,7 @@ graphically differentiate between RAM and ROM areas.</p>
|
||||||
<p>The ROM listing also contains a context menu, accessible by right-clicking
|
<p>The ROM listing also contains a context menu, accessible by right-clicking
|
||||||
anywhere in the listing:</p>
|
anywhere in the listing:</p>
|
||||||
<p><img src="graphics/debugger_romcmenu.png"></p>
|
<p><img src="graphics/debugger_romcmenu.png"></p>
|
||||||
<p>Currently, there are three options:</p>
|
<p>The following options are available:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>Save ROM</b>: A textbox will appear for you to enter filename,
|
<li><b>Save ROM</b>: A textbox will appear for you to enter filename,
|
||||||
and then the ROM will be saved. Note that the filename is considered
|
and then the ROM will be saved. Note that the filename is considered
|
||||||
|
@ -1103,6 +1103,9 @@ addresses.</li>
|
||||||
<li><b>Toggle GFX binary/hex</b>: Switch between editing GFX and PGFX sections
|
<li><b>Toggle GFX binary/hex</b>: Switch between editing GFX and PGFX sections
|
||||||
in either hexidecimal or binary.</li>
|
in either hexidecimal or binary.</li>
|
||||||
|
|
||||||
|
<li><b>Toggle address relocation</b>: Corresponds to the Distella '-r' option
|
||||||
|
(Relocate calls out of address range).</li>
|
||||||
|
|
||||||
<li><b>Re-disassemble</b>: Self-explanatory; force the current bank to be
|
<li><b>Re-disassemble</b>: Self-explanatory; force the current bank to be
|
||||||
disassembled, regardless of whether anything has changed.</li>
|
disassembled, regardless of whether anything has changed.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.7 KiB |
|
@ -2251,22 +2251,27 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-resolvedata <never|always|auto></pre></td>
|
<td><pre>-dis.resolvedata <never|always|auto></pre></td>
|
||||||
<td>Try to differentiate between code vs. data sections in the
|
<td>Try to differentiate between code vs. data sections in the
|
||||||
disassembler. See the Debugger section for more information.</td>
|
disassembler. See the Debugger section for more information.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-gfxformat <2|16></pre></td>
|
<td><pre>-dis.gfxformat <2|16></pre></td>
|
||||||
<td>Sets the base to use for displaying GFX sections in the disassembler.
|
<td>Sets the base to use for displaying GFX sections in the disassembler.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-showaddr <1|0></pre></td>
|
<td><pre>-dis.showaddr <1|0></pre></td>
|
||||||
<td>Shows/hides opcode addresses in the disassembler.</td>
|
<td>Shows/hides opcode addresses in the disassembler.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><pre>-dis.relocate <1|0></pre></td>
|
||||||
|
<td>Relocate calls out of address range.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-debuggerres <WxH></pre></td>
|
<td><pre>-debuggerres <WxH></pre></td>
|
||||||
<td>Set the size of the debugger window.</td>
|
<td>Set the size of the debugger window.</td>
|
||||||
|
|
|
@ -69,11 +69,11 @@ CartDebug::CartDebug(Debugger& dbg, Console& console, const OSystem& osystem)
|
||||||
|
|
||||||
// Add settings for Distella
|
// Add settings for Distella
|
||||||
DiStella::settings.gfx_format =
|
DiStella::settings.gfx_format =
|
||||||
myOSystem.settings().getInt("gfxformat") == 16 ? kBASE_16 : kBASE_2;
|
myOSystem.settings().getInt("dis.gfxformat") == 16 ? kBASE_16 : kBASE_2;
|
||||||
DiStella::settings.show_addresses =
|
DiStella::settings.show_addresses =
|
||||||
myOSystem.settings().getBool("showaddr");
|
myOSystem.settings().getBool("dis.showaddr");
|
||||||
|
DiStella::settings.rflag = myOSystem.settings().getBool("dis.relocate");
|
||||||
DiStella::settings.fflag = true; // Not currently configurable
|
DiStella::settings.fflag = true; // Not currently configurable
|
||||||
DiStella::settings.rflag = false; // Not currently configurable
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -65,9 +65,10 @@ RomListWidget::RomListWidget(GuiObject* boss, const GUI::Font& font,
|
||||||
l.push_back("Save ROM", "saverom");
|
l.push_back("Save ROM", "saverom");
|
||||||
l.push_back("Set PC", "setpc");
|
l.push_back("Set PC", "setpc");
|
||||||
l.push_back("RunTo PC", "runtopc");
|
l.push_back("RunTo PC", "runtopc");
|
||||||
l.push_back("---------------------", "");
|
l.push_back("-------------------------", "");
|
||||||
l.push_back("Toggle PC addresses", "pcaddr");
|
l.push_back("Toggle PC addresses", "pcaddr");
|
||||||
l.push_back("Toggle GFX binary/hex", "gfx");
|
l.push_back("Toggle GFX binary/hex", "gfx");
|
||||||
|
l.push_back("Toggle address relocation", "relocate");
|
||||||
l.push_back("Re-disassemble", "disasm");
|
l.push_back("Re-disassemble", "disasm");
|
||||||
myMenu = new ContextMenu(this, font, l);
|
myMenu = new ContextMenu(this, font, l);
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,8 @@ RomWidget::RomWidget(GuiObject* boss, const GUI::Font& font, int x, int y)
|
||||||
mySaveRom->setTarget(this);
|
mySaveRom->setTarget(this);
|
||||||
|
|
||||||
// By default, we try to automatically determine code vs. data sections
|
// By default, we try to automatically determine code vs. data sections
|
||||||
myResolveData->setSelected(instance().settings().getString("resolvedata"), "auto");
|
myResolveData->setSelected(
|
||||||
|
instance().settings().getString("dis.resolvedata"), "auto");
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -178,8 +179,8 @@ void RomWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||||
else if(rmb == "pcaddr")
|
else if(rmb == "pcaddr")
|
||||||
{
|
{
|
||||||
DiStella::settings.show_addresses = !DiStella::settings.show_addresses;
|
DiStella::settings.show_addresses = !DiStella::settings.show_addresses;
|
||||||
instance().settings().setString("showaddr",
|
instance().settings().setBool("dis.showaddr",
|
||||||
DiStella::settings.show_addresses ? "true" : "false");
|
DiStella::settings.show_addresses);
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
else if(rmb == "gfx")
|
else if(rmb == "gfx")
|
||||||
|
@ -187,15 +188,22 @@ void RomWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||||
if(DiStella::settings.gfx_format == kBASE_16)
|
if(DiStella::settings.gfx_format == kBASE_16)
|
||||||
{
|
{
|
||||||
DiStella::settings.gfx_format = kBASE_2;
|
DiStella::settings.gfx_format = kBASE_2;
|
||||||
instance().settings().setString("gfxformat", "2");
|
instance().settings().setString("dis.gfxformat", "2");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DiStella::settings.gfx_format = kBASE_16;
|
DiStella::settings.gfx_format = kBASE_16;
|
||||||
instance().settings().setString("gfxformat", "16");
|
instance().settings().setString("dis.gfxformat", "16");
|
||||||
}
|
}
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
else if(rmb == "relocate")
|
||||||
|
{
|
||||||
|
DiStella::settings.rflag = !DiStella::settings.rflag;
|
||||||
|
instance().settings().setBool("dis.relocate",
|
||||||
|
DiStella::settings.rflag);
|
||||||
|
invalidate();
|
||||||
|
}
|
||||||
break; // kCMenuItemSelectedCmd
|
break; // kCMenuItemSelectedCmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +212,7 @@ void RomWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kResolveDataChanged:
|
case kResolveDataChanged:
|
||||||
instance().settings().setString("resolvedata", myResolveData->getSelectedTag());
|
instance().settings().setString("dis.resolvedata", myResolveData->getSelectedTag());
|
||||||
invalidate();
|
invalidate();
|
||||||
loadConfig();
|
loadConfig();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -136,10 +136,11 @@ Settings::Settings(OSystem* osystem)
|
||||||
setExternal("romloadcount", "0");
|
setExternal("romloadcount", "0");
|
||||||
setExternal("maxres", "");
|
setExternal("maxres", "");
|
||||||
|
|
||||||
// Debugger options
|
// Debugger disassembly options
|
||||||
setInternal("resolvedata", "auto");
|
setInternal("dis.resolvedata", "auto");
|
||||||
setInternal("gfxformat", "2");
|
setInternal("dis.gfxformat", "2");
|
||||||
setInternal("showaddr", "true");
|
setInternal("dis.showaddr", "true");
|
||||||
|
setInternal("dis.relocate", "false");
|
||||||
|
|
||||||
// Thumb ARM emulation options
|
// Thumb ARM emulation options
|
||||||
setInternal("thumb.trapfatal", "true");
|
setInternal("thumb.trapfatal", "true");
|
||||||
|
@ -438,10 +439,13 @@ void Settings::usage()
|
||||||
<< " The following options are meant for developers\n"
|
<< " The following options are meant for developers\n"
|
||||||
<< " Arguments are more fully explained in the manual\n"
|
<< " Arguments are more fully explained in the manual\n"
|
||||||
<< endl
|
<< endl
|
||||||
<< " -resolvedata <never| Set automatic code vs. data determination in the disassembler\n"
|
<< " -dis.resolvedata <never| Set automatic code vs. data determination in disassembler\n"
|
||||||
<< " always|auto>\n"
|
<< " always|\n"
|
||||||
<< " -gfxformat <2|16> Set base to use for displaying GFX sections in the disassembler\n"
|
<< " auto>\n"
|
||||||
<< " -showaddr <1|0> Show opcode addresses in the disassembler\n"
|
<< " -dis.gfxformat <2|16> Set base to use for displaying GFX sections in disassembler\n"
|
||||||
|
<< " -dis.showaddr <1|0> Show opcode addresses in disassembler\n"
|
||||||
|
<< " -dis.relocate <1|0> Relocate calls out of address range in disassembler\n"
|
||||||
|
<< endl
|
||||||
<< " -debuggerres <WxH> The resolution to use in debugger mode\n"
|
<< " -debuggerres <WxH> The resolution to use in debugger mode\n"
|
||||||
<< " -break <address> Set a breakpoint at 'address'\n"
|
<< " -break <address> Set a breakpoint at 'address'\n"
|
||||||
<< " -debug Start in debugger mode\n"
|
<< " -debug Start in debugger mode\n"
|
||||||
|
|
Loading…
Reference in New Issue