[Scummvm-git-logs] scummvm master -> b68b18030ff7dccdd531315dc7eb1cc53c40cf1c
bluegr
noreply at scummvm.org
Wed Feb 16 23:04:25 UTC 2022
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:
b68b18030f SCUMM: Reject the corrupted version of MONKEY1-EGA from Limited Run Games
Commit: b68b18030ff7dccdd531315dc7eb1cc53c40cf1c
https://github.com/scummvm/scummvm/commit/b68b18030ff7dccdd531315dc7eb1cc53c40cf1c
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-02-17T01:04:21+02:00
Commit Message:
SCUMM: Reject the corrupted version of MONKEY1-EGA from Limited Run Games
In its officially-licensed Monkey Island Anthology, Limited Run Games
included a corrupted fourth disk for the EGA Version of Monkey Island 1.
The affected files are 903.LFL and DISK04.LEC, breaking a font, the
Mêlée Island map, thus making the game unplayable very early on.
Fortunately, Limited Run Games also included a KryoFlux dump of the same
floppy, so it's possible to restore working 903.LFL and DISK04.LEC files
from it. But this is out of the scope of ScummVM.
ScummVM could maybe provide a binary patch for this, but unfortunately,
903.LFL is almost entirely corrupted, so providing a binary patch for it
would make it too close to the full and copyrighted resources.
The most useful thing that ScummVM can do, however, it to detect this
version, warn the user about it (instead of letting them play it and
see it crash), and mention that redirect them to the Limited Run Games
technical support, or to the online guides explaining how to recover
working 903.LFL and DISK04.LEC files.
If the user replace those corrupted files, the game will be added, as
expected.
Changed paths:
engines/scumm/detection_internal.h
diff --git a/engines/scumm/detection_internal.h b/engines/scumm/detection_internal.h
index a238a5b2671..8dc5a5f610f 100644
--- a/engines/scumm/detection_internal.h
+++ b/engines/scumm/detection_internal.h
@@ -25,6 +25,8 @@
#include "common/debug.h"
#include "common/md5.h"
+#include "gui/error.h"
+
#include "scumm/detection_tables.h"
#include "scumm/scumm-md5.h"
#include "scumm/file_nes.h"
@@ -109,7 +111,7 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com
// Search for a node with the given "name", inside fslist. Ignores case
// when performing the matching. The first match is returned, so if you
-// search for "resource" and two nodes "RESOURE and "resource" are present,
+// search for "resource" and two nodes "RESOURCE" and "resource" are present,
// the first match is used.
static bool searchFSNode(const Common::FSList &fslist, const Common::String &name, Common::FSNode &result) {
for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
@@ -330,6 +332,37 @@ static void computeGameSettingsFromMD5(const Common::FSList &fslist, const GameF
// The gameid either matches, or is empty. The latter indicates
// 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
+ if (g->id == GID_MONKEY_EGA && g->platform == Common::kPlatformDOS) {
+ Common::String md5Disk04, md5Lfl903;
+ Common::FSNode resFile;
+ Common::File f;
+
+ if (searchFSNode(fslist, "903.LFL", resFile))
+ f.open(resFile);
+ if (f.isOpen()) {
+ md5Lfl903 = Common::computeStreamMD5AsString(f, kMD5FileSizeLimit);
+ f.close();
+ }
+
+ if (searchFSNode(fslist, "DISK04.LEC", resFile))
+ f.open(resFile);
+ if (f.isOpen()) {
+ md5Disk04 = Common::computeStreamMD5AsString(f, kMD5FileSizeLimit);
+ f.close();
+ }
+
+ if ((!md5Lfl903.empty() && md5Lfl903 == "54d4e17df08953b483d17416043345b9") ||
+ (!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."));
+ continue;
+ }
+ }
+
// Perfect match found, use it and stop the loop.
dr.game = *g;
dr.game.gameid = md5Entry->gameid;
More information about the Scummvm-git-logs
mailing list