From bc8168948fad89df4f0e0bf9d08d39e0fb536034 Mon Sep 17 00:00:00 2001 From: ekeeke31 Date: Tue, 15 Sep 2009 14:17:04 +0000 Subject: [PATCH] fixed SRAM detection for Sonic 3 & Knuckles combined ROM --- source/cart_hw/sram.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/cart_hw/sram.c b/source/cart_hw/sram.c index 74b41d3..9474eae 100644 --- a/source/cart_hw/sram.c +++ b/source/cart_hw/sram.c @@ -81,6 +81,15 @@ void sram_init() /* this prevents SRAM activation when using Sonic & Knuckles LOCK-ON feature */ sram.on = 0; } + else if (strstr(rominfo.international,"SONIC & KNUCKLES") != NULL) + { + if (cart.romsize == 0x400000) + { + /* Sonic 3 & Knuckles */ + /* the combined ROM has S&K header but should obviously use FRAM from Sonic the Hedgehog 3 */ + sram.on = 1; + } + } else if (strstr(rominfo.product,"T-26013") != NULL) { /* Psy-O-Blade (bad header) */