From ed1c1f0bea769b50d379858bfe911655a32c83ff Mon Sep 17 00:00:00 2001 From: splash5 <2173030+splash5@users.noreply.github.com> Date: Thu, 24 Nov 2022 17:08:41 +0800 Subject: [PATCH] Fix SNES Daikaijuu Monogatari 2 --- Cart_Reader/SNES.ino | 16 +++++++++++++--- sd/snes.txt | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Cart_Reader/SNES.ino b/Cart_Reader/SNES.ino index 2cd97a1..db8f06c 100644 --- a/Cart_Reader/SNES.ino +++ b/Cart_Reader/SNES.ino @@ -793,7 +793,10 @@ void getCartInfo_SNES() { println_Msg(F("SDD1")); } else if (romChips == 69) { println_Msg(F("SDD1 BATT")); - } else if (romChips == 227) + } + else if (romChips == 85) + println_Msg(F("SRTC RAM BATT")); + else if (romChips == 227) println_Msg(F("RAM GBoy")); else if (romChips == 243) println_Msg(F("CX4")); @@ -908,7 +911,7 @@ void checkAltConf(char crcStr[9]) { println_Msg(F("Found")); display_Update(); // Game found, check if ROM sizes differ but only change ROM size if non- standard size found in database, else trust the header to be right and the database to be wrong - if (((romSize != romSize2) || (numBanks != numBanks2)) && ((romSize2 == 10) || (romSize2 == 12) || (romSize2 == 20) || (romSize2 == 24) || (romSize2 == 48))) { + if (((romSize != romSize2) || (numBanks != numBanks2)) && ((romSize2 == 10) || (romSize2 == 12) || (romSize2 == 20) || (romSize2 == 24) || (romSize2 == 40) || (romSize2 == 48))) { // Correct size println_Msg(F("Correcting size")); print_Msg(F("Size: ")); @@ -1452,7 +1455,14 @@ void readROM_SNES() { println_Msg(F("Dumping HiRom...")); display_Update(); - readHiRomBanks(192, numBanks + 192, &myFile); + if (romChips == 85) { + // Daikaijuu Monogatari 2, keeps out S-RTC register area + readHiRomBanks(192, 192 + 64, &myFile); + readHiRomBanks(64, numBanks, &myFile); // (64 + (numBanks - 64)) + } + else { + readHiRomBanks(192, numBanks + 192, &myFile); + } } // Close the file: diff --git a/sd/snes.txt b/sd/snes.txt index e74516c..9e0256e 100644 --- a/sd/snes.txt +++ b/sd/snes.txt @@ -1625,7 +1625,7 @@ Daikaijuu Monogatari (Japan).sfc 39CA5291,1C07,C721B252,24,048 Daikaijuu Monogatari II (Japan).sfc -A6C98FFE,E620,6E120C5C,40,160 +A6C98FFE,8528,E3982D11,40,080 Daikoukai Jidai II (Japan).sfc EEBC4170,6145,96A59072,16,032