[Scummvm-git-logs] scummvm branch-2-7 -> 416cc0c70f7efb309a9cb3013d9636ebdb5d4a50

dwatteau noreply at scummvm.org
Sun Jul 2 13:44:14 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
416cc0c70f SCUMM: MONKEY1: Detect and reject corrupted DISK03.LEC sold by LRG


Commit: 416cc0c70f7efb309a9cb3013d9636ebdb5d4a50
    https://github.com/scummvm/scummvm/commit/416cc0c70f7efb309a9cb3013d9636ebdb5d4a50
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2023-07-02T15:42:39+02:00

Commit Message:
SCUMM: MONKEY1: Detect and reject corrupted DISK03.LEC sold by LRG

Limited Run Games not only sold an anthology with corrupted 903.LFL
and DISK04.LEC files for the original English EGA release of Monkey 1,
the DISK03.LEC file is also corrupted, at least in costume 78-11 at the
church near the very end of the game, making it unplayable by default in
this officially sanctioned release.

We can't do anything to fix this ourselves, but it's still possible to
recover proper files from the KryoFlux dumps also provided by LRG.

So, detect this faulty DISK03.LEC file as well, and tell users that
it's corrupted before they report weird crashes which are totally out
of our scope. Hoping that LRG provides fixed files to customers who
would contact their support...

Checked against my own LRG copy and against my original Ubisoft CD of
the French EGA release for reference.

Trac#14500.

(cherry picked from commit b263c3f31f7d40fad65e3d5dd10b6aa5511e6f4f)

Changed paths:
    engines/scumm/detection_internal.h


diff --git a/engines/scumm/detection_internal.h b/engines/scumm/detection_internal.h
index 8dc5a5f610f..bbc4f8881de 100644
--- a/engines/scumm/detection_internal.h
+++ b/engines/scumm/detection_internal.h
@@ -333,9 +333,15 @@ static void computeGameSettingsFromMD5(const Common::FSList &fslist, const GameF
 			// a generic entry, currently used for some generic HE settings.
 			if (g->variant == 0 || !scumm_stricmp(md5Entry->variant, g->variant)) {
 
-				// See https://dwatteau.github.io/scummfixes/corrupted-monkey1-ega-files-limitedrungames.html
+				// The English EGA release of Monkey Island 1 sold by Limited Run Games in the
+				// Monkey Island Anthology in late 2021 contains several corrupted files, making
+				// the game unplayable (see bug #14500). It's possible to recover working files
+				// from the raw KryoFlux resources also provided by LRG, but this requires
+				// dedicated tooling, and so we can just detect the corrupted resources and
+				// report the problem to users before they report weird crashes in the game.
+				// https://dwatteau.github.io/scummfixes/corrupted-monkey1-ega-files-limitedrungames.html
 				if (g->id == GID_MONKEY_EGA && g->platform == Common::kPlatformDOS) {
-					Common::String md5Disk04, md5Lfl903;
+					Common::String md5Disk03, md5Disk04, md5Lfl903;
 					Common::FSNode resFile;
 					Common::File f;
 
@@ -346,6 +352,13 @@ static void computeGameSettingsFromMD5(const Common::FSList &fslist, const GameF
 						f.close();
 					}
 
+					if (searchFSNode(fslist, "DISK03.LEC", resFile))
+						f.open(resFile);
+					if (f.isOpen()) {
+						md5Disk03 = Common::computeStreamMD5AsString(f, kMD5FileSizeLimit);
+						f.close();
+					}
+
 					if (searchFSNode(fslist, "DISK04.LEC", resFile))
 						f.open(resFile);
 					if (f.isOpen()) {
@@ -354,11 +367,12 @@ static void computeGameSettingsFromMD5(const Common::FSList &fslist, const GameF
 					}
 
 					if ((!md5Lfl903.empty() && md5Lfl903 == "54d4e17df08953b483d17416043345b9") ||
+					    (!md5Disk03.empty() && md5Disk03 == "a8ab7e8eaa322d825beb6c5dee28f17d") ||
 					    (!md5Disk04.empty() && md5Disk04 == "f338cc1d3117c1077a3a9d0c1d70b1e8")) {
 						::GUI::displayErrorDialog(_("This version of Monkey Island can't be played, because Limited Run Games "
-						    "provided corrupted DISK04.LEC and 903.LFL files.\n\nPlease contact their technical support for "
-						    "replacement files, or look online for some guides which can help you recover valid files from "
-						    "the KryoFlux dumps that Limited Run Games also provided."));
+						    "provided corrupted DISK03.LEC, DISK04.LEC and 903.LFL files.\n\nPlease contact their technical "
+						    "support for replacement files, or look online for some guides which can help you recover valid "
+						    "files from the KryoFlux dumps that Limited Run Games also provided."));
 						continue;
 					}
 				}




More information about the Scummvm-git-logs mailing list