From a396a5a354408f40da8fb575d7f66f6301e2f8f8 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Sun, 13 Feb 2022 17:53:52 +0100 Subject: [PATCH] fix somr snes auto-tracking --- src/core/gameinfo.cpp | 2 ++ src/usb2snes/usb2snes.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/gameinfo.cpp b/src/core/gameinfo.cpp index aab14363..f50948b0 100644 --- a/src/core/gameinfo.cpp +++ b/src/core/gameinfo.cpp @@ -32,6 +32,7 @@ const std::map GameInfo::_games = { {}, {"hirom"}, }}, +#if 0 // SoMR tracker uses direct ROM addresses { "secret of mana randomizer", { "Secret of Mana Randomizer", {"somr"}, @@ -42,6 +43,7 @@ const std::map GameInfo::_games = { {"seiken densetsu 2"}, {"hirom"}, }}, +#endif { "illusion of gaia randomizer", { "Illusion of Gaia Randomizer", {"iogr"}, diff --git a/src/usb2snes/usb2snes.cpp b/src/usb2snes/usb2snes.cpp index a9aeeb30..b582640a 100644 --- a/src/usb2snes/usb2snes.cpp +++ b/src/usb2snes/usb2snes.cpp @@ -476,7 +476,6 @@ uint32_t USB2SNES::mapaddr(uint32_t addr) return ((addr&0x7f0000) >> 1) + (addr&0x7fff); // pretty sure this is correct break; case Mapping::HIROM: - case Mapping::UNKNOWN: // old behavior; TODO: auto-detect when unknown // FASTROM MIRROR if (addr>=0x800000) addr -= 0x800000; // SRAM @@ -522,6 +521,9 @@ uint32_t USB2SNES::mapaddr(uint32_t addr) if ((addr&0xffff) < 0x2000) return 0xf50000 + (addr&0x1fff); break; + case Mapping::UNKNOWN: // old behavior; TODO: auto-detect when unknown + return addr&0x3ffff; // NOTE: this can not access SRAM + break; } return 0; }