Added 'savesnap' debugger command, on the request of Spice from AtariAge.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2825 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2013-09-12 22:37:01 +00:00
parent 498a996815
commit c5f011f1fe
5 changed files with 33 additions and 4 deletions

View File

@ -12,6 +12,15 @@
Release History
===========================================================================
3.9.2 to 3.9.3: (xxxx xx, 2013)
* Added 'savesnap' debugger prompt command, and also associated
context menu item to the debugger TIA output area. This saves the
current TIA image to a PNG file.
-Have fun!
3.9.1 to 3.9.2: (August 31, 2013)
* Improved parsing of the DASM lst file for the debugger disassembly;
@ -35,8 +44,6 @@
mouse wheel (currently up/down only, as I don't have a sideways
scrolling mouse to test with).
-Have fun!
3.9 to 3.9.1: (August 21, 2013)

View File

@ -22,7 +22,7 @@
#include <cstdlib>
#define STELLA_VERSION "3.9.2"
#define STELLA_VERSION "3.9.3_svn"
#define STELLA_BUILD atoi("$Rev$" + 6)
#endif

View File

@ -1428,6 +1428,13 @@ void DebuggerParser::executeSaveses()
commandResult << red("I/O error");
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// "savesnap"
void DebuggerParser::executeSavesnap()
{
debugger.myOSystem->eventHandler().takeSnapshot();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// "savestate"
void DebuggerParser::executeSavestate()
@ -2090,6 +2097,15 @@ DebuggerParser::Command DebuggerParser::commands[kNumCommands] = {
&DebuggerParser::executeSaveses
},
{
"savesnap",
"Save current TIA image to PNG file",
false,
false,
{ kARG_END_ARGS },
&DebuggerParser::executeSavesnap
},
{
"savestate",
"Save emulator state xx (valid args 0-9)",

View File

@ -72,7 +72,7 @@ class DebuggerParser
private:
enum {
kNumCommands = 70,
kNumCommands = 71,
kMAX_ARG_TYPES = 10
};
@ -179,6 +179,7 @@ class DebuggerParser
void executeSavedisassembly();
void executeSaverom();
void executeSaveses();
void executeSavesnap();
void executeSavestate();
void executeScanline();
void executeStep();

View File

@ -45,6 +45,7 @@ TiaOutputWidget::TiaOutputWidget(GuiObject* boss, const GUI::Font& font,
l.push_back("Fill to scanline", "scanline");
l.push_back("Set breakpoint", "bp");
l.push_back("Set zoom position", "zoom");
l.push_back("Save snapshot", "snap");
l.push_back("Toggle fixed debug colors (from beam pos)", "fixed");
myMenu = new ContextMenu(this, font, l);
}
@ -110,6 +111,10 @@ void TiaOutputWidget::handleCommand(CommandSender* sender, int cmd, int data, in
if(myZoom)
myZoom->setPos(myClickX, myClickY);
}
else if(rmb == "snap")
{
instance().debugger().parser().run("savesnap");
}
else if(rmb == "fixed")
{
instance().console().tia().toggleFixedColors();