From d8087660e60387beb392e349983e9778f24feb35 Mon Sep 17 00:00:00 2001 From: strotlog <49286967+strotlog@users.noreply.github.com> Date: Thu, 24 Mar 2022 08:40:02 -0700 Subject: [PATCH] SM: remove SNIClient read of duplicative ROM name (#340) --- SNIClient.py | 2 +- worlds/sm/__init__.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SNIClient.py b/SNIClient.py index 369e6e0d..843672aa 100644 --- a/SNIClient.py +++ b/SNIClient.py @@ -256,7 +256,7 @@ SHOP_LEN = (len(Shops.shop_table) * 3) + 5 DEATH_LINK_ACTIVE_ADDR = ROMNAME_START + 0x15 # 1 byte # SM -SM_ROMNAME_START = 0x1C4F00 +SM_ROMNAME_START = 0x007FC0 SM_INGAME_MODES = {0x07, 0x09, 0x0b} SM_ENDGAME_MODES = {0x26, 0x27} diff --git a/worlds/sm/__init__.py b/worlds/sm/__init__.py index dee37537..b95ee635 100644 --- a/worlds/sm/__init__.py +++ b/worlds/sm/__init__.py @@ -312,6 +312,8 @@ class SMWorld(World): from Main import __version__ self.romName = bytearray(f'SM{__version__.replace(".", "")[0:3]}_{self.player}_{self.world.seed:11}\0', 'utf8')[:21] self.romName.extend([0] * (21 - len(self.romName))) + # clients should read from 0x7FC0, the location of the rom title in the SNES header. + # duplicative ROM name at 0x1C4F00 is still written here for now, since people with archipelago pre-0.3.0 client installed will still be depending on this location for connecting to SM romPatcher.applyIPSPatch('ROMName', { 'ROMName': {0x1C4F00 : self.romName, 0x007FC0 : self.romName} })