From 9aa150c338655c7628123922a64346dc61c9e6a7 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 27 Aug 2017 15:02:13 -0400 Subject: [PATCH 1/6] Abstracts the target platform type out from the static analyser's ownership. --- .../Clock Signal.xcodeproj/project.pbxproj | 2 ++ StaticAnalyser/StaticAnalyser.cpp | 34 +++++++------------ Storage/TargetPlatforms.hpp | 31 +++++++++++++++++ 3 files changed, 45 insertions(+), 22 deletions(-) create mode 100644 Storage/TargetPlatforms.hpp diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index e77b72e90..40a7e30bb 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -1060,6 +1060,7 @@ 4BEF6AAB1D35D1C400E73575 /* DPLLTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DPLLTests.swift; sourceTree = ""; }; 4BF1354A1D6D2C300054B2EA /* StaticAnalyser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StaticAnalyser.cpp; path = ../../StaticAnalyser/StaticAnalyser.cpp; sourceTree = ""; }; 4BF1354B1D6D2C300054B2EA /* StaticAnalyser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = StaticAnalyser.hpp; path = ../../StaticAnalyser/StaticAnalyser.hpp; sourceTree = ""; }; + 4BF4A2D91F534DB300B171F4 /* TargetPlatforms.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = TargetPlatforms.hpp; sourceTree = ""; }; 4BF6606A1F281573002CB053 /* ClockReceiver.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ClockReceiver.hpp; sourceTree = ""; }; 4BF8295B1D8F048B001BAE39 /* MFM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MFM.cpp; path = Encodings/MFM.cpp; sourceTree = ""; }; 4BF8295C1D8F048B001BAE39 /* MFM.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = MFM.hpp; path = Encodings/MFM.hpp; sourceTree = ""; }; @@ -1457,6 +1458,7 @@ 4BB697C91D4B6D3E00248BDF /* TimedEventLoop.cpp */, 4B5FADB91DE3151600AEC565 /* FileHolder.hpp */, 4BAB62AE1D32730D00DF5BA0 /* Storage.hpp */, + 4BF4A2D91F534DB300B171F4 /* TargetPlatforms.hpp */, 4BB697CA1D4B6D3E00248BDF /* TimedEventLoop.hpp */, 4BEE0A691D72496600532C7B /* Cartridge */, 4B8805F81DCFF6CD003085B1 /* Data */, diff --git a/StaticAnalyser/StaticAnalyser.cpp b/StaticAnalyser/StaticAnalyser.cpp index ec5196ba5..68b6fdb8a 100644 --- a/StaticAnalyser/StaticAnalyser.cpp +++ b/StaticAnalyser/StaticAnalyser.cpp @@ -40,22 +40,12 @@ #include "../Storage/Tape/Formats/TZX.hpp" #include "../Storage/Tape/Formats/ZX80O81P.hpp" -typedef int TargetPlatformType; -enum class TargetPlatform: TargetPlatformType { - Acorn = 1 << 0, - AmstradCPC = 1 << 1, - Atari2600 = 1 << 2, - Commodore = 1 << 3, - Oric = 1 << 4, - ZX8081 = 1 << 5, - - AllTape = Acorn | AmstradCPC | Commodore | Oric | ZX8081, - AllDisk = Acorn | AmstradCPC | Commodore | Oric, -}; +// Target Platform Types +#include "../Storage/TargetPlatforms.hpp" using namespace StaticAnalyser; -static Media GetMediaAndPlatforms(const char *file_name, TargetPlatformType &potential_platforms) { +static Media GetMediaAndPlatforms(const char *file_name, TargetPlatform::IntType &potential_platforms) { // Get the extension, if any; it will be assumed that extensions are reliable, so an extension is a broad-phase // test as to file format. const char *mixed_case_extension = strrchr(file_name, '.'); @@ -72,7 +62,7 @@ static Media GetMediaAndPlatforms(const char *file_name, TargetPlatformType &pot Media result; #define Insert(list, class, platforms) \ list.emplace_back(new Storage::class(file_name));\ - potential_platforms |= (TargetPlatformType)(platforms);\ + potential_platforms |= platforms;\ #define TryInsert(list, class, platforms) \ try {\ @@ -132,7 +122,7 @@ static Media GetMediaAndPlatforms(const char *file_name, TargetPlatformType &pot } Media StaticAnalyser::GetMedia(const char *file_name) { - TargetPlatformType throwaway; + TargetPlatform::IntType throwaway; return GetMediaAndPlatforms(file_name, throwaway); } @@ -141,17 +131,17 @@ std::list StaticAnalyser::GetTargets(const char *file_name) { // Collect all disks, tapes and ROMs as can be extrapolated from this file, forming the // union of all platforms this file might be a target for. - TargetPlatformType potential_platforms = 0; + TargetPlatform::IntType potential_platforms = 0; Media media = GetMediaAndPlatforms(file_name, potential_platforms); // Hand off to platform-specific determination of whether these things are actually compatible and, // if so, how to load them. - if(potential_platforms & (TargetPlatformType)TargetPlatform::Acorn) Acorn::AddTargets(media, targets); - if(potential_platforms & (TargetPlatformType)TargetPlatform::AmstradCPC) AmstradCPC::AddTargets(media, targets); - if(potential_platforms & (TargetPlatformType)TargetPlatform::Atari2600) Atari::AddTargets(media, targets); - if(potential_platforms & (TargetPlatformType)TargetPlatform::Commodore) Commodore::AddTargets(media, targets); - if(potential_platforms & (TargetPlatformType)TargetPlatform::Oric) Oric::AddTargets(media, targets); - if(potential_platforms & (TargetPlatformType)TargetPlatform::ZX8081) ZX8081::AddTargets(media, targets); + if(potential_platforms & TargetPlatform::Acorn) Acorn::AddTargets(media, targets); + if(potential_platforms & TargetPlatform::AmstradCPC) AmstradCPC::AddTargets(media, targets); + if(potential_platforms & TargetPlatform::Atari2600) Atari::AddTargets(media, targets); + if(potential_platforms & TargetPlatform::Commodore) Commodore::AddTargets(media, targets); + if(potential_platforms & TargetPlatform::Oric) Oric::AddTargets(media, targets); + if(potential_platforms & TargetPlatform::ZX8081) ZX8081::AddTargets(media, targets); // Reset any tapes to their initial position for(auto target : targets) { diff --git a/Storage/TargetPlatforms.hpp b/Storage/TargetPlatforms.hpp new file mode 100644 index 000000000..b1182741b --- /dev/null +++ b/Storage/TargetPlatforms.hpp @@ -0,0 +1,31 @@ +// +// TargetPlatforms.h +// Clock Signal +// +// Created by Thomas Harte on 27/08/2017. +// Copyright © 2017 Thomas Harte. All rights reserved. +// + +#ifndef TargetPlatforms_hpp +#define TargetPlatforms_hpp + +namespace TargetPlatform { + +typedef int IntType; +enum Type: IntType { + Acorn = 1 << 0, + AmstradCPC = 1 << 1, + Atari2600 = 1 << 2, + Commodore = 1 << 3, + Oric = 1 << 4, + ZX80 = 1 << 5, + ZX81 = 1 << 6, + + ZX8081 = ZX80 | ZX81, + AllTape = Acorn | AmstradCPC | Commodore | Oric | ZX80 | ZX81, + AllDisk = Acorn | AmstradCPC | Commodore | Oric, +}; + +} + +#endif /* TargetPlatforms_h */ From 56dd677e9cdcd11586fa3a8c7f18dbe41b13c810 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 27 Aug 2017 15:19:03 -0400 Subject: [PATCH 2/6] Creates a virtual interface that can be adopted by classes that are able to provide some insight as to target machine. --- Storage/Tape/Formats/ZX80O81P.cpp | 6 ++++++ Storage/Tape/Formats/ZX80O81P.hpp | 9 +++++++-- Storage/TargetPlatforms.hpp | 5 +++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Storage/Tape/Formats/ZX80O81P.cpp b/Storage/Tape/Formats/ZX80O81P.cpp index 65e508019..82b33bcc1 100644 --- a/Storage/Tape/Formats/ZX80O81P.cpp +++ b/Storage/Tape/Formats/ZX80O81P.cpp @@ -20,9 +20,11 @@ ZX80O81P::ZX80O81P(const char *file_name) : // If it's a ZX81 file, prepend a file name. std::string type = extension(); + platform_type_ = TargetPlatform::ZX80; if(type == "p" || type == "81") { // TODO, maybe: prefix a proper file name; this is leaving the file nameless. data_.insert(data_.begin(), 0x80); + platform_type_ = TargetPlatform::ZX81; } std::shared_ptr<::Storage::Data::ZX8081::File> file = Storage::Data::ZX8081::FileFromData(data_); @@ -100,3 +102,7 @@ Tape::Pulse ZX80O81P::virtual_get_next_pulse() { return pulse; } + +TargetPlatform::Type ZX80O81P::target_platform_type() { + return platform_type_; +} diff --git a/Storage/Tape/Formats/ZX80O81P.hpp b/Storage/Tape/Formats/ZX80O81P.hpp index efc2a5425..ef161db03 100644 --- a/Storage/Tape/Formats/ZX80O81P.hpp +++ b/Storage/Tape/Formats/ZX80O81P.hpp @@ -11,6 +11,7 @@ #include "../Tape.hpp" #include "../../FileHolder.hpp" +#include "../../TargetPlatforms.hpp" #include #include @@ -21,7 +22,7 @@ namespace Tape { /*! Provides a @c Tape containing a ZX80-format .O tape image, which is a byte stream capture. */ -class ZX80O81P: public Tape, public Storage::FileHolder { +class ZX80O81P: public Tape, public Storage::FileHolder, public TargetPlatform::TypeDistinguisher { public: /*! Constructs a @c ZX80O containing content from the file with name @c file_name. @@ -34,10 +35,14 @@ class ZX80O81P: public Tape, public Storage::FileHolder { ErrorNotZX80O81P }; + private: // implemented to satisfy @c Tape bool is_at_end(); - private: + // implemented to satisfy TargetPlatform::TypeDistinguisher + TargetPlatform::Type target_platform_type(); + TargetPlatform::Type platform_type_; + void virtual_reset(); Pulse virtual_get_next_pulse(); bool has_finished_data(); diff --git a/Storage/TargetPlatforms.hpp b/Storage/TargetPlatforms.hpp index b1182741b..89f6bdb1c 100644 --- a/Storage/TargetPlatforms.hpp +++ b/Storage/TargetPlatforms.hpp @@ -26,6 +26,11 @@ enum Type: IntType { AllDisk = Acorn | AmstradCPC | Commodore | Oric, }; +class TypeDistinguisher { + public: + virtual Type target_platform_type() = 0; +}; + } #endif /* TargetPlatforms_h */ From 446509815792d68c8d0a4840e90c7a6a347e9797 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 27 Aug 2017 15:19:30 -0400 Subject: [PATCH 3/6] Since it has descendants, gives `Storage::Cartridge` a virtual destructor. --- Storage/Cartridge/Cartridge.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Storage/Cartridge/Cartridge.hpp b/Storage/Cartridge/Cartridge.hpp index 50ce20830..37ce806d2 100644 --- a/Storage/Cartridge/Cartridge.hpp +++ b/Storage/Cartridge/Cartridge.hpp @@ -52,6 +52,7 @@ class Cartridge { }; const std::list &get_segments() { return segments_; } + virtual ~Cartridge() {} protected: std::list segments_; From 437023bff6ce1e891e3da78bc169b861864fb5e4 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 27 Aug 2017 15:20:22 -0400 Subject: [PATCH 4/6] Expands to take an already-accrued list of potential platforms, as that may indicate that one or the other of the ZX80 and ZX81 is already out of contention and therefore save the need to attempt analysis. --- StaticAnalyser/ZX8081/StaticAnalyser.cpp | 14 ++++++++++++-- StaticAnalyser/ZX8081/StaticAnalyser.hpp | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/StaticAnalyser/ZX8081/StaticAnalyser.cpp b/StaticAnalyser/ZX8081/StaticAnalyser.cpp index 7449a0063..8a15493f1 100644 --- a/StaticAnalyser/ZX8081/StaticAnalyser.cpp +++ b/StaticAnalyser/ZX8081/StaticAnalyser.cpp @@ -27,14 +27,24 @@ static std::vector GetFiles(const std::shared_ptr &destination) { +void StaticAnalyser::ZX8081::AddTargets(const Media &media, std::list &destination, TargetPlatform::IntType potential_platforms) { if(!media.tapes.empty()) { std::vector files = GetFiles(media.tapes.front()); media.tapes.front()->reset(); if(!files.empty()) { StaticAnalyser::Target target; target.machine = Target::ZX8081; - target.zx8081.isZX81 = files.front().isZX81; + + // Guess the machine type from the file only if it isn't already known. + switch(potential_platforms & (TargetPlatform::ZX80 | TargetPlatform::ZX81)) { + default: + target.zx8081.isZX81 = files.front().isZX81; + break; + + case TargetPlatform::ZX80: target.zx8081.isZX81 = false; break; + case TargetPlatform::ZX81: target.zx8081.isZX81 = true; break; + } + /*if(files.front().data.size() > 16384) { target.zx8081.memory_model = ZX8081MemoryModel::SixtyFourKB; } else*/ if(files.front().data.size() > 1024) { diff --git a/StaticAnalyser/ZX8081/StaticAnalyser.hpp b/StaticAnalyser/ZX8081/StaticAnalyser.hpp index a352988be..3212f4c53 100644 --- a/StaticAnalyser/ZX8081/StaticAnalyser.hpp +++ b/StaticAnalyser/ZX8081/StaticAnalyser.hpp @@ -10,11 +10,12 @@ #define StaticAnalyser_ZX8081_StaticAnalyser_hpp #include "../StaticAnalyser.hpp" +#include "../../Storage/TargetPlatforms.hpp" namespace StaticAnalyser { namespace ZX8081 { -void AddTargets(const Media &media, std::list &destination); +void AddTargets(const Media &media, std::list &destination, TargetPlatform::IntType potential_platforms); } } From 63ee8c9d58aa7e8549116ec35a978f04329365f5 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 27 Aug 2017 15:20:58 -0400 Subject: [PATCH 5/6] Uses file containers' type distinguishers where available, and supplies potential insight to the ZX80/81 analyser as now required. --- StaticAnalyser/StaticAnalyser.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/StaticAnalyser/StaticAnalyser.cpp b/StaticAnalyser/StaticAnalyser.cpp index 68b6fdb8a..339d4fa96 100644 --- a/StaticAnalyser/StaticAnalyser.cpp +++ b/StaticAnalyser/StaticAnalyser.cpp @@ -63,6 +63,8 @@ static Media GetMediaAndPlatforms(const char *file_name, TargetPlatform::IntType #define Insert(list, class, platforms) \ list.emplace_back(new Storage::class(file_name));\ potential_platforms |= platforms;\ + TargetPlatform::TypeDistinguisher *distinguisher = dynamic_cast(list.back().get());\ + if(distinguisher) potential_platforms &= distinguisher->target_platform_type(); #define TryInsert(list, class, platforms) \ try {\ @@ -115,6 +117,8 @@ static Media GetMediaAndPlatforms(const char *file_name, TargetPlatform::IntType #undef Insert #undef TryInsert + // Filter potential platforms as per file preferences, if any. + free(lowercase_extension); } @@ -141,7 +145,7 @@ std::list StaticAnalyser::GetTargets(const char *file_name) { if(potential_platforms & TargetPlatform::Atari2600) Atari::AddTargets(media, targets); if(potential_platforms & TargetPlatform::Commodore) Commodore::AddTargets(media, targets); if(potential_platforms & TargetPlatform::Oric) Oric::AddTargets(media, targets); - if(potential_platforms & TargetPlatform::ZX8081) ZX8081::AddTargets(media, targets); + if(potential_platforms & TargetPlatform::ZX8081) ZX8081::AddTargets(media, targets, potential_platforms); // Reset any tapes to their initial position for(auto target : targets) { From a3e2d142e35a2932f72000d6d53805d3655667a3 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 27 Aug 2017 15:43:09 -0400 Subject: [PATCH 6/6] Extends UEF support to include chunk 0005, the target platform description, which is exposed via `TargetPlatform::TypeDistinguisher`. --- Storage/Tape/Formats/TapeUEF.cpp | 88 ++++++++++++++++++++++--------- Storage/Tape/Formats/TapeUEF.hpp | 17 +++++- Storage/Tape/Formats/ZX80O81P.hpp | 1 + Storage/TargetPlatforms.hpp | 25 +++++---- 4 files changed, 94 insertions(+), 37 deletions(-) diff --git a/Storage/Tape/Formats/TapeUEF.cpp b/Storage/Tape/Formats/TapeUEF.cpp index a17883044..b99140a87 100644 --- a/Storage/Tape/Formats/TapeUEF.cpp +++ b/Storage/Tape/Formats/TapeUEF.cpp @@ -70,7 +70,8 @@ using namespace Storage::Tape; UEF::UEF(const char *file_name) : time_base_(1200), - is_300_baud_(false) { + is_300_baud_(false), + platform_type_(TargetPlatform::Acorn) { file_ = gzopen(file_name, "rb"); char identifier[10]; @@ -85,10 +86,11 @@ UEF::UEF(const char *file_name) : if(version[1] > 0 || version[0] > 10) { throw ErrorNotUEF; } + + set_platform_type(); } -UEF::~UEF() -{ +UEF::~UEF() { gzclose(file_); } @@ -102,31 +104,42 @@ void UEF::virtual_reset() { #pragma mark - Chunk navigator +bool UEF::get_next_chunk(UEF::Chunk &result) { + uint16_t chunk_id = (uint16_t)gzget16(file_); + uint32_t chunk_length = (uint32_t)gzget32(file_); + z_off_t start_of_next_chunk = gztell(file_) + chunk_length; + + if(gzeof(file_)) { + return false; + } + + result.id = chunk_id; + result.length = chunk_length; + result.start_of_next_chunk = start_of_next_chunk; + + return true; +} + void UEF::get_next_pulses() { while(empty()) { // read chunk details - uint16_t chunk_id = (uint16_t)gzget16(file_); - uint32_t chunk_length = (uint32_t)gzget32(file_); - - // figure out where the next chunk will start - z_off_t start_of_next_chunk = gztell(file_) + chunk_length; - - if(gzeof(file_)) { + Chunk next_chunk; + if(!get_next_chunk(next_chunk)) { set_is_at_end(true); return; } - switch(chunk_id) { - case 0x0100: queue_implicit_bit_pattern(chunk_length); break; - case 0x0102: queue_explicit_bit_pattern(chunk_length); break; - case 0x0112: queue_integer_gap(); break; - case 0x0116: queue_floating_point_gap(); break; + switch(next_chunk.id) { + case 0x0100: queue_implicit_bit_pattern(next_chunk.length); break; + case 0x0102: queue_explicit_bit_pattern(next_chunk.length); break; + case 0x0112: queue_integer_gap(); break; + case 0x0116: queue_floating_point_gap(); break; - case 0x0110: queue_carrier_tone(); break; - case 0x0111: queue_carrier_tone_with_dummy(); break; + case 0x0110: queue_carrier_tone(); break; + case 0x0111: queue_carrier_tone_with_dummy(); break; - case 0x0114: queue_security_cycles(); break; - case 0x0104: queue_defined_data(chunk_length); break; + case 0x0114: queue_security_cycles(); break; + case 0x0104: queue_defined_data(next_chunk.length); break; // change of base rate case 0x0113: { @@ -143,19 +156,18 @@ void UEF::get_next_pulses() { break; default: - printf("!!! Skipping %04x\n", chunk_id); + printf("!!! Skipping %04x\n", next_chunk.id); break; } - gzseek(file_, start_of_next_chunk, SEEK_SET); + gzseek(file_, next_chunk.start_of_next_chunk, SEEK_SET); } } #pragma mark - Chunk parsers void UEF::queue_implicit_bit_pattern(uint32_t length) { - while(length--) - { + while(length--) { queue_implicit_byte(gzget8(file_)); } } @@ -163,8 +175,7 @@ void UEF::queue_implicit_bit_pattern(uint32_t length) { void UEF::queue_explicit_bit_pattern(uint32_t length) { size_t length_in_bits = (length << 3) - (size_t)gzget8(file_); uint8_t current_byte = 0; - for(size_t bit = 0; bit < length_in_bits; bit++) - { + for(size_t bit = 0; bit < length_in_bits; bit++) { if(!(bit&7)) current_byte = gzget8(file_); queue_bit(current_byte&1); current_byte >>= 1; @@ -303,3 +314,30 @@ void UEF::queue_bit(int bit) { emplace_back(Pulse::High, duration); } } + +#pragma mark - TypeDistinguisher + +TargetPlatform::Type UEF::target_platform_type() { + return platform_type_; +} + +void UEF::set_platform_type() { + // If a chunk of type 0005 exists anywhere in the UEF then the UEF specifies its target machine. + // So check and, if so, update the list of machines for which this file thinks it is suitable. + Chunk next_chunk; + while(get_next_chunk(next_chunk)) { + if(next_chunk.id == 0x0005) { + uint8_t target = gzget8(file_); + switch(target >> 4) { + case 0: platform_type_ = TargetPlatform::BBCModelA; break; + case 1: platform_type_ = TargetPlatform::AcornElectron; break; + case 2: platform_type_ = TargetPlatform::BBCModelB; break; + case 3: platform_type_ = TargetPlatform::BBCMaster; break; + case 4: platform_type_ = TargetPlatform::AcornAtom; break; + default: break; + } + } + gzseek(file_, next_chunk.start_of_next_chunk, SEEK_SET); + } + reset(); +} diff --git a/Storage/Tape/Formats/TapeUEF.hpp b/Storage/Tape/Formats/TapeUEF.hpp index 58f6b5ab8..41ba07c6a 100644 --- a/Storage/Tape/Formats/TapeUEF.hpp +++ b/Storage/Tape/Formats/TapeUEF.hpp @@ -10,9 +10,11 @@ #define TapeUEF_hpp #include "../PulseQueuedTape.hpp" + +#include "../../TargetPlatforms.hpp" + #include #include -#include namespace Storage { namespace Tape { @@ -20,7 +22,7 @@ namespace Tape { /*! Provides a @c Tape containing a UEF tape image, a slightly-convoluted description of pulses. */ -class UEF : public PulseQueuedTape { +class UEF : public PulseQueuedTape, public TargetPlatform::TypeDistinguisher { public: /*! Constructs a @c UEF containing content from the file with name @c file_name. @@ -37,10 +39,21 @@ class UEF : public PulseQueuedTape { private: void virtual_reset(); + void set_platform_type(); + TargetPlatform::Type target_platform_type(); + TargetPlatform::Type platform_type_; + gzFile file_; unsigned int time_base_; bool is_300_baud_; + struct Chunk { + uint16_t id; + uint32_t length; + z_off_t start_of_next_chunk; + }; + + bool get_next_chunk(Chunk &); void get_next_pulses(); void queue_implicit_bit_pattern(uint32_t length); diff --git a/Storage/Tape/Formats/ZX80O81P.hpp b/Storage/Tape/Formats/ZX80O81P.hpp index ef161db03..2c3ce4829 100644 --- a/Storage/Tape/Formats/ZX80O81P.hpp +++ b/Storage/Tape/Formats/ZX80O81P.hpp @@ -10,6 +10,7 @@ #define ZX80O81P_hpp #include "../Tape.hpp" + #include "../../FileHolder.hpp" #include "../../TargetPlatforms.hpp" diff --git a/Storage/TargetPlatforms.hpp b/Storage/TargetPlatforms.hpp index 89f6bdb1c..e05759d2c 100644 --- a/Storage/TargetPlatforms.hpp +++ b/Storage/TargetPlatforms.hpp @@ -13,17 +13,22 @@ namespace TargetPlatform { typedef int IntType; enum Type: IntType { - Acorn = 1 << 0, - AmstradCPC = 1 << 1, - Atari2600 = 1 << 2, - Commodore = 1 << 3, - Oric = 1 << 4, - ZX80 = 1 << 5, - ZX81 = 1 << 6, + AmstradCPC = 1 << 1, + Atari2600 = 1 << 2, + AcornAtom = 1 << 3, + AcornElectron = 1 << 4, + BBCMaster = 1 << 5, + BBCModelA = 1 << 6, + BBCModelB = 1 << 7, + Commodore = 1 << 8, + Oric = 1 << 9, + ZX80 = 1 << 10, + ZX81 = 1 << 11, - ZX8081 = ZX80 | ZX81, - AllTape = Acorn | AmstradCPC | Commodore | Oric | ZX80 | ZX81, - AllDisk = Acorn | AmstradCPC | Commodore | Oric, + Acorn = AcornAtom | AcornElectron | BBCMaster | BBCModelA | BBCModelB, + ZX8081 = ZX80 | ZX81, + AllTape = Acorn | AmstradCPC | Commodore | Oric | ZX80 | ZX81, + AllDisk = Acorn | AmstradCPC | Commodore | Oric, }; class TypeDistinguisher {