diff options
author | Paul Gilbert | 2018-11-15 20:52:36 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | 238022890edd256182d0bebd894af39a7f6cd79b (patch) | |
tree | 207d4f8ae2e2385b0cd342e5cb5ec77f326132a4 /engines | |
parent | dee20ace65cb16a30c80c0790462d569f5da627d (diff) | |
download | scummvm-rg350-238022890edd256182d0bebd894af39a7f6cd79b.tar.gz scummvm-rg350-238022890edd256182d0bebd894af39a7f6cd79b.tar.bz2 scummvm-rg350-238022890edd256182d0bebd894af39a7f6cd79b.zip |
GLK: FROTZ: Debug code to generate detection entries for unknown games
Used it to flesh out the list of Infocom game detection entries
Diffstat (limited to 'engines')
-rw-r--r-- | engines/glk/frotz/detection.cpp | 21 | ||||
-rw-r--r-- | engines/glk/frotz/detection_tables.h | 49 |
2 files changed, 68 insertions, 2 deletions
diff --git a/engines/glk/frotz/detection.cpp b/engines/glk/frotz/detection.cpp index 9ac033b29e..61d9a1455e 100644 --- a/engines/glk/frotz/detection.cpp +++ b/engines/glk/frotz/detection.cpp @@ -22,6 +22,7 @@ #include "glk/frotz/detection.h" #include "glk/frotz/detection_tables.h" +#include "common/debug.h" #include "common/file.h" #include "common/md5.h" @@ -63,6 +64,11 @@ bool FrotzMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g continue; Common::String md5 = Common::computeStreamMD5AsString(gameFile, 5000); size_t filesize = gameFile.size(); + char serial[7] = "unkown"; + if (!filename.hasSuffixIgnoreCase(".zblorb")) { + gameFile.seek(18); + gameFile.read(&serial[0], 6); + } gameFile.close(); // Check for known game @@ -76,7 +82,20 @@ bool FrotzMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g if (filename.hasSuffixIgnoreCase(".dat")) continue; - warning("Uknown zcode game %s - %s %d", filename.c_str(), md5.c_str(), filesize); + if (gDebugLevel > 0) { + // Print an entry suitable for putting into the detection_tables.h, using the + // name of the parent folder the game is in as the presumed game Id + Common::String folderName = file->getParent().getName(); + if (folderName.hasSuffix("\\")) + folderName.deleteLastChar(); + Common::String fname = filename; + const char *dot = strchr(fname.c_str(), '.'); + if (dot) + fname = Common::String(fname.c_str(), dot); + + debug("ENTRY0(\"%s\", \"%s-%s\", \"%s\", %u),", + folderName.c_str(), fname.c_str(), serial, md5.c_str(), filesize); + } const PlainGameDescriptor &desc = FROTZ_GAME_LIST[0]; gd = DetectedGame(desc.gameId, desc.description, Common::UNK_LANG, Common::kPlatformUnknown); } else { diff --git a/engines/glk/frotz/detection_tables.h b/engines/glk/frotz/detection_tables.h index 8e6da37e54..179067c0cb 100644 --- a/engines/glk/frotz/detection_tables.h +++ b/engines/glk/frotz/detection_tables.h @@ -87,9 +87,11 @@ const PlainGameDescriptor FROTZ_GAME_LIST[] = { #define NONE GUIO4(GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMUSIC, GUIO_NOSUBTITLES) #define ENTRY0(ID, VERSION, MD5, FILESIZE) { ID, VERSION, MD5, FILESIZE, Common::EN_ANY, NONE } +#define ENTRY1(ID, VERSION, MD5, FILESIZE, LANG) { ID, VERSION, MD5, FILESIZE, LANG, NONE } #define FROTZ_TABLE_END_MARKER { nullptr, nullptr, nullptr, 0, Common::EN_ANY, "" } const FrotzGameDescription FROTZ_GAMES[] = { + // Infocom Games - English ENTRY0("amfv", "R77-850814", "b7ffaed0ca4a90450f92b34066133377", 262016), ENTRY0("amfv", "R79-851122", "1e37dbcf7ccc9244dbfc3229796362f4", 262544), ENTRY0("arthur", "R54-890606", "ced2c66d03a49de0e8190b468332f081", 271360), @@ -157,8 +159,53 @@ const FrotzGameDescription FROTZ_GAMES[] = { ENTRY0("starcross", "R17-821021", "ed1e62e1f0eb9d819be45c076c5729f7", 83792), ENTRY0("stationfall", "R107-870430", "cfadfb66afabaa2971ec9b4ae65266ca", 128934), ENTRY0("suspect", "R14-841005", "3d759ccb19233f51968fa79d7374b393", 118692), + ENTRY0("suspended", "v5-830222", "d898430e3cccdee9f9acfffcc9ef709c", 105418), + ENTRY0("suspended", "R7-830419", "65f0cc760a2500d110242fbf942f1028", 105500), + ENTRY0("suspended", "R8-830521", "b749d42462dfec21831b69635cd9c5e8", 105492), + ENTRY0("suspended", "R8_2-840521", "6088ad7cb553626b52875a9b8e801312", 105584), + ENTRY0("trinity", "R11-860509", "994ea591f8d401e11661c912b92ee05e", 262016), + ENTRY0("trinity", "R12-860926", "5377dc1ee39f1c8ed572944f89946eb2", 262064), + ENTRY0("wishbringer", "R23-880706", "bec823084c5622e88eca5a886278d2a5", 164712), + ENTRY0("wishbringer", "R68-850501", "898b9b157ce8e54a0953366d6317fbd5", 128952), + ENTRY0("wishbringer", "R69-850920", "e7c0412c4b3bda39de438a02cbae3816", 128904), + ENTRY0("thewitness", "R13-830524", "d2297ddfe2c1b976c1b0c381ab01e2b3", 102608), + ENTRY0("thewitness", "R18-830910", "a6e441b0b92a72537c830fed201267af", 103728), + ENTRY0("thewitness", "R22-840924", "1019b9b1e1aa2c6eda945d7d92c2073a", 104664), + ENTRY0("zork0", "R296-881019", "fca554c21542729c9d154c319af6307e", 295536), + ENTRY0("zork0", "R366-demo-890323", "b58c35dc2ba36d48fade99564922c7c3", 296376), + ENTRY0("zork0", "R366-890323", "e787b2cad2d6f29fd812e737f75646e8", 296376), + ENTRY0("zork0", "R383-890602", "32e3e7ec438dabe77df2351af6ece324", 299392), + ENTRY0("zork0", "R393-890714", "29fb0e090bbff7bc8e9661e55da69ae7", 299968), + ENTRY0("zork1", "R15-UG3AU5", "fa2d22304700898cb8de921f46ca4bc9", 78566), + ENTRY0("zork1", "R20", "b222bed4a0ab2650135cba7f4b1b1c67", 75734), + ENTRY0("zork1", "R23-820428", "6ad3d9ab2874beefcbc53630e9261118", 75780), + ENTRY0("zork1", "R25-820515", "287a1ce17f458fb2e776499a13796719", 75808), + ENTRY0("zork1", "R26-820803", "285f1d7c5deb1a2f23825f63823d0777", 75964), + ENTRY0("zork1", "R28-821013", "83bb70d73f3b4b5c4a32d8588b2d0707", 76018), + ENTRY0("zork1", "R30-830330", "d6d8b3ae49a683a6fce2383a8bab36a5", 76324), + ENTRY0("zork1", "R5", "dd5ba502b30189d03abfcfb9817dffe0", 82836), + ENTRY0("zork1", "R52-871125", "e56267fd041c71fc229f7deb6b6537c2", 105264), + ENTRY0("zork1", "R75-830929", "b35bca8dd18f6312c7e54dcd7958d7e5", 84868), + ENTRY0("zork1", "R76-840509", "50ebf3c0c959ac2571c23cb7f7907c70", 84874), + ENTRY0("zork1", "R88-840726", "d708b6751126f3b2b7612c760f080d41", 84876), + ENTRY0("zork2", "R15-820308", "4b6ecc8e40243ddbd4cc19ef82304c3b", 82110), + ENTRY0("zork2", "R17-820427", "386f2cd937e0ca316695d6ddca521c78", 82368), + ENTRY0("zork2", "R18-820512", "a019dd721134b57f5926ee2adf634b55", 82422), + ENTRY0("zork2", "R18_2-820517", "6cafa0e5239a74aa120bb8e2c33441be", 82422), + ENTRY0("zork2", "R19-820721", "a5236020509af26b47c737e51ce884aa", 82586), + ENTRY0("zork2", "R22-830331", "600264d62720731283454592261ec3fe", 82920), + ENTRY0("zork2", "R23-830411", "6c2e766b553c127bb07f7a0f8fe03ae2", 81876), + ENTRY0("zork2", "R48-840904", "a5064c9c3ce0bc02f16e01d745f39b67", 89912), + ENTRY0("zork2", "R7-UG3AU5", "8243ce12e7b3ce24b150f34cc2cb472c", 85260), + ENTRY0("zork3", "R10-820818", "ba4897f4d82ba08906295dd3aebf501a", 82334), + ENTRY0("zork3", "R15-830331", "2fb29e6f5eebb643f42714ca9086e145", 82558), + ENTRY0("zork3", "R15_2-840518", "672b54d8f457bd3be32e41fc9e069d71", 82642), + ENTRY0("zork3", "R16-830410", "4717f8ec2f08da7d438c05f1351d28bd", 81626), + ENTRY0("zork3", "R17-840727", "c5dc520f469771c59d193558d405341d", 82714), + ENTRY0("ztuu", "ztuu-970828", "3a55991be19943a13da58a91cd3615eb", 102524), - + // Infocom Games - Foreign + ENTRY1("zork1", "R3-880113", "9f336c92c1fd392fc7e81288e5c9b6ab", 116216, Common::DE_DEU), FROTZ_TABLE_END_MARKER }; |