Skip to content

Commit

Permalink
SCUMM: Fix bad Maniac Mansion crack in GOG (and Steam?) version
Browse files Browse the repository at this point in the history
The enhanced version of Maniac Mansion currently sold on GOG (and
probably Steam as well) has a one-byte change to the script handling
keypads, presumably to disable the security door copy protection. (Which
ScummVM disables by default anyway, by leaving the door open.)

Unfortunately, this crack was made without any deeper understanding of
the game (said the guy who never ever played the whole thing :-). It
allows you to enter either the correct code, or any code as long as you
get the last symbol wrong. But the script is also used for other keypad
puzzles in the game (e.g. Edna's phone number and safe combination). So
those puzzles are completely nerfed as well.

I have reported this as a bug to both GOG and Disney Games & Apps
Support. GOG has acknowledged that there is a problem, which is more
than Disney has done so far, but it remains unclear whether or not they
will fix it.
  • Loading branch information
Torbjörn Andersson committed Jul 17, 2021
1 parent ba6c73b commit 07617f8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions engines/scumm/resource.cpp
Expand Up @@ -1724,6 +1724,30 @@ void ScummEngine::applyWorkaroundIfNeeded(ResType type, int idx) {
warning("Could not patch MI2 Mac boot script");

delete[] patchedScript;
} else

// There is a cracked version of Maniac Mansion v2 that attempts to
// remove the security door copy protection. With it, any code is
// accepted as long as you get the last digit wrong. Unfortunately,
// it changes a script that is used by all keypads in the game, which
// means some puzzles are completely nerfed.
//
// Even worse, this is the version that GOG (and apparently Steam as
// well) are selling. No, seriously! I've reported this as a bug, but
// it remains unclear whether or not they will fix it.

if (_game.id == GID_MANIAC && _game.version == 2 && _game.platform == Common::kPlatformDOS && type == rtScript && idx == 44 && size == 199) {
byte *data = getResourceAddress(type, idx);

if (data[184] == 0) {
Common::MemoryReadStream stream(data, size);
Common::String md5 = Common::computeStreamMD5AsString(stream);

if (md5 == "11adc9b47497b26ac2b9627e0982b3fe") {
warning("Removing bad copy protection crack from keypad script");
data[184] = 1;
}
}
}
}

Expand Down

0 comments on commit 07617f8

Please sign in to comment.