+drnoksnes (0.9.3) unstable; urgency=low
+
+ * SRAM save on exiting and every 15 minutes.
+
+ -- Javier S. Pedro <maemo@javispedro.com> Sat, 15 Aug 2009 00:18:19 +0200
+
drnoksnes (0.9.2) unstable; urgency=low
* Fixed a hang on shutdown issue (random libgcc_s bug; now using
}
#endif
-/*
if (CPU.SRAMModified)
{
if (!CPU.AutoSaveTimer)
}
}
}
-*/
}
void S9xSetInfoString (const char *string)
Settings.HacksFilter = FALSE;
Settings.HBlankStart = (256 * Settings.H_Max) / SNES_HCOUNTER_MAX;
+
+ Settings.AutoSaveDelay = 15*60; // Autosave each 15 minutes.
}
static void setRomFile(const char * path)
Settings.SDD1Pack=FALSE;
}
+void S9xAutoSaveSRAM()
+{
+ Memory.SaveSRAM(S9xGetFilename(".srm"));
+}
+
static void S9xInit()
{
if (!Memory.Init () || !S9xInitAPU())
S9xInit();
S9xReset();
- // Load rom and related files
+ // Load rom and related files: state
loadRom();
// Late initialization
S9xAudioOutputEnable(false);
S9xDeinitAudioOutput();
S9xDeinitDisplay();
+
+ // Save state
+ Memory.SaveSRAM(S9xGetFilename(".srm"));
+
+ // Late deinitialization
S9xGraphicsDeinit();
+ Memory.Deinit();
SDL_Quit();