diff --git a/Analyser/Static/Enterprise/StaticAnalyser.cpp b/Analyser/Static/Enterprise/StaticAnalyser.cpp index e69de29bb..7b701b1d9 100644 --- a/Analyser/Static/Enterprise/StaticAnalyser.cpp +++ b/Analyser/Static/Enterprise/StaticAnalyser.cpp @@ -0,0 +1,34 @@ +// +// StaticAnalyser.cpp +// Clock Signal +// +// Created by Thomas Harte on 24/06/2021. +// Copyright 2021 Thomas Harte. All rights reserved. +// + +#include "StaticAnalyser.hpp" +#include "Target.hpp" + +Analyser::Static::TargetList Analyser::Static::Enterprise::GetTargets(const Media &media, const std::string &, TargetPlatform::IntType) { + // This analyser can comprehend disks only. + if(media.disks.empty()) return {}; + + // Otherwise, for now: wave it through. + Analyser::Static::TargetList targets; + + using Target = Analyser::Static::Enterprise::Target; + auto *const target = new Target; + target->media = media; + + // Always require a BASIC. + target->basic_version = Target::BASICVersion::Any; + + // If this is a single-sided floppy disk, guess the Macintosh 512kb. + if(!media.disks.empty()) { + target->dos = Target::DOS::EXDOS; + } + + targets.push_back(std::unique_ptr(target)); + + return targets; +} diff --git a/Analyser/Static/Enterprise/StaticAnalyser.hpp b/Analyser/Static/Enterprise/StaticAnalyser.hpp index e69de29bb..0d7435d0a 100644 --- a/Analyser/Static/Enterprise/StaticAnalyser.hpp +++ b/Analyser/Static/Enterprise/StaticAnalyser.hpp @@ -0,0 +1,27 @@ +// +// StaticAnalyser.hpp +// Clock Signal +// +// Created by Thomas Harte on 24/06/2021. +// Copyright 2018 Thomas Harte. All rights reserved. +// + +#ifndef Analyser_Static_Enterprise_StaticAnalyser_hpp +#define Analyser_Static_Enterprise_StaticAnalyser_hpp + +#include "../StaticAnalyser.hpp" +#include "../../../Storage/TargetPlatforms.hpp" +#include + +namespace Analyser { +namespace Static { +namespace Enterprise { + +TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); + +} +} +} + + +#endif /* Analyser_Static_Enterprise_StaticAnalyser_hpp */ diff --git a/Analyser/Static/StaticAnalyser.cpp b/Analyser/Static/StaticAnalyser.cpp index e145e8345..7f88415d2 100644 --- a/Analyser/Static/StaticAnalyser.cpp +++ b/Analyser/Static/StaticAnalyser.cpp @@ -23,6 +23,7 @@ #include "Coleco/StaticAnalyser.hpp" #include "Commodore/StaticAnalyser.hpp" #include "DiskII/StaticAnalyser.hpp" +#include "Enterprise/StaticAnalyser.hpp" #include "Macintosh/StaticAnalyser.hpp" #include "MSX/StaticAnalyser.hpp" #include "Oric/StaticAnalyser.hpp" @@ -257,6 +258,7 @@ TargetList Analyser::Static::GetTargets(const std::string &file_name) { Append(Coleco); Append(Commodore); Append(DiskII); + Append(Enterprise); Append(Macintosh); Append(MSX); Append(Oric);