diff options
author | twinaphex | 2016-08-06 00:49:32 +0200 |
---|---|---|
committer | twinaphex | 2016-08-06 00:49:32 +0200 |
commit | 782210614519c2368a240b5668b24b8f3874c12c (patch) | |
tree | e2aa2600ff71c397ca30e13fbc10798a4d541460 /source/memmap.c | |
parent | f17c30ecfb60f085cf928724d19d8c3ab693801f (diff) | |
download | snes9x2005-782210614519c2368a240b5668b24b8f3874c12c.tar.gz snes9x2005-782210614519c2368a240b5668b24b8f3874c12c.tar.bz2 snes9x2005-782210614519c2368a240b5668b24b8f3874c12c.zip |
Reimplement save RAM - do it the libretro way by implementing
retro_get_memory_data and friends
Diffstat (limited to 'source/memmap.c')
-rw-r--r-- | source/memmap.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/source/memmap.c b/source/memmap.c index 01d0707..6c013ea 100644 --- a/source/memmap.c +++ b/source/memmap.c @@ -1535,41 +1535,6 @@ bool LoadSRAM(const char* filename) return (true); } -bool SaveSRAM(const char* filename) -{ - if (Settings.SuperFX && Memory.ROMType < 0x15) - return true; - if (Settings.SA1 && Memory.ROMType == 0x34) - return true; - - int size = Memory.SRAMSize ? - (1 << (Memory.SRAMSize + 3)) * 128 : 0; - if (Settings.SRTC) - { - size += SRTC_SRAM_PAD; - S9xSRTCPreSaveState(); - } - - if (size > 0x20000) - size = 0x20000; - - if (size && *Memory.ROMFilename) - { - - FILE* file = fopen(filename, "w"); - if (file) - { - fwrite((unsigned char*) Memory.SRAM, size, 1, file); - fclose(file); - if (Settings.SPC7110RTC) - S9xSaveSPC7110RTC(&rtc_f9); - - return (true); - } - } - return (false); -} - void FixROMSpeed() { int c; |