From 02b7c3d1b094560deae511810749785bbf6d5c4a Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 4 Jun 2017 17:04:06 -0400 Subject: [PATCH] Added the necessary wiring to get into a ZX80/81-oriented part of the static analyser, which could in principle post a ZX80 target. --- .../Clock Signal.xcodeproj/project.pbxproj | 16 ++++++++++- StaticAnalyser/StaticAnalyser.cpp | 2 ++ StaticAnalyser/StaticAnalyser.hpp | 3 ++- StaticAnalyser/ZX8081/StaticAnalyser.cpp | 16 +++++++++++ StaticAnalyser/ZX8081/StaticAnalyser.hpp | 27 +++++++++++++++++++ 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 StaticAnalyser/ZX8081/StaticAnalyser.cpp create mode 100644 StaticAnalyser/ZX8081/StaticAnalyser.hpp diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index 553aac6f1..f7f699843 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -20,6 +20,7 @@ 4B1414601B58885000E04248 /* WolfgangLorenzTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B14145F1B58885000E04248 /* WolfgangLorenzTests.swift */; }; 4B1414621B58888700E04248 /* KlausDormannTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B1414611B58888700E04248 /* KlausDormannTests.swift */; }; 4B1497881EE4A1DA00CE2596 /* ZX80O.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1497861EE4A1DA00CE2596 /* ZX80O.cpp */; }; + 4B14978B1EE4AC5E00CE2596 /* StaticAnalyser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1497891EE4AC5E00CE2596 /* StaticAnalyser.cpp */; }; 4B1D08061E0F7A1100763741 /* TimeTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B1D08051E0F7A1100763741 /* TimeTests.mm */; }; 4B1E85751D170228001EF87D /* Typer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1E85731D170228001EF87D /* Typer.cpp */; }; 4B1E85811D176468001EF87D /* 6532Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B1E85801D176468001EF87D /* 6532Tests.swift */; }; @@ -467,6 +468,8 @@ 4B1414611B58888700E04248 /* KlausDormannTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KlausDormannTests.swift; sourceTree = ""; }; 4B1497861EE4A1DA00CE2596 /* ZX80O.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ZX80O.cpp; sourceTree = ""; }; 4B1497871EE4A1DA00CE2596 /* ZX80O.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ZX80O.hpp; sourceTree = ""; }; + 4B1497891EE4AC5E00CE2596 /* StaticAnalyser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StaticAnalyser.cpp; path = ../../StaticAnalyser/ZX8081/StaticAnalyser.cpp; sourceTree = ""; }; + 4B14978A1EE4AC5E00CE2596 /* StaticAnalyser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = StaticAnalyser.hpp; path = ../../StaticAnalyser/ZX8081/StaticAnalyser.hpp; sourceTree = ""; }; 4B1D08051E0F7A1100763741 /* TimeTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TimeTests.mm; sourceTree = ""; }; 4B1E85731D170228001EF87D /* Typer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Typer.cpp; sourceTree = ""; }; 4B1E85741D170228001EF87D /* Typer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Typer.hpp; sourceTree = ""; }; @@ -1067,6 +1070,15 @@ name = "Test Binaries"; sourceTree = ""; }; + 4B14978C1EE4AC6200CE2596 /* ZX80/81 */ = { + isa = PBXGroup; + children = ( + 4B1497891EE4AC5E00CE2596 /* StaticAnalyser.cpp */, + 4B14978A1EE4AC5E00CE2596 /* StaticAnalyser.hpp */, + ); + name = ZX80/81; + sourceTree = ""; + }; 4B1E85791D174DEC001EF87D /* 6532 */ = { isa = PBXGroup; children = ( @@ -2077,8 +2089,9 @@ 4BD14B121D7462810088EAD6 /* Acorn */, 4BA799961D8B65730045123D /* Atari */, 4BC830D21D6E7C6D0000A26F /* Commodore */, - 4BCF1FAC1DADD41F0039D2E7 /* Oric */, 4B5A12581DD55873007A2231 /* Disassembler */, + 4BCF1FAC1DADD41F0039D2E7 /* Oric */, + 4B14978C1EE4AC6200CE2596 /* ZX80/81 */, ); name = StaticAnalyser; sourceTree = ""; @@ -2547,6 +2560,7 @@ 4BF8295D1D8F048B001BAE39 /* MFM.cpp in Sources */, 4BE77A2E1D84ADFB00BC3827 /* File.cpp in Sources */, 4B5FADBD1DE31D1500AEC565 /* OricMFMDSK.cpp in Sources */, + 4B14978B1EE4AC5E00CE2596 /* StaticAnalyser.cpp in Sources */, 4B77069D1EC904570053B588 /* Z80.cpp in Sources */, 4BAB62B51D327F7E00DF5BA0 /* G64.cpp in Sources */, 4BD468F71D8DF41D0084958B /* 1770.cpp in Sources */, diff --git a/StaticAnalyser/StaticAnalyser.cpp b/StaticAnalyser/StaticAnalyser.cpp index 8b3df4c7e..d5c777ba8 100644 --- a/StaticAnalyser/StaticAnalyser.cpp +++ b/StaticAnalyser/StaticAnalyser.cpp @@ -15,6 +15,7 @@ #include "Atari/StaticAnalyser.hpp" #include "Commodore/StaticAnalyser.hpp" #include "Oric/StaticAnalyser.hpp" +#include "ZX8081/StaticAnalyser.hpp" // Cartridges #include "../Storage/Cartridge/Formats/BinaryDump.hpp" @@ -129,6 +130,7 @@ std::list StaticAnalyser::GetTargets(const char *file_name) if(potential_platforms & (TargetPlatformType)TargetPlatform::Atari2600) Atari::AddTargets(disks, tapes, cartridges, targets); if(potential_platforms & (TargetPlatformType)TargetPlatform::Commodore) Commodore::AddTargets(disks, tapes, cartridges, targets); if(potential_platforms & (TargetPlatformType)TargetPlatform::Oric) Oric::AddTargets(disks, tapes, cartridges, targets); + if(potential_platforms & (TargetPlatformType)TargetPlatform::ZX80) ZX8081::AddTargets(disks, tapes, cartridges, targets); free(lowercase_extension); } diff --git a/StaticAnalyser/StaticAnalyser.hpp b/StaticAnalyser/StaticAnalyser.hpp index 3d5cf2f61..8aef59c62 100644 --- a/StaticAnalyser/StaticAnalyser.hpp +++ b/StaticAnalyser/StaticAnalyser.hpp @@ -49,7 +49,8 @@ struct Target { Atari2600, Electron, Vic20, - Oric + Oric, + ZX80 } machine; float probability; diff --git a/StaticAnalyser/ZX8081/StaticAnalyser.cpp b/StaticAnalyser/ZX8081/StaticAnalyser.cpp new file mode 100644 index 000000000..505ea4811 --- /dev/null +++ b/StaticAnalyser/ZX8081/StaticAnalyser.cpp @@ -0,0 +1,16 @@ +// +// StaticAnalyser.cpp +// Clock Signal +// +// Created by Thomas Harte on 04/06/2017. +// Copyright © 2017 Thomas Harte. All rights reserved. +// + +#include "StaticAnalyser.hpp" + +void StaticAnalyser::ZX8081::AddTargets( + const std::list> &disks, + const std::list> &tapes, + const std::list> &cartridges, + std::list &destination) { +} diff --git a/StaticAnalyser/ZX8081/StaticAnalyser.hpp b/StaticAnalyser/ZX8081/StaticAnalyser.hpp new file mode 100644 index 000000000..470e5920f --- /dev/null +++ b/StaticAnalyser/ZX8081/StaticAnalyser.hpp @@ -0,0 +1,27 @@ +// +// StaticAnalyser.hpp +// Clock Signal +// +// Created by Thomas Harte on 04/06/2017. +// Copyright © 2017 Thomas Harte. All rights reserved. +// + +#ifndef StaticAnalyser_ZX8081_StaticAnalyser_hpp +#define StaticAnalyser_ZX8081_StaticAnalyser_hpp + +#include "../StaticAnalyser.hpp" + +namespace StaticAnalyser { +namespace ZX8081 { + +void AddTargets( + const std::list> &disks, + const std::list> &tapes, + const std::list> &cartridges, + std::list &destination +); + +} +} + +#endif /* StaticAnalyser_hpp */