MD5 hash check disable

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
User avatar
MAN-biker
Posts: 20
Joined: Wed Dec 28, 2005 1:30 pm
Location: Russia, Moscow

MD5 hash check disable

Post by MAN-biker »

I'm working on Lands of Lore RUSSIAN translation, so hashes of *.PAK files changes every test build.
I need a way to run the game without checking MD5.
Is any option/switch in SCUMM VM engine to ignore MD5?

Help me, please.
User avatar
dreammaster
ScummVM Developer
Posts: 559
Joined: Fri Nov 04, 2005 2:16 am
Location: San Jose, California, USA

Re: MD5 hash check disable

Post by dreammaster »

MAN-biker wrote:I'm working on Lands of Lore RUSSIAN translation, so hashes of *.PAK files changes every test build.
I need a way to run the game without checking MD5.
Is any option/switch in SCUMM VM engine to ignore MD5?

Help me, please.
I'm not sure if there's a cleaner way, but one general option is to temporarily change the detection entry from pointing to a file you're changing to one that will remain static. You could even create a text file and have the detection entry point to it, and only revert the detection back to the original files once you've finished your translation.
User avatar
theruler
Posts: 31
Joined: Tue Jan 08, 2008 5:38 pm
Location: Italy
Contact:

Post by theruler »

It would be helpful. Could someone tell me which option should I modify and where this text file would be located and formatted?

thanks
Collector
Posts: 549
Joined: Sun Oct 30, 2005 6:58 pm
Contact:

Post by Collector »

I'm sure that dreammaster meant the ScummVM source. The file would not matter, it would just need to remain unchanged.
User avatar
sev
ScummVM Lead
Posts: 2305
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Re: MD5 hash check disable

Post by sev »

MAN-biker wrote: Is any option/switch in SCUMM VM engine to ignore MD5?
There is no single engine in ScummVM and detection is specific to every engine.

We have this mechanism which is called fallback detection, which is usually filename-based, but it has to be actually implemented.

Alternatively instead of creating a full-blown fallback detection you may just add game entry without md5s to relevant detection table. If the engine uses our AdvancedDetector code (and vast majority do), then these tables live either in detection.cpp or detection_tables.h files.


Eugene
User avatar
theruler
Posts: 31
Joined: Tue Jan 08, 2008 5:38 pm
Location: Italy
Contact:

Post by theruler »

Thanks collector, I build every time the source and was searching for a faster method, the rush probably confused me.
I see, sev. So if I delete the specific md5 in detection_tables.h, detection for that game is actually bypassed.
That's a clever option I did not think of, like dreammaster's. Thanks guys.
User avatar
sev
ScummVM Lead
Posts: 2305
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

theruler wrote:So if I delete the specific md5 in detection_tables.h, detection for that game is actually bypassed.
No, not quite correct. If you put 0 there, md5 will not be taken into account during comparison. To ignore filesize, put -1 there. Basically, only filename is mandatory.

you may read more about it in Advanced Detector documentation.


Eugene
User avatar
theruler
Posts: 31
Joined: Tue Jan 08, 2008 5:38 pm
Location: Italy
Contact:

Post by theruler »

Roger.
fileSize -- file size in bytes. Optional too, set to -1 in order to match against any file size.
I should have read that.

Thank you very much, Eugene.
User avatar
Aldark
Posts: 2
Joined: Mon Nov 10, 2014 10:59 am
Location: Ukraine
Contact:

Post by Aldark »

Alternatively instead of creating a full-blown fallback detection you may just add game entry without md5s to relevant detection table. If the engine uses our AdvancedDetector code (and vast majority do), then these tables live either in detection.cpp or detection_tables.h files.
Are you going to move these tables to external file?

It would be much easier to maintain different versions of same game this way (no need to recompile scummvm every time when someone wants to add support for his own game's build into scummvm).
User avatar
LordHoto
ScummVM Developer
Posts: 1029
Joined: Sun Oct 30, 2005 3:58 pm
Location: Germany

Post by LordHoto »

Aldark wrote:
Alternatively instead of creating a full-blown fallback detection you may just add game entry without md5s to relevant detection table. If the engine uses our AdvancedDetector code (and vast majority do), then these tables live either in detection.cpp or detection_tables.h files.
Are you going to move these tables to external file?
No, there are no plans to do that. The reason is simple: A specific version of ScummVM only supports a specific set of detected games. Moving it to seperate files would require special handling of assuring the table format is not corrupted, supported by ScummVM (occassionally engines make changes for their specific additional information) etc.
User avatar
Aldark
Posts: 2
Joined: Mon Nov 10, 2014 10:59 am
Location: Ukraine
Contact:

Post by Aldark »

LordHoto wrote:No, there are no plans to do that. The reason is simple: A specific version of ScummVM only supports a specific set of detected games. Moving it to seperate files would require special handling of assuring the table format is not corrupted, supported by ScummVM (occassionally engines make changes for their specific additional information) etc.
LordHoto, thank you for your reply!

Okay, I've got the point: with current codebase it is almost impossible to move that large amount of tables to external files and make it work correctly.

Basically, I am working on Lands of Lore russian translation (we both with MAN-Biker). We are going to have regular updates for translation so md5 hash will be changing often. As far as I can see, the best solution for our problem is creating a fork of ScummVM with empty md5 entries for russian LOL in detection_tables.h, isn't it?
hexaae
Posts: 51
Joined: Fri Jun 25, 2010 5:04 pm

Post by hexaae »

When will the fallback detection "check only file name" be implemented (as a launch option?)?
This will make life much easier for fan-made translations...

BTW, I've found some translations f.e. in kyra.dat which is now incorporated in the scummvm.exe itself. This is a problem for fan-made translations: external editable files "the old way" would be better in this case.
Post Reply