summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--docs/source/commandline/commandline-all.rst3
-rw-r--r--src/emu/diimage.cpp4
2 files changed, 6 insertions, 1 deletions
diff --git a/docs/source/commandline/commandline-all.rst b/docs/source/commandline/commandline-all.rst
index d7026de24b9..acbd9b50099 100644
--- a/docs/source/commandline/commandline-all.rst
+++ b/docs/source/commandline/commandline-all.rst
@@ -2412,7 +2412,8 @@ Core Misc Options
Save the NVRAM contents when exiting machine emulation. By turning this off,
you can retain your previous NVRAM contents as any current changes made will
- not be saved.
+ not be saved. Turning this option off will also unconditionally suppress the
+ saving of .nv files associated with some types of software cartridges.
The default is ON (**-nvram_save**).
diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp
index ed0f6ae35f4..d6d0a5e5247 100644
--- a/src/emu/diimage.cpp
+++ b/src/emu/diimage.cpp
@@ -670,6 +670,10 @@ void device_image_interface::battery_load(void *buffer, int length, void *def_bu
void device_image_interface::battery_save(const void *buffer, int length)
{
assert_always(buffer && (length > 0), "Must specify sensical buffer/length");
+
+ if (!device().machine().options().nvram_save())
+ return;
+
std::string fname = std::string(device().machine().system().name).append(PATH_SEPARATOR).append(m_basename_noext.c_str()).append(".nv");
// try to open the battery file and write it out, if possible