diff options
author | twinaphex | 2016-08-06 00:59:06 +0200 |
---|---|---|
committer | twinaphex | 2016-08-06 00:59:06 +0200 |
commit | 44e3e09a94eb4cc2aab2fe817e938456deaa0ad3 (patch) | |
tree | b08be2b3cb4fd32fe6b6a304294ec72fd02da3f7 | |
parent | af05cea62ffd4ca1ca9aef0af5a15f1e73f5723a (diff) | |
download | snes9x2002-44e3e09a94eb4cc2aab2fe817e938456deaa0ad3.tar.gz snes9x2002-44e3e09a94eb4cc2aab2fe817e938456deaa0ad3.tar.bz2 snes9x2002-44e3e09a94eb4cc2aab2fe817e938456deaa0ad3.zip |
Remove unused LoadSRAM
-rw-r--r-- | src/memmap.c | 41 | ||||
-rw-r--r-- | src/memmap.h | 1 |
2 files changed, 0 insertions, 42 deletions
diff --git a/src/memmap.c b/src/memmap.c index ee58cef..c8c9cc4 100644 --- a/src/memmap.c +++ b/src/memmap.c @@ -932,47 +932,6 @@ void InitROM (bool8_32 Interleaved) S9xMessage (S9X_INFO, S9X_ROM_INFO, String);
}
-bool8_32 LoadSRAM (const char *filename)
-{
- int size = Memory.SRAMSize ?
- (1 << (Memory.SRAMSize + 3)) * 128 : 0;
-
- memset (Memory.SRAM, SNESGameFixes.SRAMInitialValue, 0x20000);
-
- if (size > 0x20000)
- size = 0x20000;
-
- if (size)
- {
- FILE *file;
- if ((file = fopen(filename, "rb")))
- {
- int len = fread ((char*) SRAM, 1, 0x20000, file);
- fclose (file);
- if (len - size == 512)
- {
- // S-RAM file has a header - remove it
- memmove (SRAM, SRAM + 512, size);
- }
- if (len == size + SRTC_SRAM_PAD)
- {
- S9xSRTCPostLoadState ();
- S9xResetSRTC ();
- rtc.index = -1;
- rtc.mode = MODE_READ;
- }
- else
- S9xHardResetSRTC ();
-
- return (TRUE);
- }
- S9xHardResetSRTC ();
- return (FALSE);
- }
-
- return (TRUE);
-}
-
bool8_32 SaveSRAM (const char *filename)
{
int size = Memory.SRAMSize ?
diff --git a/src/memmap.h b/src/memmap.h index bcf71d6..53aa54f 100644 --- a/src/memmap.h +++ b/src/memmap.h @@ -82,7 +82,6 @@ bool8_32 LoadROM(const char*); void InitROM(bool8_32); -bool8_32 LoadSRAM(const char*); bool8_32 SaveSRAM(const char*); bool8_32 MemoryInit(); void MemoryDeinit(); |