1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Merge pull request #1306 from TomHarte/FewerMacros

Reduce use of macros.
This commit is contained in:
Thomas Harte 2024-01-17 09:22:34 -05:00 committed by GitHub
commit e8d43a28f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
445 changed files with 1094 additions and 2341 deletions

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef ActivityObserver_h #pragma once
#define ActivityObserver_h
#include <cstdint> #include <cstdint>
#include <string> #include <string>
@ -58,5 +57,3 @@ class Observer {
}; };
} }
#endif /* ActivityObserver_h */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef ActivitySource_h #pragma once
#define ActivitySource_h
#include "Observer.hpp" #include "Observer.hpp"
@ -19,6 +18,3 @@ class Source {
}; };
} }
#endif /* ActivitySource_h */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef ConfidenceCounter_hpp #pragma once
#define ConfidenceCounter_hpp
#include "ConfidenceSource.hpp" #include "ConfidenceSource.hpp"
@ -41,5 +40,3 @@ class ConfidenceCounter: public ConfidenceSource {
}; };
} }
#endif /* ConfidenceCounter_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef ConfidenceSource_hpp #pragma once
#define ConfidenceSource_hpp
namespace Analyser::Dynamic { namespace Analyser::Dynamic {
@ -22,5 +21,3 @@ struct ConfidenceSource {
}; };
} }
#endif /* ConfidenceSource_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef ConfidenceSummary_hpp #pragma once
#define ConfidenceSummary_hpp
#include "ConfidenceSource.hpp" #include "ConfidenceSource.hpp"
@ -40,5 +39,3 @@ class ConfidenceSummary: public ConfidenceSource {
}; };
} }
#endif /* ConfidenceSummary_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef MultiConfigurable_hpp #pragma once
#define MultiConfigurable_hpp
#include "../../../../Machines/DynamicMachine.hpp" #include "../../../../Machines/DynamicMachine.hpp"
#include "../../../../Configurable/Configurable.hpp" #include "../../../../Configurable/Configurable.hpp"
@ -36,5 +35,3 @@ class MultiConfigurable: public Configurable::Device {
}; };
} }
#endif /* MultiConfigurable_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef MultiJoystickMachine_hpp #pragma once
#define MultiJoystickMachine_hpp
#include "../../../../Machines/DynamicMachine.hpp" #include "../../../../Machines/DynamicMachine.hpp"
@ -34,5 +33,3 @@ class MultiJoystickMachine: public MachineTypes::JoystickMachine {
}; };
} }
#endif /* MultiJoystickMachine_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef MultiKeyboardMachine_hpp #pragma once
#define MultiKeyboardMachine_hpp
#include "../../../../Machines/DynamicMachine.hpp" #include "../../../../Machines/DynamicMachine.hpp"
#include "../../../../Machines/KeyboardMachine.hpp" #include "../../../../Machines/KeyboardMachine.hpp"
@ -55,5 +54,3 @@ class MultiKeyboardMachine: public MachineTypes::KeyboardMachine {
}; };
} }
#endif /* MultiKeyboardMachine_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef MultiMediaTarget_hpp #pragma once
#define MultiMediaTarget_hpp
#include "../../../../Machines/MediaTarget.hpp" #include "../../../../Machines/MediaTarget.hpp"
#include "../../../../Machines/DynamicMachine.hpp" #include "../../../../Machines/DynamicMachine.hpp"
@ -35,5 +34,3 @@ struct MultiMediaTarget: public MachineTypes::MediaTarget {
}; };
} }
#endif /* MultiMediaTarget_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef MultiProducer_hpp #pragma once
#define MultiProducer_hpp
#include "../../../../Concurrency/AsyncTaskQueue.hpp" #include "../../../../Concurrency/AsyncTaskQueue.hpp"
#include "../../../../Machines/MachineTypes.hpp" #include "../../../../Machines/MachineTypes.hpp"
@ -115,5 +114,3 @@ class MultiAudioProducer: public MultiInterface<MachineTypes::AudioProducer>, pu
*/ */
} }
#endif /* MultiProducer_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef MultiSpeaker_hpp #pragma once
#define MultiSpeaker_hpp
#include "../../../../Machines/DynamicMachine.hpp" #include "../../../../Machines/DynamicMachine.hpp"
#include "../../../../Outputs/Speaker/Speaker.hpp" #include "../../../../Outputs/Speaker/Speaker.hpp"
@ -55,5 +54,3 @@ class MultiSpeaker: public Outputs::Speaker::Speaker, Outputs::Speaker::Speaker:
}; };
} }
#endif /* MultiSpeaker_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef MultiMachine_hpp #pragma once
#define MultiMachine_hpp
#include "../../../Machines/DynamicMachine.hpp" #include "../../../Machines/DynamicMachine.hpp"
@ -80,5 +79,3 @@ class MultiMachine: public ::Machine::DynamicMachine, public MultiTimedMachine::
}; };
} }
#endif /* MultiMachine_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Machines_h #pragma once
#define Machines_h
namespace Analyser { namespace Analyser {
@ -32,5 +31,3 @@ enum class Machine {
}; };
} }
#endif /* Machines_h */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Acorn_Disk_hpp #pragma once
#define StaticAnalyser_Acorn_Disk_hpp
#include "File.hpp" #include "File.hpp"
#include "../../../Storage/Disk/Disk.hpp" #include "../../../Storage/Disk/Disk.hpp"
@ -30,5 +29,3 @@ std::unique_ptr<Catalogue> GetDFSCatalogue(const std::shared_ptr<Storage::Disk::
std::unique_ptr<Catalogue> GetADFSCatalogue(const std::shared_ptr<Storage::Disk::Disk> &disk); std::unique_ptr<Catalogue> GetADFSCatalogue(const std::shared_ptr<Storage::Disk::Disk> &disk);
} }
#endif /* Disk_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Acorn_File_hpp #pragma once
#define StaticAnalyser_Acorn_File_hpp
#include <memory> #include <memory>
#include <string> #include <string>
@ -59,5 +58,3 @@ struct File {
}; };
} }
#endif /* File_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Acorn_StaticAnalyser_hpp #pragma once
#define StaticAnalyser_Acorn_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::Acorn {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* AcornAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Acorn_Tape_hpp #pragma once
#define StaticAnalyser_Acorn_Tape_hpp
#include <memory> #include <memory>
@ -19,5 +18,3 @@ namespace Analyser::Static::Acorn {
std::vector<File> GetFiles(const std::shared_ptr<Storage::Tape::Tape> &tape); std::vector<File> GetFiles(const std::shared_ptr<Storage::Tape::Tape> &tape);
} }
#endif /* Tape_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_Acorn_Target_h #pragma once
#define Analyser_Static_Acorn_Target_h
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
@ -36,5 +35,3 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl<
}; };
} }
#endif /* Analyser_Static_Acorn_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2021 Thomas Harte. All rights reserved. // Copyright © 2021 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_Amiga_StaticAnalyser_hpp #pragma once
#define Analyser_Static_Amiga_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::Amiga {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* Analyser_Static_Amiga_StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2021 Thomas Harte. All rights reserved. // Copyright © 2021 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_Amiga_Target_h #pragma once
#define Analyser_Static_Amiga_Target_h
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
@ -40,5 +39,3 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
}; };
} }
#endif /* Analyser_Static_Amiga_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_AmstradCPC_StaticAnalyser_hpp #pragma once
#define Analyser_Static_AmstradCPC_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::AmstradCPC {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* Analyser_Static_AmstradCPC_StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_AmstradCPC_Target_h #pragma once
#define Analyser_Static_AmstradCPC_Target_h
#include "../../../Reflection/Enum.hpp" #include "../../../Reflection/Enum.hpp"
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
@ -30,5 +29,3 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
}; };
} }
#endif /* Analyser_Static_AmstradCPC_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_AppleII_StaticAnalyser_hpp #pragma once
#define Analyser_Static_AppleII_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::AppleII {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* Analyser_Static_AppleII_StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_AppleII_Target_h #pragma once
#define Analyser_Static_AppleII_Target_h
#include "../../../Reflection/Enum.hpp" #include "../../../Reflection/Enum.hpp"
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
@ -50,5 +49,3 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
}; };
} }
#endif /* Analyser_Static_AppleII_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_AppleIIgs_StaticAnalyser_hpp #pragma once
#define Analyser_Static_AppleIIgs_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::AppleIIgs {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* Analyser_Static_AppleIIgs_StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_AppleIIgs_Target_h #pragma once
#define Analyser_Static_AppleIIgs_Target_h
#include "../../../Reflection/Enum.hpp" #include "../../../Reflection/Enum.hpp"
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
@ -41,5 +40,3 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
}; };
} }
#endif /* Analyser_Static_AppleIIgs_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Atari_StaticAnalyser_hpp #pragma once
#define StaticAnalyser_Atari_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::Atari2600 {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_Atari2600_Target_h #pragma once
#define Analyser_Static_Atari2600_Target_h
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
@ -37,5 +36,3 @@ struct Target: public ::Analyser::Static::Target {
}; };
} }
#endif /* Analyser_Static_Atari_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2019 Thomas Harte. All rights reserved. // Copyright © 2019 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_AtariST_StaticAnalyser_hpp #pragma once
#define Analyser_Static_AtariST_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::AtariST {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* Analyser_Static_AtariST_StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2019 Thomas Harte. All rights reserved. // Copyright © 2019 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_AtariST_Target_h #pragma once
#define Analyser_Static_AtariST_Target_h
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
@ -30,5 +29,3 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
}; };
} }
#endif /* Analyser_Static_AtariST_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Coleco_StaticAnalyser_hpp #pragma once
#define StaticAnalyser_Coleco_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::Coleco {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Commodore_Disk_hpp #pragma once
#define StaticAnalyser_Commodore_Disk_hpp
#include "../../../Storage/Disk/Disk.hpp" #include "../../../Storage/Disk/Disk.hpp"
#include "File.hpp" #include "File.hpp"
@ -19,5 +18,3 @@ namespace Analyser::Static::Commodore {
std::vector<File> GetFiles(const std::shared_ptr<Storage::Disk::Disk> &disk); std::vector<File> GetFiles(const std::shared_ptr<Storage::Disk::Disk> &disk);
} }
#endif /* Disk_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef File_hpp #pragma once
#define File_hpp
#include <cstdint> #include <cstdint>
#include <string> #include <string>
@ -35,5 +34,3 @@ struct File {
}; };
} }
#endif /* File_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Commodore_StaticAnalyser_hpp #pragma once
#define StaticAnalyser_Commodore_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::Commodore {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* CommodoreAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Commodore_Tape_hpp #pragma once
#define StaticAnalyser_Commodore_Tape_hpp
#include "../../../Storage/Tape/Tape.hpp" #include "../../../Storage/Tape/Tape.hpp"
#include "File.hpp" #include "File.hpp"
@ -17,5 +16,3 @@ namespace Analyser::Static::Commodore {
std::vector<File> GetFiles(const std::shared_ptr<Storage::Tape::Tape> &tape); std::vector<File> GetFiles(const std::shared_ptr<Storage::Tape::Tape> &tape);
} }
#endif /* Tape_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_Commodore_Target_h #pragma once
#define Analyser_Static_Commodore_Target_h
#include "../../../Reflection/Enum.hpp" #include "../../../Reflection/Enum.hpp"
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
@ -70,5 +69,3 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
}; };
} }
#endif /* Analyser_Static_Commodore_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Disassembler_6502_hpp #pragma once
#define StaticAnalyser_Disassembler_6502_hpp
#include <cstdint> #include <cstdint>
#include <functional> #include <functional>
@ -93,5 +92,3 @@ Disassembly Disassemble(
std::vector<uint16_t> entry_points); std::vector<uint16_t> entry_points);
} }
#endif /* Disassembler6502_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef AddressMapper_hpp #pragma once
#define AddressMapper_hpp
#include <functional> #include <functional>
@ -24,5 +23,3 @@ template <typename T> std::function<std::size_t(T)> OffsetMapper(T start_address
} }
} }
#endif /* AddressMapper_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef Kernel_hpp #pragma once
#define Kernel_hpp
namespace Analyser::Static::Disassembly { namespace Analyser::Static::Disassembly {
@ -65,5 +64,3 @@ template <typename D, typename S, typename Disassembler> D Disassemble(
} }
} }
#endif /* Kernel_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Disassembler_Z80_hpp #pragma once
#define StaticAnalyser_Disassembler_Z80_hpp
#include <cstdint> #include <cstdint>
#include <functional> #include <functional>
@ -91,5 +90,3 @@ Disassembly Disassemble(
Approach approach); Approach approach);
} }
#endif /* StaticAnalyser_Disassembler_Z80_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_DiskII_StaticAnalyser_hpp #pragma once
#define Analyser_Static_DiskII_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::DiskII {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* Analyser_Static_DiskII_StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_Enterprise_StaticAnalyser_hpp #pragma once
#define Analyser_Static_Enterprise_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::Enterprise {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* Analyser_Static_Enterprise_StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2021 Thomas Harte. All rights reserved. // Copyright © 2021 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_Enterprise_Target_h #pragma once
#define Analyser_Static_Enterprise_Target_h
#include "../../../Reflection/Enum.hpp" #include "../../../Reflection/Enum.hpp"
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
@ -49,5 +48,3 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
}; };
} }
#endif /* Analyser_Static_Enterprise_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright 2023 Thomas Harte. All rights reserved. // Copyright 2023 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_FAT12_StaticAnalyser_hpp #pragma once
#define Analyser_Static_FAT12_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::FAT12 {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* Analyser_Static_FAT12_StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Cartridge_hpp #pragma once
#define Cartridge_hpp
#include "../../../Storage/Cartridge/Cartridge.hpp" #include "../../../Storage/Cartridge/Cartridge.hpp"
@ -32,5 +31,3 @@ struct Cartridge: public ::Storage::Cartridge::Cartridge {
}; };
} }
#endif /* Cartridge_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_MSX_StaticAnalyser_hpp #pragma once
#define StaticAnalyser_MSX_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::MSX {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* StaticAnalyser_MSX_StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_MSX_Tape_hpp #pragma once
#define StaticAnalyser_MSX_Tape_hpp
#include "../../../Storage/Tape/Tape.hpp" #include "../../../Storage/Tape/Tape.hpp"
@ -36,5 +35,3 @@ struct File {
std::vector<File> GetFiles(const std::shared_ptr<Storage::Tape::Tape> &tape); std::vector<File> GetFiles(const std::shared_ptr<Storage::Tape::Tape> &tape);
} }
#endif /* StaticAnalyser_MSX_Tape_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_MSX_Target_h #pragma once
#define Analyser_Static_MSX_Target_h
#include "../../../Reflection/Enum.hpp" #include "../../../Reflection/Enum.hpp"
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
@ -47,5 +46,3 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl<
}; };
} }
#endif /* Analyser_Static_MSX_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2019 Thomas Harte. All rights reserved. // Copyright © 2019 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_Macintosh_StaticAnalyser_hpp #pragma once
#define Analyser_Static_Macintosh_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::Macintosh {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* Analyser_Static_Macintosh_StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2019 Thomas Harte. All rights reserved. // Copyright © 2019 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_Macintosh_Target_h #pragma once
#define Analyser_Static_Macintosh_Target_h
#include "../../../Reflection/Enum.hpp" #include "../../../Reflection/Enum.hpp"
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
@ -29,5 +28,3 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
}; };
} }
#endif /* Analyser_Static_Macintosh_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Oric_StaticAnalyser_hpp #pragma once
#define StaticAnalyser_Oric_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::Oric {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Oric_Tape_hpp #pragma once
#define StaticAnalyser_Oric_Tape_hpp
#include "../../../Storage/Tape/Tape.hpp" #include "../../../Storage/Tape/Tape.hpp"
@ -32,5 +31,3 @@ struct File {
std::vector<File> GetFiles(const std::shared_ptr<Storage::Tape::Tape> &tape); std::vector<File> GetFiles(const std::shared_ptr<Storage::Tape::Tape> &tape);
} }
#endif /* Tape_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_Oric_Target_h #pragma once
#define Analyser_Static_Oric_Target_h
#include "../../../Reflection/Enum.hpp" #include "../../../Reflection/Enum.hpp"
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
@ -55,5 +54,3 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
}; };
} }
#endif /* Analyser_Static_Oric_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_PCCompatible_StaticAnalyser_hpp #pragma once
#define Analyser_Static_PCCompatible_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::PCCompatible {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* Analyser_Static_PCCompatible_StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_PCCompatible_Target_h #pragma once
#define Analyser_Static_PCCompatible_Target_h
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
@ -36,5 +35,3 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
}; };
} }
#endif /* Analyser_Static_PCCompatible_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2018 Thomas Harte. All rights reserved. // Copyright © 2018 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_Sega_StaticAnalyser_hpp #pragma once
#define StaticAnalyser_Sega_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::Sega {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2018 Thomas Harte. All rights reserved. // Copyright © 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_Sega_Target_h #pragma once
#define Analyser_Static_Sega_Target_h
#include "../../../Reflection/Enum.hpp" #include "../../../Reflection/Enum.hpp"
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
@ -51,5 +50,3 @@ constexpr bool is_master_system(Analyser::Static::Sega::Target::Model model) {
} }
} }
#endif /* Analyser_Static_Sega_Target_h */

View File

@ -88,6 +88,7 @@
template<class> inline constexpr bool always_false_v = false; template<class> inline constexpr bool always_false_v = false;
using namespace Analyser::Static; using namespace Analyser::Static;
using namespace Storage;
namespace { namespace {
@ -101,46 +102,90 @@ std::string get_extension(const std::string &name) {
return extension; return extension;
} }
class MediaAccumulator {
public:
MediaAccumulator(const std::string &file_name, TargetPlatform::IntType &potential_platforms) :
file_name_(file_name), potential_platforms_(potential_platforms), extension_(get_extension(file_name)) {}
/// Adds @c instance to the media collection and adds @c platforms to the set of potentials.
/// If @c instance is an @c TargetPlatform::TypeDistinguisher then it is given an opportunity to restrict the set of potentials.
template <typename InstanceT>
void insert(TargetPlatform::IntType platforms, InstanceT *instance) {
if constexpr (std::is_base_of_v<Storage::Disk::Disk, InstanceT>) {
media.disks.emplace_back(instance);
} else if constexpr (std::is_base_of_v<Storage::Tape::Tape, InstanceT>) {
media.tapes.emplace_back(instance);
} else if constexpr (std::is_base_of_v<Storage::Cartridge::Cartridge, InstanceT>) {
media.cartridges.emplace_back(instance);
} else if constexpr (std::is_base_of_v<Storage::MassStorage::MassStorageDevice, InstanceT>) {
media.mass_storage_devices.emplace_back(instance);
} else {
static_assert(always_false_v<InstanceT>, "Unexpected type encountered.");
}
potential_platforms_ |= platforms;
// Check whether the instance itself has any input on target platforms.
TargetPlatform::TypeDistinguisher *const distinguisher =
dynamic_cast<TargetPlatform::TypeDistinguisher *>(instance);
if(distinguisher) potential_platforms_ &= distinguisher->target_platform_type();
}
/// Concstructs a new instance of @c InstanceT supplying @c args and adds it to the back of @c list using @c insert_instance.
template <typename InstanceT, typename... Args>
void insert(TargetPlatform::IntType platforms, Args &&... args) {
insert(platforms, new InstanceT(std::forward<Args>(args)...));
}
/// Calls @c insert with the specified parameters, ignoring any exceptions thrown.
template <typename InstanceT, typename... Args>
void try_insert(TargetPlatform::IntType platforms, Args &&... args) {
try {
insert<InstanceT>(platforms, std::forward<Args>(args)...);
} catch(...) {}
}
/// Performs a @c try_insert for an object of @c InstanceT if @c extension matches that of the file name,
/// providing the file name as the only construction argument.
template <typename InstanceT>
void try_standard(TargetPlatform::IntType platforms, const char *extension) {
if(name_matches(extension)) {
try_insert<InstanceT>(platforms, file_name_);
}
}
bool name_matches(const char *extension) {
return extension_ == extension;
}
Media media;
private:
const std::string &file_name_;
TargetPlatform::IntType &potential_platforms_;
const std::string extension_;
};
} }
static Media GetMediaAndPlatforms(const std::string &file_name, TargetPlatform::IntType &potential_platforms) { static Media GetMediaAndPlatforms(const std::string &file_name, TargetPlatform::IntType &potential_platforms) {
Media result; MediaAccumulator accumulator(file_name, potential_platforms);
const std::string extension = get_extension(file_name);
#define InsertInstance(list, instance, platforms) \
list.emplace_back(instance);\
potential_platforms |= platforms;\
TargetPlatform::TypeDistinguisher *const distinguisher = dynamic_cast<TargetPlatform::TypeDistinguisher *>(list.back().get());\
if(distinguisher) potential_platforms &= distinguisher->target_platform_type();
#define Insert(list, class, platforms, ...) \
InsertInstance(list, new Storage::class(__VA_ARGS__), platforms);
#define TryInsert(list, class, platforms, ...) \
try {\
Insert(list, class, platforms, __VA_ARGS__) \
} catch(...) {}
#define Format(ext, list, class, platforms) \
if(extension == ext) { \
TryInsert(list, class, platforms, file_name) \
}
// 2MG // 2MG
if(extension == "2mg") { if(accumulator.name_matches("2mg")) {
// 2MG uses a factory method; defer to it. // 2MG uses a factory method; defer to it.
try { try {
const auto media = Storage::Disk::Disk2MG::open(file_name); const auto media = Disk::Disk2MG::open(file_name);
std::visit([&result, &potential_platforms](auto &&arg) { std::visit([&](auto &&arg) {
using Type = typename std::decay<decltype(arg)>::type; using Type = typename std::decay<decltype(arg)>::type;
if constexpr (std::is_same<Type, nullptr_t>::value) { if constexpr (std::is_same<Type, nullptr_t>::value) {
// It's valid for no media to be returned. // It's valid for no media to be returned.
} else if constexpr (std::is_same<Type, Storage::Disk::DiskImageHolderBase *>::value) { } else if constexpr (std::is_same<Type, Disk::DiskImageHolderBase *>::value) {
InsertInstance(result.disks, arg, TargetPlatform::DiskII); accumulator.insert(TargetPlatform::DiskII, arg);
} else if constexpr (std::is_same<Type, Storage::MassStorage::MassStorageDevice *>::value) { } else if constexpr (std::is_same<Type, MassStorage::MassStorageDevice *>::value) {
// TODO: or is it Apple IIgs? // TODO: or is it Apple IIgs?
InsertInstance(result.mass_storage_devices, arg, TargetPlatform::AppleII); accumulator.insert(TargetPlatform::AppleII, arg);
} else { } else {
static_assert(always_false_v<Type>, "Unexpected type encountered."); static_assert(always_false_v<Type>, "Unexpected type encountered.");
} }
@ -148,106 +193,108 @@ static Media GetMediaAndPlatforms(const std::string &file_name, TargetPlatform::
} catch(...) {} } catch(...) {}
} }
Format("80", result.tapes, Tape::ZX80O81P, TargetPlatform::ZX8081) // 80 accumulator.try_standard<Tape::ZX80O81P>(TargetPlatform::ZX8081, "80");
Format("81", result.tapes, Tape::ZX80O81P, TargetPlatform::ZX8081) // 81 accumulator.try_standard<Tape::ZX80O81P>(TargetPlatform::ZX8081, "81");
Format("a26", result.cartridges, Cartridge::BinaryDump, TargetPlatform::Atari2600) // A26
Format("adf", result.disks, Disk::DiskImageHolder<Storage::Disk::AcornADF>, TargetPlatform::Acorn) // ADF (Acorn) accumulator.try_standard<Cartridge::BinaryDump>(TargetPlatform::Atari2600, "a26");
Format("adf", result.disks, Disk::DiskImageHolder<Storage::Disk::AmigaADF>, TargetPlatform::Amiga) // ADF (Amiga) accumulator.try_standard<Disk::DiskImageHolder<Disk::AcornADF>>(TargetPlatform::Acorn, "adf");
Format("adl", result.disks, Disk::DiskImageHolder<Storage::Disk::AcornADF>, TargetPlatform::Acorn) // ADL accumulator.try_standard<Disk::DiskImageHolder<Disk::AmigaADF>>(TargetPlatform::Amiga, "adf");
Format("bin", result.cartridges, Cartridge::BinaryDump, TargetPlatform::AllCartridge) // BIN (cartridge dump) accumulator.try_standard<Disk::DiskImageHolder<Disk::AcornADF>>(TargetPlatform::Acorn, "adl");
Format("cas", result.tapes, Tape::CAS, TargetPlatform::MSX) // CAS
Format("cdt", result.tapes, Tape::TZX, TargetPlatform::AmstradCPC) // CDT accumulator.try_standard<Cartridge::BinaryDump>(TargetPlatform::AllCartridge, "bin");
Format("col", result.cartridges, Cartridge::BinaryDump, TargetPlatform::Coleco) // COL
Format("csw", result.tapes, Tape::CSW, TargetPlatform::AllTape) // CSW accumulator.try_standard<Tape::CAS>(TargetPlatform::MSX, "cas");
Format("d64", result.disks, Disk::DiskImageHolder<Storage::Disk::D64>, TargetPlatform::Commodore) // D64 accumulator.try_standard<Tape::TZX>(TargetPlatform::AmstradCPC, "cdt");
Format("dat", result.mass_storage_devices, MassStorage::DAT, TargetPlatform::Acorn) // DAT accumulator.try_standard<Cartridge::BinaryDump>(TargetPlatform::Coleco, "col");
Format("dmk", result.disks, Disk::DiskImageHolder<Storage::Disk::DMK>, TargetPlatform::MSX) // DMK accumulator.try_standard<Tape::CSW>(TargetPlatform::AllTape, "csw");
Format("do", result.disks, Disk::DiskImageHolder<Storage::Disk::AppleDSK>, TargetPlatform::DiskII) // DO
Format("dsd", result.disks, Disk::DiskImageHolder<Storage::Disk::SSD>, TargetPlatform::Acorn) // DSD accumulator.try_standard<Disk::DiskImageHolder<Disk::D64>>(TargetPlatform::Commodore, "d64");
Format( "dsk", accumulator.try_standard<MassStorage::DAT>(TargetPlatform::Acorn, "dat");
result.disks, accumulator.try_standard<Disk::DiskImageHolder<Disk::DMK>>(TargetPlatform::MSX, "dmk");
Disk::DiskImageHolder<Storage::Disk::CPCDSK>, accumulator.try_standard<Disk::DiskImageHolder<Disk::AppleDSK>>(TargetPlatform::DiskII, "do");
TargetPlatform::AmstradCPC | TargetPlatform::Oric | TargetPlatform::ZXSpectrum) // DSK (Amstrad CPC, etc) accumulator.try_standard<Disk::DiskImageHolder<Disk::SSD>>(TargetPlatform::Acorn, "dsd");
Format("dsk", result.disks, Disk::DiskImageHolder<Storage::Disk::AppleDSK>, TargetPlatform::DiskII) // DSK (Apple II) accumulator.try_standard<Disk::DiskImageHolder<Disk::CPCDSK>>(
Format("dsk", result.disks, Disk::DiskImageHolder<Storage::Disk::MacintoshIMG>, TargetPlatform::Macintosh) // DSK (Macintosh, floppy disk) TargetPlatform::AmstradCPC | TargetPlatform::Oric | TargetPlatform::ZXSpectrum, "dsk");
Format("dsk", result.mass_storage_devices, MassStorage::HFV, TargetPlatform::Macintosh) // DSK (Macintosh, hard disk, single volume image) accumulator.try_standard<Disk::DiskImageHolder<Disk::AppleDSK>>(TargetPlatform::DiskII, "dsk");
Format("dsk", result.mass_storage_devices, MassStorage::DSK, TargetPlatform::Macintosh) // DSK (Macintosh, hard disk, full device image) accumulator.try_standard<Disk::DiskImageHolder<Disk::MacintoshIMG>>(TargetPlatform::Macintosh, "dsk");
Format("dsk", result.disks, Disk::DiskImageHolder<Storage::Disk::FAT12>, TargetPlatform::MSX) // DSK (MSX) accumulator.try_standard<MassStorage::HFV>(TargetPlatform::Macintosh, "dsk");
Format("dsk", result.disks, Disk::DiskImageHolder<Storage::Disk::OricMFMDSK>, TargetPlatform::Oric) // DSK (Oric) accumulator.try_standard<MassStorage::DSK>(TargetPlatform::Macintosh, "dsk");
Format("g64", result.disks, Disk::DiskImageHolder<Storage::Disk::G64>, TargetPlatform::Commodore) // G64 accumulator.try_standard<Disk::DiskImageHolder<Disk::FAT12>>(TargetPlatform::MSX, "dsk");
Format("hdv", result.mass_storage_devices, MassStorage::HDV, TargetPlatform::AppleII) // HDV (Apple II, hard disk, single volume image) accumulator.try_standard<Disk::DiskImageHolder<Disk::OricMFMDSK>>(TargetPlatform::Oric, "dsk");
Format( "hfe",
result.disks, accumulator.try_standard<Disk::DiskImageHolder<Disk::G64>>(TargetPlatform::Commodore, "g64");
Disk::DiskImageHolder<Storage::Disk::HFE>,
TargetPlatform::Acorn | TargetPlatform::AmstradCPC | TargetPlatform::Commodore | TargetPlatform::Oric | TargetPlatform::ZXSpectrum) accumulator.try_standard<MassStorage::HDV>(TargetPlatform::AppleII, "hdv");
// HFE (TODO: switch to AllDisk once the MSX stops being so greedy) accumulator.try_standard<Disk::DiskImageHolder<Disk::HFE>>(
Format("ima", result.disks, Disk::DiskImageHolder<Storage::Disk::FAT12>, TargetPlatform::PCCompatible) // IMG (MS-DOS style) TargetPlatform::Acorn | TargetPlatform::AmstradCPC | TargetPlatform::Commodore | TargetPlatform::Oric | TargetPlatform::ZXSpectrum,
Format("image", result.disks, Disk::DiskImageHolder<Storage::Disk::MacintoshIMG>, TargetPlatform::Macintosh) // IMG (DiskCopy 4.2) "hfe"); // TODO: switch to AllDisk once the MSX stops being so greedy.
Format("imd", result.disks, Disk::DiskImageHolder<Storage::Disk::IMD>, TargetPlatform::PCCompatible) // IMD
Format("img", result.disks, Disk::DiskImageHolder<Storage::Disk::MacintoshIMG>, TargetPlatform::Macintosh) // IMG (DiskCopy 4.2) accumulator.try_standard<Disk::DiskImageHolder<Disk::FAT12>>(TargetPlatform::PCCompatible, "ima");
accumulator.try_standard<Disk::DiskImageHolder<Disk::MacintoshIMG>>(TargetPlatform::Macintosh, "image");
accumulator.try_standard<Disk::DiskImageHolder<Disk::IMD>>(TargetPlatform::PCCompatible, "imd");
accumulator.try_standard<Disk::DiskImageHolder<Disk::MacintoshIMG>>(TargetPlatform::Macintosh, "img");
// Treat PC booter as a potential backup only if this doesn't parse as a FAT12. // Treat PC booter as a potential backup only if this doesn't parse as a FAT12.
if(extension == "img") { if(accumulator.name_matches("img")) {
try { try {
Insert(result.disks, Disk::DiskImageHolder<Storage::Disk::FAT12>, TargetPlatform::FAT12, file_name) // IMG (Enterprise or MS-DOS style) accumulator.insert<Disk::DiskImageHolder<Disk::FAT12>>(TargetPlatform::FAT12, file_name);
} catch(...) { } catch(...) {
Format("img", result.disks, Disk::DiskImageHolder<Storage::Disk::PCBooter>, TargetPlatform::PCCompatible) // IMG (PC raw booter) accumulator.try_standard<Disk::DiskImageHolder<Disk::PCBooter>>(TargetPlatform::PCCompatible, "img");
} }
} }
Format( "ipf", accumulator.try_standard<Disk::DiskImageHolder<Disk::IPF>>(
result.disks, TargetPlatform::Amiga | TargetPlatform::AtariST | TargetPlatform::AmstradCPC | TargetPlatform::ZXSpectrum,
Disk::DiskImageHolder<Storage::Disk::IPF>, "ipf");
TargetPlatform::Amiga | TargetPlatform::AtariST | TargetPlatform::AmstradCPC | TargetPlatform::ZXSpectrum) // IPF
Format("msa", result.disks, Disk::DiskImageHolder<Storage::Disk::MSA>, TargetPlatform::AtariST) // MSA
Format("mx2", result.cartridges, Cartridge::BinaryDump, TargetPlatform::MSX) // MX2
Format("nib", result.disks, Disk::DiskImageHolder<Storage::Disk::NIB>, TargetPlatform::DiskII) // NIB
Format("o", result.tapes, Tape::ZX80O81P, TargetPlatform::ZX8081) // O
Format("p", result.tapes, Tape::ZX80O81P, TargetPlatform::ZX8081) // P
Format("po", result.disks, Disk::DiskImageHolder<Storage::Disk::AppleDSK>, TargetPlatform::DiskII) // PO (original Apple II kind)
// PO (Apple IIgs kind) accumulator.try_standard<Disk::DiskImageHolder<Disk::MSA>>(TargetPlatform::AtariST, "msa");
if(extension == "po") { accumulator.try_standard<Cartridge::BinaryDump>(TargetPlatform::MSX, "mx2");
TryInsert(result.disks, Disk::DiskImageHolder<Storage::Disk::MacintoshIMG>, TargetPlatform::AppleIIgs, file_name, Storage::Disk::MacintoshIMG::FixedType::GCR) accumulator.try_standard<Disk::DiskImageHolder<Disk::NIB>>(TargetPlatform::DiskII, "nib");
accumulator.try_standard<Tape::ZX80O81P>(TargetPlatform::ZX8081, "o");
accumulator.try_standard<Tape::ZX80O81P>(TargetPlatform::ZX8081, "p");
accumulator.try_standard<Disk::DiskImageHolder<Disk::AppleDSK>>(TargetPlatform::DiskII, "po");
if(accumulator.name_matches("po")) {
accumulator.try_insert<Disk::DiskImageHolder<Disk::MacintoshIMG>>(
TargetPlatform::AppleIIgs,
file_name, Disk::MacintoshIMG::FixedType::GCR);
} }
Format("p81", result.tapes, Tape::ZX80O81P, TargetPlatform::ZX8081) // P81 accumulator.try_standard<Tape::ZX80O81P>(TargetPlatform::ZX8081, "p81");
// PRG if(accumulator.name_matches("prg")) {
if(extension == "prg") { // Try instantiating as a ROM; failing that accept as a tape.
// try instantiating as a ROM; failing that accept as a tape
try { try {
Insert(result.cartridges, Cartridge::PRG, TargetPlatform::Commodore, file_name) accumulator.insert<Cartridge::PRG>(TargetPlatform::Commodore, file_name);
} catch(...) { } catch(...) {
try { try {
Insert(result.tapes, Tape::PRG, TargetPlatform::Commodore, file_name) accumulator.insert<Tape::PRG>(TargetPlatform::Commodore, file_name);
} catch(...) {} } catch(...) {}
} }
} }
Format( "rom", accumulator.try_standard<Cartridge::BinaryDump>(
result.cartridges, TargetPlatform::AcornElectron | TargetPlatform::Coleco | TargetPlatform::MSX,
Cartridge::BinaryDump, "rom");
TargetPlatform::AcornElectron | TargetPlatform::Coleco | TargetPlatform::MSX) // ROM
Format("sg", result.cartridges, Cartridge::BinaryDump, TargetPlatform::Sega) // SG
Format("sms", result.cartridges, Cartridge::BinaryDump, TargetPlatform::Sega) // SMS
Format("ssd", result.disks, Disk::DiskImageHolder<Storage::Disk::SSD>, TargetPlatform::Acorn) // SSD
Format("st", result.disks, Disk::DiskImageHolder<Storage::Disk::FAT12>, TargetPlatform::AtariST) // ST
Format("stx", result.disks, Disk::DiskImageHolder<Storage::Disk::STX>, TargetPlatform::AtariST) // STX
Format("tap", result.tapes, Tape::CommodoreTAP, TargetPlatform::Commodore) // TAP (Commodore)
Format("tap", result.tapes, Tape::OricTAP, TargetPlatform::Oric) // TAP (Oric)
Format("tap", result.tapes, Tape::ZXSpectrumTAP, TargetPlatform::ZXSpectrum) // TAP (ZX Spectrum)
Format("tsx", result.tapes, Tape::TZX, TargetPlatform::MSX) // TSX
Format("tzx", result.tapes, Tape::TZX, TargetPlatform::ZX8081 | TargetPlatform::ZXSpectrum) // TZX
Format("uef", result.tapes, Tape::UEF, TargetPlatform::Acorn) // UEF (tape)
Format("woz", result.disks, Disk::DiskImageHolder<Storage::Disk::WOZ>, TargetPlatform::DiskII) // WOZ
#undef Format accumulator.try_standard<Cartridge::BinaryDump>(TargetPlatform::Sega, "sg");
#undef Insert accumulator.try_standard<Cartridge::BinaryDump>(TargetPlatform::Sega, "sms");
#undef TryInsert accumulator.try_standard<Disk::DiskImageHolder<Disk::SSD>>(TargetPlatform::Acorn, "ssd");
#undef InsertInstance accumulator.try_standard<Disk::DiskImageHolder<Disk::FAT12>>(TargetPlatform::AtariST, "st");
accumulator.try_standard<Disk::DiskImageHolder<Disk::STX>>(TargetPlatform::AtariST, "stx");
return result; accumulator.try_standard<Tape::CommodoreTAP>(TargetPlatform::Commodore, "tap");
accumulator.try_standard<Tape::OricTAP>(TargetPlatform::Oric, "tap");
accumulator.try_standard<Tape::ZXSpectrumTAP>(TargetPlatform::ZXSpectrum, "tap");
accumulator.try_standard<Tape::TZX>(TargetPlatform::MSX, "tsx");
accumulator.try_standard<Tape::TZX>(TargetPlatform::ZX8081 | TargetPlatform::ZXSpectrum, "tzx");
accumulator.try_standard<Tape::UEF>(TargetPlatform::Acorn, "uef");
accumulator.try_standard<Disk::DiskImageHolder<Disk::WOZ>>(TargetPlatform::DiskII, "woz");
return accumulator.media;
} }
Media Analyser::Static::GetMedia(const std::string &file_name) { Media Analyser::Static::GetMedia(const std::string &file_name) {

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef StaticAnalyser_hpp #pragma once
#define StaticAnalyser_hpp
#include "../Machines.hpp" #include "../Machines.hpp"
@ -79,5 +78,3 @@ TargetList GetTargets(const std::string &file_name);
Media GetMedia(const std::string &file_name); Media GetMedia(const std::string &file_name);
} }
#endif /* StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_ZX8081_StaticAnalyser_hpp #pragma once
#define Analyser_Static_ZX8081_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::ZX8081 {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_ZX8081_Target_h #pragma once
#define Analyser_Static_ZX8081_Target_h
#include "../../../Reflection/Enum.hpp" #include "../../../Reflection/Enum.hpp"
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
@ -39,5 +38,3 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl<
}; };
} }
#endif /* Analyser_Static_ZX8081_Target_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2021 Thomas Harte. All rights reserved. // Copyright © 2021 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_ZXSpectrum_StaticAnalyser_hpp #pragma once
#define Analyser_Static_ZXSpectrum_StaticAnalyser_hpp
#include "../StaticAnalyser.hpp" #include "../StaticAnalyser.hpp"
#include "../../../Storage/TargetPlatforms.hpp" #include "../../../Storage/TargetPlatforms.hpp"
@ -18,5 +17,3 @@ namespace Analyser::Static::ZXSpectrum {
TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms);
} }
#endif /* StaticAnalyser_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2021 Thomas Harte. All rights reserved. // Copyright © 2021 Thomas Harte. All rights reserved.
// //
#ifndef Analyser_Static_ZXSpectrum_Target_h #pragma once
#define Analyser_Static_ZXSpectrum_Target_h
#include "../../../Reflection/Enum.hpp" #include "../../../Reflection/Enum.hpp"
#include "../../../Reflection/Struct.hpp" #include "../../../Reflection/Struct.hpp"
@ -37,5 +36,3 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl<
}; };
} }
#endif /* Target_h */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef ClockReceiver_hpp #pragma once
#define ClockReceiver_hpp
#include "ForceInline.hpp" #include "ForceInline.hpp"
@ -277,5 +276,3 @@ template <class T> class HalfClockReceiver: public T {
private: private:
HalfCycles half_cycles_; HalfCycles half_cycles_;
}; };
#endif /* ClockReceiver_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef ClockingHintSource_hpp #pragma once
#define ClockingHintSource_hpp
namespace ClockingHint { namespace ClockingHint {
@ -84,5 +83,3 @@ class Source {
}; };
} }
#endif /* ClockingHintSource_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2018 Thomas Harte. All rights reserved. // Copyright © 2018 Thomas Harte. All rights reserved.
// //
#ifndef DeferredQueue_h #pragma once
#define DeferredQueue_h
#include <functional> #include <functional>
#include <vector> #include <vector>
@ -120,5 +119,3 @@ template <typename TimeUnit> class DeferredQueuePerformer: public DeferredQueue<
private: private:
std::function<void(TimeUnit)> target_; std::function<void(TimeUnit)> target_;
}; };
#endif /* DeferredQueue_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2021 Thomas Harte. All rights reserved. // Copyright © 2021 Thomas Harte. All rights reserved.
// //
#ifndef DeferredValue_h #pragma once
#define DeferredValue_h
/*! /*!
Provides storage for a single deferred value: one with a current value and a certain number Provides storage for a single deferred value: one with a current value and a certain number
@ -44,5 +43,3 @@ template <int DeferredDepth, typename ValueT> class DeferredValue {
(backlog[DeferredDepth / elements_per_uint32] & insert_mask) | (value << insert_shift); (backlog[DeferredDepth / elements_per_uint32] & insert_mask) | (value << insert_shift);
} }
}; };
#endif /* DeferredValue_h */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef ForceInline_hpp #pragma once
#define ForceInline_hpp
#ifndef NDEBUG #ifndef NDEBUG
@ -22,5 +21,3 @@
#endif #endif
#endif #endif
#endif /* ForceInline_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2019 Thomas Harte. All rights reserved. // Copyright © 2019 Thomas Harte. All rights reserved.
// //
#ifndef JustInTime_h #pragma once
#define JustInTime_h
#include "ClockReceiver.hpp" #include "ClockReceiver.hpp"
#include "../Concurrency/AsyncTaskQueue.hpp" #include "../Concurrency/AsyncTaskQueue.hpp"
@ -335,5 +334,3 @@ template <class T, class LocalTimeScale = HalfCycles, class TargetTimeScale = Lo
bool is_flushed_ = true; bool is_flushed_ = true;
Concurrency::AsyncTaskQueue<true> task_queue_; Concurrency::AsyncTaskQueue<true> task_queue_;
}; };
#endif /* JustInTime_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2020 Thomas Harte. All rights reserved. // Copyright © 2020 Thomas Harte. All rights reserved.
// //
#ifndef ScanSynchroniser_h #pragma once
#define ScanSynchroniser_h
#include "../Outputs/ScanTarget.hpp" #include "../Outputs/ScanTarget.hpp"
@ -84,5 +83,3 @@ class ScanSynchroniser {
}; };
} }
#endif /* ScanSynchroniser_h */

View File

@ -6,8 +6,7 @@
// Copyright 2018 Thomas Harte. All rights reserved. // Copyright 2018 Thomas Harte. All rights reserved.
// //
#ifndef TimeTypes_h #pragma once
#define TimeTypes_h
#include <chrono> #include <chrono>
@ -25,6 +24,3 @@ inline Seconds seconds(Nanos nanos) {
} }
} }
#endif /* TimeTypes_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2020 Thomas Harte. All rights reserved. // Copyright © 2020 Thomas Harte. All rights reserved.
// //
#ifndef VSyncPredictor_hpp #pragma once
#define VSyncPredictor_hpp
#include "TimeTypes.hpp" #include "TimeTypes.hpp"
#include <cassert> #include <cassert>
@ -151,5 +150,3 @@ class VSyncPredictor {
}; };
} }
#endif /* VSyncPredictor_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef _770_hpp #pragma once
#define _770_hpp
#include "../../Storage/Disk/Controller/MFMDiskController.hpp" #include "../../Storage/Disk/Controller/MFMDiskController.hpp"
@ -141,5 +140,3 @@ class WD1770: public Storage::Disk::MFMController {
}; };
} }
#endif /* _770_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2019 Thomas Harte. All rights reserved. // Copyright © 2019 Thomas Harte. All rights reserved.
// //
#ifndef ncr5380_hpp #pragma once
#define ncr5380_hpp
#include <cstdint> #include <cstdint>
@ -86,5 +85,3 @@ class NCR5380 final: public SCSI::Bus::Observer {
}; };
} }
#endif /* ncr5380_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef _522_hpp #pragma once
#define _522_hpp
#include <cstdint> #include <cstdint>
@ -140,5 +139,3 @@ template <class BusHandlerT> class MOS6522: public MOS6522Storage {
} }
#include "Implementation/6522Implementation.hpp" #include "Implementation/6522Implementation.hpp"
#endif /* _522_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef _522Storage_hpp #pragma once
#define _522Storage_hpp
#include <cstdint> #include <cstdint>
@ -107,5 +106,3 @@ class MOS6522Storage {
}; };
} }
#endif /* _522Storage_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2021 Thomas Harte. All rights reserved. // Copyright © 2021 Thomas Harte. All rights reserved.
// //
#ifndef _526_h #pragma once
#define _526_h
#include <cstdint> #include <cstdint>
@ -88,5 +87,3 @@ template <typename PortHandlerT, Personality personality> class MOS6526:
} }
#include "Implementation/6526Implementation.hpp" #include "Implementation/6526Implementation.hpp"
#endif /* _526_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2021 Thomas Harte. All rights reserved. // Copyright © 2021 Thomas Harte. All rights reserved.
// //
#ifndef _526Implementation_h #pragma once
#define _526Implementation_h
#include <cassert> #include <cassert>
#include <cstdio> #include <cstdio>
@ -238,5 +237,3 @@ bool MOS6526<BusHandlerT, personality>::serial_line_did_produce_bit(Serial::Line
} }
} }
#endif /* _526Implementation_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2021 Thomas Harte. All rights reserved. // Copyright © 2021 Thomas Harte. All rights reserved.
// //
#ifndef _526Storage_h #pragma once
#define _526Storage_h
#include <array> #include <array>
@ -331,5 +330,3 @@ struct MOS6526Storage {
}; };
} }
#endif /* _526Storage_h */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef _532_hpp #pragma once
#define _532_hpp
#include <cstdint> #include <cstdint>
#include <cstdio> #include <cstdio>
@ -188,5 +187,3 @@ template <class T> class MOS6532 {
}; };
} }
#endif /* _532_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2016 Thomas Harte. All rights reserved. // Copyright 2016 Thomas Harte. All rights reserved.
// //
#ifndef _560_hpp #pragma once
#define _560_hpp
#include "../../ClockReceiver/ClockReceiver.hpp" #include "../../ClockReceiver/ClockReceiver.hpp"
#include "../../Concurrency/AsyncTaskQueue.hpp" #include "../../Concurrency/AsyncTaskQueue.hpp"
@ -515,5 +514,3 @@ template <class BusHandler> class MOS6560 {
}; };
} }
#endif /* _560_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef CRTC6845_hpp #pragma once
#define CRTC6845_hpp
#include "../../ClockReceiver/ClockReceiver.hpp" #include "../../ClockReceiver/ClockReceiver.hpp"
@ -414,5 +413,3 @@ template <class BusHandlerT, Personality personality, CursorType cursor_type> cl
}; };
} }
#endif /* CRTC6845_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2019 Thomas Harte. All rights reserved. // Copyright © 2019 Thomas Harte. All rights reserved.
// //
#ifndef Motorola_ACIA_6850_hpp #pragma once
#define Motorola_ACIA_6850_hpp
#include <cstdint> #include <cstdint>
#include "../../ClockReceiver/ClockReceiver.hpp" #include "../../ClockReceiver/ClockReceiver.hpp"
@ -126,5 +125,3 @@ class ACIA: public ClockingHint::Source, private Serial::Line<false>::ReadDelega
}; };
} }
#endif /* Motorola_ACIA_6850_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2019 Thomas Harte. All rights reserved. // Copyright © 2019 Thomas Harte. All rights reserved.
// //
#ifndef MFP68901_hpp #pragma once
#define MFP68901_hpp
#include "../../ClockReceiver/ClockReceiver.hpp" #include "../../ClockReceiver/ClockReceiver.hpp"
#include "../../ClockReceiver/ClockingHintSource.hpp" #include "../../ClockReceiver/ClockingHintSource.hpp"
@ -184,5 +183,3 @@ class MFP68901: public ClockingHint::Source {
}; };
} }
#endif /* MFP68901_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef i8255_hpp #pragma once
#define i8255_hpp
#include <cstdint> #include <cstdint>
@ -88,5 +87,3 @@ template <class T> class i8255 {
}; };
} }
#endif /* i8255_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef CommandDecoder_hpp #pragma once
#define CommandDecoder_hpp
#include <cstdint> #include <cstdint>
#include <cstddef> #include <cstddef>
@ -217,5 +216,3 @@ class CommandDecoder {
}; };
} }
#endif /* CommandDecoder_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef Results_hpp #pragma once
#define Results_hpp
#include "CommandDecoder.hpp" #include "CommandDecoder.hpp"
#include "Status.hpp" #include "Status.hpp"
@ -61,5 +60,3 @@ class Results {
}; };
} }
#endif /* Results_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef Status_hpp #pragma once
#define Status_hpp
namespace Intel::i8272 { namespace Intel::i8272 {
@ -130,5 +129,3 @@ class Status {
}; };
} }
#endif /* Status_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef i8272_hpp #pragma once
#define i8272_hpp
#include "CommandDecoder.hpp" #include "CommandDecoder.hpp"
#include "Status.hpp" #include "Status.hpp"
@ -134,5 +133,3 @@ class i8272 : public Storage::Disk::MFMController {
}; };
} }
#endif /* i8272_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2019 Thomas Harte. All rights reserved. // Copyright © 2019 Thomas Harte. All rights reserved.
// //
#ifndef z8530_hpp #pragma once
#define z8530_hpp
#include <cstdint> #include <cstdint>
@ -109,5 +108,3 @@ class z8530 {
}; };
} }
#endif /* z8530_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef TMS9918_hpp #pragma once
#define TMS9918_hpp
#include "../../Outputs/CRT/CRT.hpp" #include "../../Outputs/CRT/CRT.hpp"
#include "../../ClockReceiver/ClockReceiver.hpp" #include "../../ClockReceiver/ClockReceiver.hpp"
@ -127,5 +126,3 @@ template <Personality personality> class TMS9918: private Base<personality> {
}; };
} }
#endif /* TMS9918_hpp */

View File

@ -6,8 +6,7 @@
// Copyright 2017 Thomas Harte. All rights reserved. // Copyright 2017 Thomas Harte. All rights reserved.
// //
#ifndef TMS9918Base_hpp #pragma once
#define TMS9918Base_hpp
#include "ClockConverter.hpp" #include "ClockConverter.hpp"
@ -624,5 +623,3 @@ template <Personality personality> struct Base: public Storage<personality> {
#include "Fetch.hpp" #include "Fetch.hpp"
#include "Draw.hpp" #include "Draw.hpp"
#endif /* TMS9918Base_hpp */

View File

@ -6,9 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef AccessEnums_hpp #pragma once
#define AccessEnums_hpp
namespace TI::TMS { namespace TI::TMS {
@ -111,5 +109,3 @@ enum class SpriteMode {
}; };
} }
#endif /* AccessEnums_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef ClockConverter_hpp #pragma once
#define ClockConverter_hpp
#include "../9918.hpp" #include "../9918.hpp"
#include "PersonalityTraits.hpp" #include "PersonalityTraits.hpp"
@ -164,5 +163,3 @@ template <Personality personality> class ClockConverter {
}; };
} }
#endif /* ClockConverter_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef Draw_hpp #pragma once
#define Draw_hpp
namespace TI::TMS { namespace TI::TMS {
@ -568,5 +567,3 @@ void Base<personality>::draw_yamaha(uint8_t y, int start, int end) {
// TODO. // TODO.
} }
#endif /* Draw_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef Fetch_hpp #pragma once
#define Fetch_hpp
namespace TI::TMS { namespace TI::TMS {
@ -792,5 +791,3 @@ template<bool use_end> void Base<personality>::fetch_yamaha(uint8_t y, int, int
// TODO. // TODO.
} }
#endif /* Fetch_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef LineBuffer_hpp #pragma once
#define LineBuffer_hpp
#include "AccessEnums.hpp" #include "AccessEnums.hpp"
@ -128,5 +127,3 @@ struct LineBufferPointer {
}; };
} }
#endif /* LineBuffer_hpp */

View File

@ -6,8 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef LineLayout_h #pragma once
#define LineLayout_h
namespace TI::TMS { namespace TI::TMS {
@ -76,5 +75,3 @@ template <Personality personality> struct LineLayout<personality, std::enable_if
}; };
} }
#endif /* LineLayout_h */

View File

@ -6,8 +6,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef PersonalityTraits_hpp #pragma once
#define PersonalityTraits_hpp
namespace TI::TMS { namespace TI::TMS {
@ -46,5 +45,3 @@ constexpr size_t memory_mask(Personality p) {
} }
} }
#endif /* PersonalityTraits_hpp */

View File

@ -7,8 +7,7 @@
// Copyright © 2023 Thomas Harte. All rights reserved. // Copyright © 2023 Thomas Harte. All rights reserved.
// //
#ifndef Storage_h #pragma once
#define Storage_h
#include "LineBuffer.hpp" #include "LineBuffer.hpp"
#include "YamahaCommands.hpp" #include "YamahaCommands.hpp"
@ -486,5 +485,3 @@ template <Personality personality> struct Storage<personality, std::enable_if_t<
}; };
} }
#endif /* Storage_h */

Some files were not shown because too many files have changed in this diff Show More