mirror of https://github.com/stella-emu/stella.git
Fixed bug in debugger rewind states are reported in the Stella tracker. It
seems that bankswitching wasn't being enabled before rewinding, and hence any bankswitching being done on state load was being ignored. This also affected the loadstate and savestate debugger commands, which weren't working for exactly the same reason. Bumped version # for impending point release. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2107 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
1b4cea5cdc
commit
0fa706c558
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <cstdlib>
|
||||
|
||||
#define STELLA_VERSION "3.2"
|
||||
#define STELLA_VERSION "3.2.1_pre"
|
||||
#define STELLA_BUILD atoi("$Rev$" + 6)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -374,13 +374,21 @@ const string Debugger::setRAM(IntArray& args)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Debugger::saveState(int state)
|
||||
{
|
||||
mySystem->clearDirtyPages();
|
||||
|
||||
unlockBankswitchState();
|
||||
myOSystem->state().saveState(state);
|
||||
lockBankswitchState();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Debugger::loadState(int state)
|
||||
{
|
||||
mySystem->clearDirtyPages();
|
||||
|
||||
unlockBankswitchState();
|
||||
myOSystem->state().loadState(state);
|
||||
lockBankswitchState();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -528,7 +536,13 @@ void Debugger::nextFrame(int frames)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool Debugger::rewindState()
|
||||
{
|
||||
return myRewindManager->rewindState();
|
||||
mySystem->clearDirtyPages();
|
||||
|
||||
unlockBankswitchState();
|
||||
bool result = myRewindManager->rewindState();
|
||||
lockBankswitchState();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -1026,10 +1026,7 @@ void DebuggerParser::executeListtraps()
|
|||
void DebuggerParser::executeLoadstate()
|
||||
{
|
||||
if(args[0] >= 0 && args[0] <= 9)
|
||||
{
|
||||
debugger->loadState(args[0]);
|
||||
commandResult << "state loaded";
|
||||
}
|
||||
else
|
||||
commandResult << red("invalid slot (must be 0-9)");
|
||||
}
|
||||
|
@ -1257,10 +1254,7 @@ void DebuggerParser::executeSaveses()
|
|||
void DebuggerParser::executeSavestate()
|
||||
{
|
||||
if(args[0] >= 0 && args[0] <= 9)
|
||||
{
|
||||
debugger->saveState(args[0]);
|
||||
commandResult << "state saved";
|
||||
}
|
||||
else
|
||||
commandResult << red("invalid slot (must be 0-9)");
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ bool PromptWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
_exitedEarly = true;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else if(result != "")
|
||||
print(result + "\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue