diff --git a/Analyser/Static/ZXSpectrum/StaticAnalyser.cpp b/Analyser/Static/ZXSpectrum/StaticAnalyser.cpp index dbf594642..dc34a15b0 100644 --- a/Analyser/Static/ZXSpectrum/StaticAnalyser.cpp +++ b/Analyser/Static/ZXSpectrum/StaticAnalyser.cpp @@ -26,8 +26,11 @@ enum class KnownGame { DarkStar, Deathchase, FantasyWorldDizzy, + JetPac, + KnightLore, MatchDayII, SabreWulf, + Underwurlde, }; namespace Signatures { @@ -65,6 +68,33 @@ constexpr std::array fantasy_world_dizzy{ 0x4c, 0x4f, 0x55, 0x44, 0x3a, 0x43, 0x41, 0x53, 0x54, 0x4c, 0x45, 0x3c, }; +// Game copyright message. +constexpr std::array jet_pac{ + 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x31, 0x39, + 0x38, 0x33, 0x20, 0x41, 0x2e, 0x43, 0x2e, 0x47, 0x2e, 0x20, 0x41, 0x4c, + 0x4c, 0x20, 0x52, 0x49, 0x47, 0x48, 0x54, 0x53, 0x20, 0x52, 0x45, 0x53, + 0x45, 0x52, 0x56, 0x45, 0x44, +}; + +// Graphical data, I think. +constexpr std::array knight_lore{ + 0x44, 0x5c, 0x5c, 0x5c, 0x58, 0x58, 0x6b, 0x6b, 0x68, 0x68, 0x55, 0x55, + 0x5a, 0x5a, 0x58, 0x58, 0x58, 0x4b, 0x49, 0x4f, 0x56, 0x56, 0x56, 0x56, + 0x00, 0x00, 0x47, 0x47, 0x46, 0x46, 0x46, 0x46, 0x43, 0x43, 0x44, 0x5c, + 0x5c, 0x4b, 0x4b, 0x58, 0x6b, 0x4d, 0x4d, 0x55, 0x55, 0x55, 0x5a, 0x5a, + 0x5a, 0x58, 0x4b, 0x49, 0x56, 0x56, 0x56, 0x56, 0x46, 0x46, 0x47, 0x47, + 0x46, 0x46, 0x47, 0x43, 0x43, 0x43, 0x46, 0x44, 0x5c, 0x58, 0x4b, 0x4b, + 0x4b, 0x49, 0x4d, 0x4d, 0x4d, 0x4a, 0x4a, 0x4a, 0x4a, 0x5a, 0x58, 0x4b, + 0x56, 0x56, 0x56, 0x56, 0x46, 0x47, 0x47, 0x00, 0x00, 0x46, 0x43, 0x7b, + 0x7b, 0x47, 0x47, 0x44, 0x5c, 0x5c, 0x58, 0x4b, 0x4f, 0x4f, 0x4f, 0x4f, + 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4a, 0x5a, 0x58, 0x56, 0x56, 0x56, 0x56, + 0x46, 0x47, 0x00, 0x00, 0x00, 0x46, 0x7b, 0x7b, 0x47, 0x47, 0x46, 0x00, + 0x44, 0x5c, 0x58, 0x4b, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, + 0x4f, 0x4a, 0x5a, 0x58, 0x56, 0x56, 0x56, 0x56, 0x47, 0x47, 0x47, 0x47, + 0x47, 0x43, 0x7b, 0x7b, 0x7b, 0x47, 0x00, 0x47, 0x44, 0x44, 0x5c, 0x4b, + 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4a, 0x5a, 0x58, +}; + // Text (with specialised control characters) including the author's names and some football-related words. constexpr std::array match_day_ii{ 0x82, 0x86, 0x1a, 0x00, 0x42, 0x45, 0x52, 0x4e, 0x49, 0x45, 0x06, 0x18, @@ -87,6 +117,14 @@ constexpr std::array sabre_wulf{ 0x52, 0x2f, 0x52, 0x2f, 0x52, 0x2f, 0x52, 0x2f, }; +// Congratulations text. +constexpr std::array underwurlde{ + 0x59, 0x4f, 0x55, 0x20, 0x48, 0x41, 0x56, 0x45, 0x20, 0x45, 0x53, 0x43, + 0x41, 0x50, 0x45, 0x44, 0x20, 0x46, 0x52, 0x4f, 0x4d, 0xa0, 0x54, 0x48, + 0x45, 0x20, 0x55, 0x4e, 0x44, 0x45, 0x52, 0x57, 0x55, 0x52, 0x4c, 0x44, + 0x45, +}; + } std::optional known_game(const std::vector &code) { @@ -100,8 +138,11 @@ std::optional known_game(const std::vector &code) { if(contains(Signatures::dark_star)) return KnownGame::DarkStar; if(contains(Signatures::deathchase)) return KnownGame::Deathchase; if(contains(Signatures::fantasy_world_dizzy)) return KnownGame::FantasyWorldDizzy; + if(contains(Signatures::jet_pac)) return KnownGame::JetPac; + if(contains(Signatures::knight_lore)) return KnownGame::KnightLore; if(contains(Signatures::match_day_ii)) return KnownGame::MatchDayII; if(contains(Signatures::sabre_wulf)) return KnownGame::SabreWulf; + if(contains(Signatures::underwurlde)) return KnownGame::Underwurlde; return std::nullopt; } @@ -250,8 +291,11 @@ Analyser::Static::TargetList Analyser::Static::ZXSpectrum::GetTargets( case BCsQuestForTyres: case DarkStar: case Deathchase: + case JetPac: + case KnightLore: case MatchDayII: case SabreWulf: + case Underwurlde: target->model = Target::Model::FortyEightK; break;