aboutsummaryrefslogtreecommitdiff
path: root/source/memmap.c
diff options
context:
space:
mode:
authortwinaphex2016-08-06 00:51:48 +0200
committertwinaphex2016-08-06 00:51:48 +0200
commitfb2302917d24904e8a65adf9b6f7fb9b95ce8cd8 (patch)
tree5aea0dfefd8554946ca9b5c14a4a0ae9923cb9fc /source/memmap.c
parent782210614519c2368a240b5668b24b8f3874c12c (diff)
downloadsnes9x2005-fb2302917d24904e8a65adf9b6f7fb9b95ce8cd8.tar.gz
snes9x2005-fb2302917d24904e8a65adf9b6f7fb9b95ce8cd8.tar.bz2
snes9x2005-fb2302917d24904e8a65adf9b6f7fb9b95ce8cd8.zip
Remove unused LoadSRAM
Diffstat (limited to 'source/memmap.c')
-rw-r--r--source/memmap.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/source/memmap.c b/source/memmap.c
index 6c013ea..a8ba4e2 100644
--- a/source/memmap.c
+++ b/source/memmap.c
@@ -1490,51 +1490,6 @@ void InitROM(bool Interleaved)
Settings.ForceInterleaved2 = false;
}
-bool 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((unsigned char*) Memory.SRAM, 1, 0x20000, file);
- fclose(file);
- if (len - size == 512)
- {
- // S-RAM file has a header - remove it
- // memmove required: Overlapping addresses [Neb]
- memmove(Memory.SRAM, Memory.SRAM + 512, size);
- }
- if (len == size + SRTC_SRAM_PAD)
- {
- S9xSRTCPostLoadState();
- S9xResetSRTC();
- rtc.index = -1;
- rtc.mode = MODE_READ;
- }
- else
- S9xHardResetSRTC();
-
- if (Settings.SPC7110RTC)
- S9xLoadSPC7110RTC(&rtc_f9);
-
- return (true);
- }
- S9xHardResetSRTC();
- return (false);
- }
-
- return (true);
-}
-
void FixROMSpeed()
{
int c;