aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authortwinaphex2016-08-06 00:49:32 +0200
committertwinaphex2016-08-06 00:49:32 +0200
commit782210614519c2368a240b5668b24b8f3874c12c (patch)
treee2aa2600ff71c397ca30e13fbc10798a4d541460 /source
parentf17c30ecfb60f085cf928724d19d8c3ab693801f (diff)
downloadsnesemu-782210614519c2368a240b5668b24b8f3874c12c.tar.gz
snesemu-782210614519c2368a240b5668b24b8f3874c12c.tar.bz2
snesemu-782210614519c2368a240b5668b24b8f3874c12c.zip
Reimplement save RAM - do it the libretro way by implementing
retro_get_memory_data and friends
Diffstat (limited to 'source')
-rw-r--r--source/gfx.c4
-rw-r--r--source/memmap.c35
-rw-r--r--source/memmap.h3
3 files changed, 0 insertions, 42 deletions
diff --git a/source/gfx.c b/source/gfx.c
index 1c3efa1..d55ae09 100644
--- a/source/gfx.c
+++ b/source/gfx.c
@@ -717,11 +717,7 @@ void S9xEndScreenRefresh()
#endif
if (CPU.SRAMModified)
- {
- S9xAutoSaveSRAM();
CPU.SRAMModified = false;
- }
-
}
void S9xSetInfoString(const char* string)
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;
diff --git a/source/memmap.h b/source/memmap.h
index 0be1192..3be1cd3 100644
--- a/source/memmap.h
+++ b/source/memmap.h
@@ -145,7 +145,6 @@ uint32_t FileLoader(uint8_t* buffer, const char* filename, int32_t maxsize);
#endif
void InitROM(bool);
bool LoadSRAM(const char*);
-bool SaveSRAM(const char*);
bool S9xInitMemory();
void S9xDeinitMemory();
void FreeSDD1Data();
@@ -258,8 +257,6 @@ bool LoadZip(const char* zipname,
uint8_t* buffer);
-void S9xAutoSaveSRAM();
-
#ifdef NO_INLINE_SET_GET
uint8_t S9xGetByte(uint32_t Address);
uint16_t S9xGetWord(uint32_t Address);