From fb2302917d24904e8a65adf9b6f7fb9b95ce8cd8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 6 Aug 2016 00:51:48 +0200 Subject: Remove unused LoadSRAM --- source/memmap.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'source/memmap.c') 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; -- cgit v1.2.3