"Time Machine" name change

This commit is contained in:
thrust26 2017-12-15 18:10:40 +01:00
parent bf6d28e181
commit 7d40d5b1f8
23 changed files with 152 additions and 132 deletions

View File

@ -23,7 +23,7 @@
- improved cycle count (page penalties, sums created in disassembly)
- improved handling of instruction masking opcodes (e.g. BIT)
* Added "Continuous Rewind" mode, which automatically creates save states
* Added "Time Machine" mode, which automatically creates save states
in user-defined intervals. The user can navigate back and forth within
these states inside the emulator and the debugger.

View File

@ -320,7 +320,7 @@ which will undo the previous Step/Trace/Scan/Frame... advance, the smaller butto
the left bottom (labeled '>') performs the unwind operation, which will undo the
previous rewind operation. The rewind buffer is 100 levels deep by default, the
size can be configured e.g. in the
<b><a href="index.html#Debugger">Developer Settings</a> - States</b> dialog.<p>
<b><a href="index.html#Debugger">Developer Settings</a> - Time Machine</b> dialog.<p>
<p>The other operations are Step, Trace, Scan+1, Frame+1 and Exit (debugger).</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -295,7 +295,7 @@
<li>TIA emulation supports full collision checking, with ability to disable
TIA sprites and collisions for each object separately</li>
<li>Full system state save/load functionality</li>
<li>Automatic save state creation which allows moving back and forth in the recorded timeline</li>
<li>Automatic save state creation ('Time Machine') which allows moving back and forth in the recorded timeline</li>
<li>Cross-platform UI including a built-in ROM launcher frontend</li>
<li>Built-in extensive debugger, including static analysis with the Distella disassembler
and dynamic analysis at runtime by tracking code/graphics/data sections, and
@ -1613,9 +1613,9 @@
</tr>
<tr>
<td>Toggle 'Continuous Rewind' mode</td>
<td>Alt + r</td>
<td>Cmd + r</td>
<td>Toggle 'Time Machine' mode</td>
<td>Alt + t</td>
<td>Cmd + t</td>
</tr>
<tr>
@ -2313,6 +2313,11 @@
<td>Set the size of the debugger window.</td>
</tr>
<tr>
<td><pre>-dbg.fontsize &lt;small|medium|large|&gt;</pre></td>
<td>Set the font size in the debugger window.</td>
</tr>
<tr>
<td><pre>-dbg.fontstyle &lt;0|1|2|3&gt;</pre></td>
<td>How to use bold fonts in the debugger window. '0' means all normal font,
@ -2502,23 +2507,23 @@
<td><pre>-&lt;plr.|dev.&gt;debugcolors &lt;1|0&gt;</pre></td>
<td>Enable/disable the fixed debug colors.</td>
</tr><tr>
<td><pre>-&lt;plr.|dev.&gt;rewind &lt;1|0&gt;</pre></td>
<td>Enables continuous rewind</td>
<td><pre>-&lt;plr.|dev.&gt;timemachine &lt;1|0&gt;</pre></td>
<td>Enables the Time Machine</td>
</tr><tr>
<td><pre>-&lt;plr.|dev.&gt;rewind.size &lt;20 - 1000&gt;</pre></td>
<td>Defines the rewind buffer size.</td>
<td><pre>-&lt;plr.|dev.&gt;tm.size &lt;20 - 1000&gt;</pre></td>
<td>Defines the Time Machine buffer size.</td>
</tr><tr>
</tr><tr>
<td><pre>-&lt;plr.|dev.&gt;rewind.uncompressed &lt;0 - 1000&gt;</pre></td>
<td>Defines the uncompressed rewind buffer size. Must be &lt;= rewind buffer size.</td>
<td><pre>-&lt;plr.|dev.&gt;tm.uncompressed &lt;0 - 1000&gt;</pre></td>
<td>Defines the uncompressed Time Machine buffer size. Must be &lt;= Time Machine buffer size.</td>
</tr><tr>
</tr><tr>
<td><pre>-&lt;plr.|dev.&gt;rewind.interval &lt;1f|3f|10f|30f|1s|3s|10s&gt;</pre></td>
<td><pre>-&lt;plr.|dev.&gt;tm.interval &lt;1f|3f|10f|30f|1s|3s|10s&gt;</pre></td>
<td>Defines the interval between two save states.</td>
</tr><tr>
</tr><tr>
<td><pre>-&lt;plr.|dev.&gt;rewind.horizon &lt;3s|10s|30s|1m|3m|10m|30m|60m&gt;</pre></td>
<td>Defines the horizon of the rewind buffer.</td>
<td><pre>-&lt;plr.|dev.&gt;tm.horizon &lt;3s|10s|30s|1m|3m|10m|30m|60m&gt;</pre></td>
<td>Defines the horizon of the Time Machine.</td>
</tr>
</table>
</blockquote>
@ -3062,7 +3067,7 @@
<p><b>Developer Settings</b> dialog (Video):</p>
<table border="5" cellpadding="2" frame="box" rules="none">
<tr>
<td><img src="graphics/options_developer_dbgcolors.png"></td>
<td><img src="graphics/options_developer_video.png"></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td valign="top">
<table border="1" cellpadding="4">
@ -3086,48 +3091,47 @@
</tr>
</table>
<p><b>Developer Settings</b> dialog (States) <b>TODO</b></p>
<p><b>Developer Settings</b> dialog (Time Machine)</p>
<table border="5" cellpadding="2" frame="box" rules="none">
<tr>
<td><img src="graphics/options_developer_states.png"></td>
<td><img src="graphics/options_developer_timemachine.png"></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td valign="top">
<table border="1" cellpadding="4">
<tr>
<th>Item</th><th>Brief description</th><th>For more information,<br>see <a href="#CommandLine">CommandLine</a></th>
</tr><tr>
<td>Continuous rewind</td>
<td>Time Machine</td>
<td>
When continuous rewind is enabled, Stella will automatically
create new save states in the interval described below. The user
When the Time Machine is enabled, Stella will automatically
buffer save states in the interval described below. The user
can then navigate back and forth within the recorded timeline.</br>
Note: This buffer is identical with the one described in
<a href="debugger.html#GlobalButtons"><b>Debugger/Global Buttons</b></a>.
It is independent from the save states manually created
with F9.
<a href="debugger.html#GlobalButtons"><b>Debugger - Global Buttons</b></a>.
It is independent from the save states manually created with F9.
</td>
<td>-plr.rewind<br>-dev.rewind</td>
<td>-plr.timemachine<br>-dev.timemachine</td>
</tr><tr>
<td>Buffer size</td>
<td>
Defines the rewind buffer size. The larger the buffer, the less
Defines the Time Machine buffer size. The larger the buffer, the less
save states have to be compressed to reach the horizon.
</td>
<td>-plr.rewind.size<br>-dev.rewind.size</td>
<td>-plr.tm.size<br>-dev.tm.size</td>
</tr><tr>
<td>Uncompressed size</td>
<td>Uncompressed size (*)</td>
<td>
Defines the uncompressed rewind buffer size. States within this
Defines the uncompressed Time Machine buffer size. States within this
area will not be compressed and keep their initial interval.</td>
<td><span style="white-space:nowrap">-plr.rewind.uncompressed<br>-dev.rewind.uncompressed</span></td>
<td><span style="white-space:nowrap">-plr.tm.uncompressed<br>-dev.tm.uncompressed</span></td>
</tr><tr>
<td>Interval</td>
<td>Defines the interval between two save states when they are created.</td>
<td>-plr.rewind.interval<br>-dev.rewind.interval</td>
<td>-plr.tm.interval<br>-dev.tm.interval</td>
</tr><tr>
<td>Horizon</td>
<td>
Defines the horizon of the rewind buffer. A large horizon allows
Defines the horizon of the Time Machine. A large horizon allows
going back further in time. To reach the horizon, save states
will be compressed (*). This means that more and more intermediate
states will be removed and the interval between save states
@ -3136,7 +3140,7 @@
(*) Compresion only works if 'Uncompressed size' is smaller than
'Buffer size'.
</td>
<td>-plr.rewind.horizon<br>-dev.rewind.horizon</td>
<td>-plr.tm.horizon<br>-dev.tm.horizon</td>
</tr>
</table>
</td>
@ -3151,8 +3155,8 @@
<td valign="top">
<table border="1" cellpadding="4">
<tr><th>Item</th><th>Brief description</th><th>For more information,<br>see <a href="#CommandLine">CommandLine</a></th></tr>
<tr><td>Font size</td><td>Self-explanatory (requires ROM reload)</td><td>-dbg.fontsize</td></tr>
<tr><td>Font style</td><td>Self-explanatory (requires ROM reload)</td><td>-dbg.fontstyle</td></tr>
<tr><td>Font size</td><td>Self-explanatory (requires ROM reload)</td><td>N/A</td></tr>
<tr><td>Debugger width/height</td><td>Self-explanatory (requires ROM reload)</td><td>-dbg.res</td></tr>
</table>
</td>

View File

@ -35,24 +35,24 @@ RewindManager::RewindManager(OSystem& system, StateManager& statemgr)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void RewindManager::setup()
{
myLastContinuousAdd = false;
myLastTimeMachineAdd = false;
string prefix = myOSystem.settings().getBool("dev.settings") ? "dev." : "plr.";
mySize = myOSystem.settings().getInt(prefix + "rewind.size");
mySize = myOSystem.settings().getInt(prefix + "tm.size");
if(mySize != myStateList.capacity())
myStateList.resize(mySize);
myUncompressed = myOSystem.settings().getInt(prefix + "rewind.uncompressed");
myUncompressed = myOSystem.settings().getInt(prefix + "tm.uncompressed");
myInterval = INTERVAL_CYCLES[0];
for(int i = 0; i < NUM_INTERVALS; ++i)
if(INT_SETTINGS[i] == myOSystem.settings().getString(prefix + "rewind.interval"))
if(INT_SETTINGS[i] == myOSystem.settings().getString(prefix + "tm.interval"))
myInterval = INTERVAL_CYCLES[i];
myHorizon = HORIZON_CYCLES[NUM_HORIZONS-1];
for(int i = 0; i < NUM_HORIZONS; ++i)
if(HOR_SETTINGS[i] == myOSystem.settings().getString(prefix + "rewind.horizon"))
if(HOR_SETTINGS[i] == myOSystem.settings().getString(prefix + "tm.horizon"))
myHorizon = HORIZON_CYCLES[i];
// calc interval growth factor
@ -91,10 +91,10 @@ void RewindManager::setup()
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool RewindManager::addState(const string& message, bool continuous)
bool RewindManager::addState(const string& message, bool timeMachine)
{
// only check for continuous rewind states, ignore for debugger
if(continuous && myStateList.currentIsValid())
// only check for Time Machine states, ignore for debugger
if(timeMachine && myStateList.currentIsValid())
{
// check if the current state has the right interval from the last state
RewindState& lastState = myStateList.current();
@ -130,7 +130,7 @@ bool RewindManager::addState(const string& message, bool continuous)
{
state.message = message;
state.cycles = myOSystem.console().tia().cycles();
myLastContinuousAdd = continuous;
myLastTimeMachineAdd = timeMachine;
return true;
}
return false;
@ -147,14 +147,14 @@ uInt32 RewindManager::rewindState(uInt32 numStates)
{
if(!atFirst())
{
if(!myLastContinuousAdd)
if(!myLastTimeMachineAdd)
// Set internal current iterator to previous state (back in time),
// since we will now processed this state
myStateList.moveToPrevious();
else
// except fif the last state was added automatically,
// because that already happened one interval before
myLastContinuousAdd = false;
myLastTimeMachineAdd = false;
RewindState& state = myStateList.current();
Serializer& s = state.data;

View File

@ -103,7 +103,7 @@ class RewindManager
@param message Message to display when replaying this state
*/
bool addState(const string& message, bool continuous = false);
bool addState(const string& message, bool timeMachine = false);
/**
Rewind one level of the state list, and display the message associated
@ -142,7 +142,7 @@ class RewindManager
uInt32 myInterval;
uInt64 myHorizon;
double myFactor;
bool myLastContinuousAdd;
bool myLastTimeMachineAdd;
struct RewindState {
Serializer data; // actual save state

View File

@ -129,16 +129,16 @@ void StateManager::toggleRecordMode()
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void StateManager::toggleRewindMode()
void StateManager::toggleTimeMachine()
{
bool devSettings = myOSystem.settings().getBool("dev.settings");
myActiveMode = myActiveMode == Mode::Rewind ? Mode::Off : Mode::Rewind;
if(myActiveMode == Mode::Rewind)
myOSystem.frameBuffer().showMessage("Continuous rewind enabled");
myActiveMode = myActiveMode == Mode::TimeMachine ? Mode::Off : Mode::TimeMachine;
if(myActiveMode == Mode::TimeMachine)
myOSystem.frameBuffer().showMessage("Time Machine enabled");
else
myOSystem.frameBuffer().showMessage("Continuous rewind disabled");
myOSystem.settings().setValue(devSettings ? "dev.rewind" : "plr.rewind", myActiveMode == Mode::Rewind);
myOSystem.frameBuffer().showMessage("Time Machine disabled");
myOSystem.settings().setValue(devSettings ? "dev.timemachine" : "plr.timemachine", myActiveMode == Mode::TimeMachine);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -160,8 +160,8 @@ void StateManager::update()
{
switch(myActiveMode)
{
case Mode::Rewind:
myRewindManager->addState("continuous rewind", true);
case Mode::TimeMachine:
myRewindManager->addState("Time Machine", true);
break;
#if 0
@ -357,7 +357,7 @@ void StateManager::reset()
{
myRewindManager->clear();
myActiveMode = myOSystem.settings().getBool(
myOSystem.settings().getBool("dev.settings") ? "dev.rewind" : "plr.rewind") ? Mode::Rewind : Mode::Off;
myOSystem.settings().getBool("dev.settings") ? "dev.timemachine" : "plr.timemachine") ? Mode::TimeMachine : Mode::Off;
#if 0
myCurrentSlot = 0;

View File

@ -35,7 +35,7 @@ class StateManager
public:
enum class Mode {
Off,
Rewind,
TimeMachine,
MovieRecord,
MoviePlayback
};
@ -63,7 +63,7 @@ class StateManager
Toggle state rewind recording mode; this uses the RewindManager
for its functionality.
*/
void toggleRewindMode();
void toggleTimeMachine();
/**
Sets state rewind recording mode; this uses the RewindManager

View File

@ -142,6 +142,12 @@ int CpuDebug::c() const
return mySystem.m6502().C;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CpuDebug::cycles() const
{
return mySystem.m6502().cycles;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CpuDebug::setPC(int pc)
{
@ -220,6 +226,12 @@ void CpuDebug::setC(bool on)
my6502.C = on;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CpuDebug::setCycles(int cycles)
{
my6502.cycles = cycles;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CpuDebug::toggleN()
{

View File

@ -61,6 +61,8 @@ class CpuDebug : public DebuggerSystem
int z() const;
int c() const;
int cycles() const;
void setPC(int pc);
void setSP(int sp);
void setPS(int ps);
@ -76,6 +78,8 @@ class CpuDebug : public DebuggerSystem
void setZ(bool on);
void setC(bool on);
void setCycles(int cycles);
void toggleN();
void toggleV();
void toggleB();

View File

@ -299,25 +299,25 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
switch(key)
{
case KBDK_LEFT: // Alt-left(-shift) rewinds 1(10) states
myOSystem.frameBuffer().resetPauseDelay();
myOSystem.frameBuffer().setPauseDelay();
setEventState(S_PAUSE);
myOSystem.state().rewindState((kbdShift(mod) && state) ? 10 : 1);
break;
case KBDK_RIGHT: // Alt-right(-shift) unwinds 1(10) states
myOSystem.frameBuffer().resetPauseDelay();
myOSystem.frameBuffer().setPauseDelay();
setEventState(S_PAUSE);
myOSystem.state().unwindState((kbdShift(mod) && state) ? 10 : 1);
break;
case KBDK_DOWN: // Alt-down rewinds to start of list
myOSystem.frameBuffer().resetPauseDelay();
myOSystem.frameBuffer().setPauseDelay();
setEventState(S_PAUSE);
myOSystem.state().rewindState(1000);
break;
case KBDK_UP: // Alt-up rewinds to end of list
myOSystem.frameBuffer().resetPauseDelay();
myOSystem.frameBuffer().setPauseDelay();
setEventState(S_PAUSE);
myOSystem.state().unwindState(1000);
break;
@ -489,8 +489,8 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
myOSystem.frameBuffer().toggleFrameStats();
break;
case KBDK_R: // Alt-r toggles continuous store rewind states
myOSystem.state().toggleRewindMode();
case KBDK_T: // Alt-t toggles Time Machine
myOSystem.state().toggleTimeMachine();
break;
case KBDK_S:

View File

@ -301,7 +301,7 @@ void FrameBuffer::update()
// Show a pause message immediately and then every 7 seconds
if (myPausedCount-- <= 0)
{
resetPauseDelay();
myPausedCount = uInt32(7 * myOSystem.frameRate());
showMessage("Paused", MessagePosition::MiddleCenter);
}
break; // S_PAUSE
@ -472,9 +472,9 @@ inline void FrameBuffer::drawMessage()
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBuffer::resetPauseDelay()
void FrameBuffer::setPauseDelay()
{
myPausedCount = uInt32(7 * myOSystem.frameRate());
myPausedCount = uInt32(2 * myOSystem.frameRate());
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -147,7 +147,7 @@ class FrameBuffer
/**
Reset 'Paused' display delay counter
*/
void resetPauseDelay();
void setPauseDelay();
/**
Allocate a new surface. The FrameBuffer class takes all responsibility

View File

@ -155,11 +155,11 @@ Settings::Settings(OSystem& osystem)
setInternal("plr.debugcolors", "false");
setInternal("plr.tiadriven", "false");
setInternal("plr.console", "2600"); // 7800
setInternal("plr.rewind", false);
setInternal("plr.rewind.size", 100);
setInternal("plr.rewind.uncompressed", 30);
setInternal("plr.rewind.interval", "30f"); // = 0.5 seconds
setInternal("plr.rewind.horizon", "10m"); // = ~10 minutes
setInternal("plr.timemachine", false);
setInternal("plr.tm.size", 100);
setInternal("plr.tm.uncompressed", 30);
setInternal("plr.tm.interval", "30f"); // = 0.5 seconds
setInternal("plr.tm.horizon", "10m"); // = ~10 minutes
// Thumb ARM emulation options
setInternal("plr.thumb.trapfatal", "false");
@ -175,11 +175,11 @@ Settings::Settings(OSystem& osystem)
setInternal("dev.debugcolors", "false");
setInternal("dev.tiadriven", "true");
setInternal("dev.console", "2600"); // 7800
setInternal("dev.rewind", true);
setInternal("dev.rewind.size", 100);
setInternal("dev.rewind.uncompressed", 60);
setInternal("dev.rewind.interval", "1f"); // = 1 frame
setInternal("dev.rewind.horizon", "10s"); // = ~10 seconds
setInternal("dev.timemachine", true);
setInternal("dev.tm.size", 100);
setInternal("dev.tm.uncompressed", 60);
setInternal("dev.tm.interval", "1f"); // = 1 frame
setInternal("dev.tm.horizon", "10s"); // = ~10 seconds
// Thumb ARM emulation options
setInternal("dev.thumb.trapfatal", "true");
}
@ -319,40 +319,40 @@ void Settings::validate()
i = getInt("dev.tv.jitter_recovery");
if(i < 1 || i > 20) setInternal("dev.tv.jitter_recovery", "2");
int size = getInt("dev.rewind.size");
int size = getInt("dev.tm.size");
if(size < 20 || size > 1000)
{
setInternal("dev.rewind.size", 20);
setInternal("dev.tm.size", 20);
size = 20;
}
i = getInt("dev.rewind.uncompressed");
if(i < 0 || i > size) setInternal("dev.rewind.uncompressed", size);
i = getInt("dev.tm.uncompressed");
if(i < 0 || i > size) setInternal("dev.tm.uncompressed", size);
/*i = getInt("dev.rewind.interval");
if(i < 0 || i > 5) setInternal("dev.rewind.interval", 0);
/*i = getInt("dev.tm.interval");
if(i < 0 || i > 5) setInternal("dev.tm.interval", 0);
i = getInt("dev.rewind.horizon");
if(i < 0 || i > 6) setInternal("dev.rewind.horizon", 1);*/
i = getInt("dev.tm.horizon");
if(i < 0 || i > 6) setInternal("dev.tm.horizon", 1);*/
i = getInt("plr.tv.jitter_recovery");
if(i < 1 || i > 20) setInternal("plr.tv.jitter_recovery", "10");
size = getInt("plr.rewind.size");
size = getInt("plr.tm.size");
if(size < 20 || size > 1000)
{
setInternal("plr.rewind.size", 20);
setInternal("plr.tm.size", 20);
size = 20;
}
i = getInt("plr.rewind.uncompressed");
if(i < 0 || i > size) setInternal("plr.rewind.uncompressed", size);
i = getInt("plr.tm.uncompressed");
if(i < 0 || i > size) setInternal("plr.tm.uncompressed", size);
/*i = getInt("plr.rewind.interval");
if(i < 0 || i > 5) setInternal("plr.rewind.interval", 3);
/*i = getInt("plr.tm.interval");
if(i < 0 || i > 5) setInternal("plr.tm.interval", 3);
i = getInt("plr.rewind.horizon");
if(i < 0 || i > 6) setInternal("plr.rewind.horizon", 5);*/
i = getInt("plr.tm.horizon");
if(i < 0 || i > 6) setInternal("plr.tm.horizon", 5);*/
#ifdef SOUND_SUPPORT
i = getInt("volume");

View File

@ -63,7 +63,7 @@ DeveloperDialog::DeveloperDialog(OSystem& osystem, DialogContainer& parent,
addEmulationTab(font);
addVideoTab(font);
addStatesTab(font);
addTimeMachineTab(font);
addDebuggerTab(font);
addDefaultOKCancelButtons(font);
@ -259,7 +259,7 @@ void DeveloperDialog::addVideoTab(const GUI::Font& font)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DeveloperDialog::addStatesTab(const GUI::Font& font)
void DeveloperDialog::addTimeMachineTab(const GUI::Font& font)
{
const string INTERVALS[NUM_INTERVALS] = {
" 1 frame",
@ -308,7 +308,7 @@ void DeveloperDialog::addStatesTab(const GUI::Font& font)
int fontHeight = font.getFontHeight();
WidgetArray wid;
VariantList items;
int tabID = myTab->addTab("States");
int tabID = myTab->addTab("Time Machine");
// settings set
mySettingsGroup2 = new RadioButtonGroup();
@ -321,9 +321,9 @@ void DeveloperDialog::addStatesTab(const GUI::Font& font)
wid.push_back(r);
ypos += lineHeight + VGAP * 1;
myContinuousRewindWidget = new CheckboxWidget(myTab, font, HBORDER + INDENT, ypos + 1,
"Continuous rewind", kRewind);
wid.push_back(myContinuousRewindWidget);
myTimeMachineWidget = new CheckboxWidget(myTab, font, HBORDER + INDENT, ypos + 1,
"Time Machine", kTimeMachine);
wid.push_back(myTimeMachineWidget);
ypos += lineHeight + VGAP;
int sWidth = font.getMaxCharWidth() * 8;
@ -518,11 +518,11 @@ void DeveloperDialog::loadSettings(SettingsSet set)
myTVJitterRec[set] = instance().settings().getInt(prefix + "tv.jitter_recovery");
// States
myContinuousRewind[set] = instance().settings().getBool(prefix + "rewind");
myStateSize[set] = instance().settings().getInt(prefix + "rewind.size");
myUncompressed[set] = instance().settings().getInt(prefix + "rewind.uncompressed");
myStateInterval[set] = instance().settings().getString(prefix + "rewind.interval");
myStateHorizon[set] = instance().settings().getString(prefix + "rewind.horizon");
myTimeMachine[set] = instance().settings().getBool(prefix + "timemachine");
myStateSize[set] = instance().settings().getInt(prefix + "tm.size");
myUncompressed[set] = instance().settings().getInt(prefix + "tm.uncompressed");
myStateInterval[set] = instance().settings().getString(prefix + "tm.interval");
myStateHorizon[set] = instance().settings().getString(prefix + "tm.horizon");
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -550,11 +550,11 @@ void DeveloperDialog::saveSettings(SettingsSet set)
instance().settings().setValue(prefix + "tv.jitter_recovery", myTVJitterRec[set]);
// States
instance().settings().setValue(prefix + "rewind", myContinuousRewind[set]);
instance().settings().setValue(prefix + "rewind.size", myStateSize[set]);
instance().settings().setValue(prefix + "rewind.uncompressed", myUncompressed[set]);
instance().settings().setValue(prefix + "rewind.interval", myStateInterval[set]);
instance().settings().setValue(prefix + "rewind.horizon", myStateHorizon[set]);
instance().settings().setValue(prefix + "timemachine", myTimeMachine[set]);
instance().settings().setValue(prefix + "tm.size", myStateSize[set]);
instance().settings().setValue(prefix + "tm.uncompressed", myUncompressed[set]);
instance().settings().setValue(prefix + "tm.interval", myStateInterval[set]);
instance().settings().setValue(prefix + "tm.horizon", myStateHorizon[set]);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -585,7 +585,7 @@ void DeveloperDialog::getWidgetStates(SettingsSet set)
myTVJitterRec[set] = myTVJitterRecWidget->getValue();
// States
myContinuousRewind[set] = myContinuousRewindWidget->getState();
myTimeMachine[set] = myTimeMachineWidget->getState();
myStateSize[set] = myStateSizeWidget->getValue();
myUncompressed[set] = myUncompressedWidget->getValue();
myStateInterval[set] = myStateIntervalWidget->getSelected();
@ -625,13 +625,13 @@ void DeveloperDialog::setWidgetStates(SettingsSet set)
handleEnableDebugColors();
// States
myContinuousRewindWidget->setState(myContinuousRewind[set]);
myTimeMachineWidget->setState(myTimeMachine[set]);
myStateSizeWidget->setValue(myStateSize[set]);
myUncompressedWidget->setValue(myUncompressed[set]);
myStateIntervalWidget->setSelected(myStateInterval[set]);
myStateHorizonWidget->setSelected(myStateHorizon[set]);
handleRewind();
handleTimeMachine();
handleSize();
handleUncompressed();
handleInterval();
@ -715,8 +715,8 @@ void DeveloperDialog::saveConfig()
// update RewindManager
instance().state().rewindManager().setup();
instance().state().setRewindMode(myContinuousRewindWidget->getState() ?
StateManager::Mode::Rewind : StateManager::Mode::Off);
instance().state().setRewindMode(myTimeMachineWidget->getState() ?
StateManager::Mode::TimeMachine : StateManager::Mode::Off);
#ifdef DEBUGGER_SUPPORT
// Debugger font style
@ -768,7 +768,7 @@ void DeveloperDialog::setDefaults()
break;
case 2: // States
myContinuousRewind[set] = devSettings ? true : false;
myTimeMachine[set] = devSettings ? true : false;
myStateSize[set] = 100;
myUncompressed[set] = devSettings ? 60 : 30;
myStateInterval[set] = devSettings ? "1f" : "30f";
@ -827,8 +827,8 @@ void DeveloperDialog::handleCommand(CommandSender* sender, int cmd, int data, in
instance().console().tia().driveUnusedPinsRandom(myUndrivenPinsWidget->getState());
break;
case kRewind:
handleRewind();
case kTimeMachine:
handleTimeMachine();
break;
case kSizeChanged:
@ -947,9 +947,9 @@ void DeveloperDialog::handleConsole()
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DeveloperDialog::handleRewind()
void DeveloperDialog::handleTimeMachine()
{
bool enable = myContinuousRewindWidget->getState();
bool enable = myTimeMachineWidget->getState();
myStateSizeWidget->setEnabled(enable);
myStateSizeLabelWidget->setEnabled(enable);

View File

@ -63,11 +63,11 @@ class DeveloperDialog : public Dialog
kTVJitter = 'DVjt',
kTVJitterChanged = 'DVjr',
kPPinCmd = 'DVpn',
kRewind = 'DSrw',
kSizeChanged = 'DSsz',
kUncompressedChanged = 'DSuc',
kIntervalChanged = 'DSin',
kHorizonChanged = 'DShz',
kTimeMachine = 'DTtm',
kSizeChanged = 'DTsz',
kUncompressedChanged = 'DTuc',
kIntervalChanged = 'DTin',
kHorizonChanged = 'DThz',
kP0ColourChangedCmd = 'GOp0',
kM0ColourChangedCmd = 'GOm0',
kP1ColourChangedCmd = 'GOp1',
@ -117,7 +117,7 @@ class DeveloperDialog : public Dialog
// States widgets
RadioButtonGroup* mySettingsGroup2;
CheckboxWidget* myContinuousRewindWidget;
CheckboxWidget* myTimeMachineWidget;
SliderWidget* myStateSizeWidget;
StaticTextWidget* myStateSizeLabelWidget;
SliderWidget* myUncompressedWidget;
@ -149,7 +149,7 @@ class DeveloperDialog : public Dialog
bool myUndrivenPins[2];
bool myThumbException[2];
// States sets
bool myContinuousRewind[2];
bool myTimeMachine[2];
int myStateSize[2];
int myUncompressed[2];
string myStateInterval[2];
@ -157,7 +157,7 @@ class DeveloperDialog : public Dialog
private:
void addEmulationTab(const GUI::Font& font);
void addStatesTab(const GUI::Font& font);
void addTimeMachineTab(const GUI::Font& font);
void addVideoTab(const GUI::Font& font);
void addDebuggerTab(const GUI::Font& font);
// Add Defaults, OK and Cancel buttons
@ -176,7 +176,7 @@ class DeveloperDialog : public Dialog
void handleDebugColours(int cmd, int color);
void handleDebugColours(const string& colors);
void handleRewind();
void handleTimeMachine();
void handleSize();
void handleUncompressed();
void handleInterval();

View File

@ -153,9 +153,9 @@ void HelpDialog::updateStrings(uInt8 page, uInt8 lines, string& title)
ADD_BIND("Ctrl PgUp", "Increase Display.Height");
ADD_BIND("Ctrl PgDn", "Decrease Display.Height");
ADD_LINE();
ADD_BIND("Alt L", "Toggle frame stats");
ADD_BIND("Alt ,", "Toggle 'Debug Colors' mode");
ADD_BIND("Alt r", "Toggle continuous rewind");
ADD_BIND(ALT_" L", "Toggle frame stats");
ADD_BIND(ALT_" ,", "Toggle 'Debug Colors' mode");
ADD_BIND(ALT_" t", "Toggle 'Time Machine' mode");
break;
case 5: