From e68ff6404541365406baec8fec84b01a9c4d66f4 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 27 Aug 2016 13:42:51 -0400 Subject: [PATCH] Actually, this is less prescriptive. --- .../Clock Signal.xcodeproj/project.pbxproj | 14 +++++++++ StaticAnalyser/Commodore/Tape.cpp | 9 ++++++ StaticAnalyser/Commodore/Tape.hpp | 30 +++++++++++++++++++ StaticAnalyser/StaticAnalyser.cpp | 21 +++++++++++++ StaticAnalyser/StaticAnalyser.hpp | 16 +++++----- 5 files changed, 82 insertions(+), 8 deletions(-) create mode 100644 StaticAnalyser/Commodore/Tape.cpp create mode 100644 StaticAnalyser/Commodore/Tape.hpp diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index c25aabfb6..2452b3d58 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -334,6 +334,7 @@ 4BC751B21D157E61006C31D9 /* 6522Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BC751B11D157E61006C31D9 /* 6522Tests.swift */; }; 4BC76E691C98E31700E6EF73 /* FIRFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC76E671C98E31700E6EF73 /* FIRFilter.cpp */; }; 4BC76E6B1C98F43700E6EF73 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC76E6A1C98F43700E6EF73 /* Accelerate.framework */; }; + 4BC830D11D6E7C690000A26F /* Tape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC830CF1D6E7C690000A26F /* Tape.cpp */; }; 4BC91B831D1F160E00884B76 /* CommodoreTAP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC91B811D1F160E00884B76 /* CommodoreTAP.cpp */; }; 4BC9DF451D044FCA00F44158 /* ROMImages in Resources */ = {isa = PBXBuildFile; fileRef = 4BC9DF441D044FCA00F44158 /* ROMImages */; }; 4BC9DF4F1D04691600F44158 /* 6560.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BC9DF4D1D04691600F44158 /* 6560.cpp */; }; @@ -749,6 +750,8 @@ 4BC76E671C98E31700E6EF73 /* FIRFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FIRFilter.cpp; sourceTree = ""; }; 4BC76E681C98E31700E6EF73 /* FIRFilter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = FIRFilter.hpp; sourceTree = ""; }; 4BC76E6A1C98F43700E6EF73 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + 4BC830CF1D6E7C690000A26F /* Tape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Tape.cpp; path = ../../StaticAnalyser/Commodore/Tape.cpp; sourceTree = ""; }; + 4BC830D01D6E7C690000A26F /* Tape.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Tape.hpp; path = ../../StaticAnalyser/Commodore/Tape.hpp; sourceTree = ""; }; 4BC91B811D1F160E00884B76 /* CommodoreTAP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommodoreTAP.cpp; sourceTree = ""; }; 4BC91B821D1F160E00884B76 /* CommodoreTAP.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = CommodoreTAP.hpp; sourceTree = ""; }; 4BC9DF441D044FCA00F44158 /* ROMImages */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ROMImages; path = ../../../../ROMImages; sourceTree = ""; }; @@ -1466,6 +1469,15 @@ path = Shaders; sourceTree = ""; }; + 4BC830D21D6E7C6D0000A26F /* Commodore */ = { + isa = PBXGroup; + children = ( + 4BC830CF1D6E7C690000A26F /* Tape.cpp */, + 4BC830D01D6E7C690000A26F /* Tape.hpp */, + ); + name = Commodore; + sourceTree = ""; + }; 4BC9DF4A1D04691600F44158 /* Components */ = { isa = PBXGroup; children = ( @@ -1516,6 +1528,7 @@ children = ( 4BF1354A1D6D2C300054B2EA /* StaticAnalyser.cpp */, 4BF1354B1D6D2C300054B2EA /* StaticAnalyser.hpp */, + 4BC830D21D6E7C6D0000A26F /* Commodore */, ); name = StaticAnalyser; sourceTree = ""; @@ -1945,6 +1958,7 @@ 4BC76E691C98E31700E6EF73 /* FIRFilter.cpp in Sources */, 4B55CE5F1C3B7D960093A61B /* MachineDocument.swift in Sources */, 4B2A53A11D117D36003C6002 /* CSAtari2600.mm in Sources */, + 4BC830D11D6E7C690000A26F /* Tape.cpp in Sources */, 4B69FB441C4D941400B5F0AA /* TapeUEF.cpp in Sources */, 4B4DC8211D2C2425003C5BF8 /* Vic20.cpp in Sources */, 4BAB62B51D327F7E00DF5BA0 /* G64.cpp in Sources */, diff --git a/StaticAnalyser/Commodore/Tape.cpp b/StaticAnalyser/Commodore/Tape.cpp new file mode 100644 index 000000000..ea826fe3f --- /dev/null +++ b/StaticAnalyser/Commodore/Tape.cpp @@ -0,0 +1,9 @@ +// +// Tape.cpp +// Clock Signal +// +// Created by Thomas Harte on 24/08/2016. +// Copyright © 2016 Thomas Harte. All rights reserved. +// + +#include "Tape.hpp" diff --git a/StaticAnalyser/Commodore/Tape.hpp b/StaticAnalyser/Commodore/Tape.hpp new file mode 100644 index 000000000..7734b683f --- /dev/null +++ b/StaticAnalyser/Commodore/Tape.hpp @@ -0,0 +1,30 @@ +// +// Tape.hpp +// Clock Signal +// +// Created by Thomas Harte on 24/08/2016. +// Copyright © 2016 Thomas Harte. All rights reserved. +// + +#ifndef StaticAnalyser_Commodore_Tape_hpp +#define StaticAnalyser_Commodore_Tape_hpp + +#include +#include "../StaticAnalyser.hpp" + +namespace StaticAnalyser { +namespace Commodore { + +struct File { + uint16_t starting_address; + uint16_t ending_address; + enum { + Program, + Stream + } Type; + std::vector data; +}; + +} +} +#endif /* Tape_hpp */ diff --git a/StaticAnalyser/StaticAnalyser.cpp b/StaticAnalyser/StaticAnalyser.cpp index 320063b44..a0c95f7c2 100644 --- a/StaticAnalyser/StaticAnalyser.cpp +++ b/StaticAnalyser/StaticAnalyser.cpp @@ -7,3 +7,24 @@ // #include "StaticAnalyser.hpp" + +using namespace StaticAnalyser; + +std::list GetTargets(std::shared_ptr disk, std::shared_ptr tape, std::shared_ptr> rom) +{ + std::list targets; + + if(disk) + { + } + + if(tape) + { + } + + if(rom) + { + } + + return targets; +} diff --git a/StaticAnalyser/StaticAnalyser.hpp b/StaticAnalyser/StaticAnalyser.hpp index f53d6c01f..e1dd0986c 100644 --- a/StaticAnalyser/StaticAnalyser.hpp +++ b/StaticAnalyser/StaticAnalyser.hpp @@ -9,8 +9,8 @@ #ifndef StaticAnalyser_hpp #define StaticAnalyser_hpp -#include "../Storage/Disk/Disk.hpp" #include "../Storage/Tape/Tape.hpp" +#include "../Storage/Disk/Disk.hpp" #include #include #include @@ -47,17 +47,17 @@ struct Target { std::string loadingCommand; union { - enum class Electron { - TypeCommand, + enum class BBCElectron { HoldShift - } Electron; - enum class Vic20 { - TypeCommand, - } Vic20; + } BBCElectron; } LoadingMethod; + + std::list> disks; + std::list> tapes; + // TODO: ROMs. Probably can't model as raw data, but then how to handle bus complexities? }; -std::list GetTargets(std::shared_ptr disk, std::shared_ptr tape, std::shared_ptr> rom); +std::list GetTargets(const char *file_name); }