Skip to content

Commit

Permalink
fix somr snes auto-tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
black-sliver committed Feb 13, 2022
1 parent 5f667a3 commit a396a5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/core/gameinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const std::map<std::string, GameInfo> GameInfo::_games = {
{},
{"hirom"},
}},
#if 0 // SoMR tracker uses direct ROM addresses
{ "secret of mana randomizer", {
"Secret of Mana Randomizer",
{"somr"},
Expand All @@ -42,6 +43,7 @@ const std::map<std::string, GameInfo> GameInfo::_games = {
{"seiken densetsu 2"},
{"hirom"},
}},
#endif
{ "illusion of gaia randomizer", {
"Illusion of Gaia Randomizer",
{"iogr"},
Expand Down
4 changes: 3 additions & 1 deletion src/usb2snes/usb2snes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit a396a5a

Please sign in to comment.