add autoslot setting to UI

update doc for autoslot and write to read port breaks
This commit is contained in:
thrust26 2020-01-18 11:08:00 +01:00
parent 34661af1aa
commit 8acefcbb50
8 changed files with 42 additions and 6 deletions

View File

@ -97,6 +97,8 @@
* Added option to save and load all TimeMachine states at once.
* Added option to automatically save states when exiting emulation.
* Added option to change pitch of Pitfall II music.
* ROM Info Launcher can now display multiple lines per property and

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -2617,10 +2617,20 @@
If disabled, use the last databus value for those pins instead.</td>
</tr><tr>
<td><pre>-dev.rwportbreak &lt;1|0&gt;</pre></td>
<td>Since the 2600 has no dedicated R/W line, different addresses are used
for RAM read or write access. If the code reads from such a write address, this causes
an unwanted, semi-random write to that address.
When this option is enabled, such reads interrupt emulation and the debugger is entered.</td>
<td>Since the 2600 has no dedicated R/W line, different addresses are
used for RAM read or write access.</br>
If the code reads from such a write address, this causes an unwanted,
semi-random write to that address.</br>
When this option is enabled, such reads interrupt emulation and the
debugger is entered.</td>
</tr><tr>
<td><pre>-dev.wrportbreak &lt;1|0&gt;</pre></td>
<td>Same as above.</br>
If the code writes to such a read address, nothing happens. But a
developer should be made aware of it, because this indicates a problem
with the code.</br>
When this option is enabled, such writes interrupt emulation and the
debugger is entered.</td>
</tr><tr>
<td><pre>-dev.thumb.trapfatal &lt;1|0&gt;</pre></td>
<td>When enabled, this allows the Thumb ARM emulation to
@ -3244,6 +3254,11 @@
<td>A read from a write port interrupts emulation and the debugger is entered.</td>
<td><span style="white-space:nowrap">-dev.rwportbreak</span></td>
</tr>
<tr>
<td>Break on write to ...</td>
<td>A write to a read port interrupts emulation and the debugger is entered.</td>
<td><span style="white-space:nowrap">-dev.wrportbreak</span></td>
</tr>
<tr>
<td>Fatal ARM emulation ...</td>
<td>Thumb ARM emulation throws an exception and enters the debugger on fatal errors</td>
@ -3364,6 +3379,12 @@
Automatically save no, current or all states when exiting emulation.
</td>
<td>-saveonexit</td>
</tr><tr>
<td>Automatically switch...</td>
<td>
Automatically switch to the next available save state slot after saving a ROM state file.
</td>
<td>-autoslot</td>
</tr>
</table>
</td>

View File

@ -465,10 +465,11 @@ void Settings::usage() const
<< " scaling/effects)\n"
<< " -ssinterval <number> Number of seconds between snapshots in\n"
<< " continuous snapshot mode\n"
<< " -autoslot <1|0> Automatically switch to next save slot when\n"
<< " state saving\n"
<< endl
<< " -saveonexit <none|current Automatically save state(s) when exiting emulation\n"
<< " all>\n"
<< " -autoslot <1|0> Automatically switch to next save slot when\n"
<< " state saving\n"
<< endl
<< " -rominfo <rom> Display detailed information for the given ROM\n"
<< " -listrominfo Display contents of stella.pro, one line per ROM\n"
@ -588,6 +589,7 @@ void Settings::usage() const
<< " read/peek\n"
#ifdef DEBUGGER_SUPPORT
<< " -dev.rwportbreak <1|0> Debugger breaks on reads from write ports\n"
<< " -dev.wrportbreak <1|0> Debugger breaks on writes to read ports\n"
#endif
<< " -dev.thumb.trapfatal <1|0> Determines whether errors in ARM emulation\n"
<< " throw an exception\n"

View File

@ -494,6 +494,11 @@ void DeveloperDialog::addTimeMachineTab(const GUI::Font& font)
wid.push_back(r);
ypos += lineHeight + VGAP;
myAutoSlotWidget = new CheckboxWidget(myTab, font, HBORDER, ypos + 1, "Automatically switch save state slots");
wid.push_back(myAutoSlotWidget);
ypos += lineHeight + VGAP;
// Add message concerning usage
const GUI::Font& infofont = instance().frameBuffer().infoFont();
ypos = myTab->getHeight() - 5 - fontHeight - infofont.getFontHeight() - 10;
@ -841,6 +846,8 @@ void DeveloperDialog::loadConfig()
// Save on exit
string saveOnExit = instance().settings().getString("saveonexit");
mySaveOnExitGroup->setSelected(saveOnExit == "all" ? 2 : saveOnExit == "current" ? 1 : 0);
// Automatically change save state slots
myAutoSlotWidget->setState(instance().settings().getBool("autoslot"));
#ifdef DEBUGGER_SUPPORT
uInt32 w, h;
@ -922,6 +929,8 @@ void DeveloperDialog::saveConfig()
int saveOnExit = mySaveOnExitGroup->getSelected();
instance().settings().setValue("saveonexit",
saveOnExit == 0 ? "none" : saveOnExit == 1 ? "current" : "all");
// Automatically change save state slots
instance().settings().setValue("autoslot", myAutoSlotWidget->getState());
#ifdef DEBUGGER_SUPPORT
// Debugger font style
@ -1014,6 +1023,7 @@ void DeveloperDialog::setDefaults()
setWidgetStates(set);
mySaveOnExitGroup->setSelected(0);
myAutoSlotWidget->setState(false);
break;
case 4: // Debugger options

View File

@ -136,6 +136,7 @@ class DeveloperDialog : public Dialog
PopUpWidget* myStateIntervalWidget{nullptr};
PopUpWidget* myStateHorizonWidget{nullptr};
RadioButtonGroup* mySaveOnExitGroup{nullptr};
CheckboxWidget* myAutoSlotWidget{nullptr};
#ifdef DEBUGGER_SUPPORT
// Debugger UI widgets