diff --git a/Analyser/Dynamic/ConfidenceCounter.hpp b/Analyser/Dynamic/ConfidenceCounter.hpp index 9e409592f..a625a9d55 100644 --- a/Analyser/Dynamic/ConfidenceCounter.hpp +++ b/Analyser/Dynamic/ConfidenceCounter.hpp @@ -11,8 +11,7 @@ #include "ConfidenceSource.hpp" -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a confidence source that calculates its probability by virtual of a history of events. @@ -41,7 +40,6 @@ class ConfidenceCounter: public ConfidenceSource { int misses_ = 1; }; -} } #endif /* ConfidenceCounter_hpp */ diff --git a/Analyser/Dynamic/ConfidenceSource.hpp b/Analyser/Dynamic/ConfidenceSource.hpp index 0211a6d19..fb2dd3518 100644 --- a/Analyser/Dynamic/ConfidenceSource.hpp +++ b/Analyser/Dynamic/ConfidenceSource.hpp @@ -9,8 +9,7 @@ #ifndef ConfidenceSource_hpp #define ConfidenceSource_hpp -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides an abstract interface through which objects can declare the probability @@ -22,7 +21,6 @@ struct ConfidenceSource { virtual float get_confidence() = 0; }; -} } #endif /* ConfidenceSource_hpp */ diff --git a/Analyser/Dynamic/ConfidenceSummary.hpp b/Analyser/Dynamic/ConfidenceSummary.hpp index ccab36761..e49ad921d 100644 --- a/Analyser/Dynamic/ConfidenceSummary.hpp +++ b/Analyser/Dynamic/ConfidenceSummary.hpp @@ -13,8 +13,7 @@ #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Summaries a collection of confidence sources by calculating their weighted sum. @@ -40,7 +39,6 @@ class ConfidenceSummary: public ConfidenceSource { float weight_sum_; }; -} } #endif /* ConfidenceSummary_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp index 2595fc69c..82838db84 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp @@ -15,8 +15,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a class that multiplexes the configurable interface to multiple machines. @@ -36,7 +35,6 @@ class MultiConfigurable: public Configurable::Device { std::vector devices_; }; -} } #endif /* MultiConfigurable_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp index 7c5457a16..dfe12c8a4 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp @@ -14,8 +14,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a class that multiplexes the joystick machine interface to multiple machines. @@ -34,7 +33,6 @@ class MultiJoystickMachine: public MachineTypes::JoystickMachine { std::vector> joysticks_; }; -} } #endif /* MultiJoystickMachine_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp index 2de296456..c01b93c57 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp @@ -15,8 +15,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a class that multiplexes the keyboard machine interface to multiple machines. @@ -55,7 +54,6 @@ class MultiKeyboardMachine: public MachineTypes::KeyboardMachine { Inputs::Keyboard &get_keyboard() final; }; -} } #endif /* MultiKeyboardMachine_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiMediaTarget.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiMediaTarget.hpp index 274261462..0ec4ad1cf 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiMediaTarget.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiMediaTarget.hpp @@ -15,8 +15,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a class that multiplexes the media target interface to multiple machines. @@ -35,7 +34,6 @@ struct MultiMediaTarget: public MachineTypes::MediaTarget { std::vector targets_; }; -} } #endif /* MultiMediaTarget_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiProducer.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiProducer.hpp index 02e27c4df..3a850f709 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiProducer.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiProducer.hpp @@ -19,8 +19,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { template class MultiInterface { public: @@ -116,7 +115,5 @@ class MultiAudioProducer: public MultiInterface, pu */ } -} - #endif /* MultiProducer_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiSpeaker.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiSpeaker.hpp index e5946da1a..def9feaba 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiSpeaker.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiSpeaker.hpp @@ -16,8 +16,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a class that multiplexes calls to and from Outputs::Speaker::Speaker in order @@ -55,7 +54,6 @@ class MultiSpeaker: public Outputs::Speaker::Speaker, Outputs::Speaker::Speaker: bool stereo_output_ = false; }; -} } #endif /* MultiSpeaker_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/MultiMachine.hpp b/Analyser/Dynamic/MultiMachine/MultiMachine.hpp index ec7e10f48..a31c2f119 100644 --- a/Analyser/Dynamic/MultiMachine/MultiMachine.hpp +++ b/Analyser/Dynamic/MultiMachine/MultiMachine.hpp @@ -22,8 +22,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides the same interface as to a single machine, while multiplexing all @@ -80,7 +79,6 @@ class MultiMachine: public ::Machine::DynamicMachine, public MultiTimedMachine:: bool has_picked_ = false; }; -} } #endif /* MultiMachine_hpp */ diff --git a/Analyser/Static/Acorn/Disk.hpp b/Analyser/Static/Acorn/Disk.hpp index bd3b519fc..87b11951c 100644 --- a/Analyser/Static/Acorn/Disk.hpp +++ b/Analyser/Static/Acorn/Disk.hpp @@ -12,9 +12,7 @@ #include "File.hpp" #include "../../../Storage/Disk/Disk.hpp" -namespace Analyser { -namespace Static { -namespace Acorn { +namespace Analyser::Static::Acorn { /// Describes a DFS- or ADFS-format catalogue(/directory): the list of files available and the catalogue's boot option. struct Catalogue { @@ -31,8 +29,6 @@ struct Catalogue { std::unique_ptr GetDFSCatalogue(const std::shared_ptr &disk); std::unique_ptr GetADFSCatalogue(const std::shared_ptr &disk); -} -} } #endif /* Disk_hpp */ diff --git a/Analyser/Static/Acorn/File.hpp b/Analyser/Static/Acorn/File.hpp index f0a9d612e..f268af247 100644 --- a/Analyser/Static/Acorn/File.hpp +++ b/Analyser/Static/Acorn/File.hpp @@ -13,9 +13,7 @@ #include #include -namespace Analyser { -namespace Static { -namespace Acorn { +namespace Analyser::Static::Acorn { struct File { std::string name; @@ -60,8 +58,6 @@ struct File { std::vector chunks; }; -} -} } #endif /* File_hpp */ diff --git a/Analyser/Static/Acorn/StaticAnalyser.hpp b/Analyser/Static/Acorn/StaticAnalyser.hpp index d7acbbc38..079178c96 100644 --- a/Analyser/Static/Acorn/StaticAnalyser.hpp +++ b/Analyser/Static/Acorn/StaticAnalyser.hpp @@ -13,14 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace Acorn { +namespace Analyser::Static::Acorn { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* AcornAnalyser_hpp */ diff --git a/Analyser/Static/Acorn/Tape.hpp b/Analyser/Static/Acorn/Tape.hpp index a02f83ce5..f01216910 100644 --- a/Analyser/Static/Acorn/Tape.hpp +++ b/Analyser/Static/Acorn/Tape.hpp @@ -14,14 +14,10 @@ #include "File.hpp" #include "../../../Storage/Tape/Tape.hpp" -namespace Analyser { -namespace Static { -namespace Acorn { +namespace Analyser::Static::Acorn { std::vector GetFiles(const std::shared_ptr &tape); -} -} } #endif /* Tape_hpp */ diff --git a/Analyser/Static/Acorn/Target.hpp b/Analyser/Static/Acorn/Target.hpp index 17dad7393..bf7f8ffc9 100644 --- a/Analyser/Static/Acorn/Target.hpp +++ b/Analyser/Static/Acorn/Target.hpp @@ -13,9 +13,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace Acorn { +namespace Analyser::Static::Acorn { struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl { bool has_acorn_adfs = false; @@ -37,8 +35,6 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl< } }; -} -} } #endif /* Analyser_Static_Acorn_Target_h */ diff --git a/Analyser/Static/Amiga/StaticAnalyser.hpp b/Analyser/Static/Amiga/StaticAnalyser.hpp index 99b6169ec..fe9dc6b56 100644 --- a/Analyser/Static/Amiga/StaticAnalyser.hpp +++ b/Analyser/Static/Amiga/StaticAnalyser.hpp @@ -13,15 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace Amiga { +namespace Analyser::Static::Amiga { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); } -} -} - #endif /* Analyser_Static_Amiga_StaticAnalyser_hpp */ diff --git a/Analyser/Static/Amiga/Target.hpp b/Analyser/Static/Amiga/Target.hpp index a41d37dd9..9ff9e99a3 100644 --- a/Analyser/Static/Amiga/Target.hpp +++ b/Analyser/Static/Amiga/Target.hpp @@ -12,9 +12,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace Amiga { +namespace Analyser::Static::Amiga { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(ChipRAM, @@ -41,8 +39,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace AmstradCPC { +namespace Analyser::Static::AmstradCPC { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* Analyser_Static_AmstradCPC_StaticAnalyser_hpp */ diff --git a/Analyser/Static/AmstradCPC/Target.hpp b/Analyser/Static/AmstradCPC/Target.hpp index 6f708d4b0..ce19355a6 100644 --- a/Analyser/Static/AmstradCPC/Target.hpp +++ b/Analyser/Static/AmstradCPC/Target.hpp @@ -14,9 +14,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace AmstradCPC { +namespace Analyser::Static::AmstradCPC { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, CPC464, CPC664, CPC6128); @@ -32,8 +30,5 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace AppleII { +namespace Analyser::Static::AppleII { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* Analyser_Static_AppleII_StaticAnalyser_hpp */ diff --git a/Analyser/Static/AppleII/Target.hpp b/Analyser/Static/AppleII/Target.hpp index 030b81947..e351c24fc 100644 --- a/Analyser/Static/AppleII/Target.hpp +++ b/Analyser/Static/AppleII/Target.hpp @@ -13,9 +13,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace AppleII { +namespace Analyser::Static::AppleII { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, @@ -51,8 +49,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace AppleIIgs { +namespace Analyser::Static::AppleIIgs { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* Analyser_Static_AppleIIgs_StaticAnalyser_hpp */ diff --git a/Analyser/Static/AppleIIgs/Target.hpp b/Analyser/Static/AppleIIgs/Target.hpp index a0eb988aa..dda1515d4 100644 --- a/Analyser/Static/AppleIIgs/Target.hpp +++ b/Analyser/Static/AppleIIgs/Target.hpp @@ -13,9 +13,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace AppleIIgs { +namespace Analyser::Static::AppleIIgs { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, @@ -42,8 +40,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace Atari2600 { +namespace Analyser::Static::Atari2600 { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/Atari2600/Target.hpp b/Analyser/Static/Atari2600/Target.hpp index c372656ff..2ed2400a2 100644 --- a/Analyser/Static/Atari2600/Target.hpp +++ b/Analyser/Static/Atari2600/Target.hpp @@ -11,9 +11,7 @@ #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace Atari2600 { +namespace Analyser::Static::Atari2600 { struct Target: public ::Analyser::Static::Target { enum class PagingModel { @@ -38,8 +36,6 @@ struct Target: public ::Analyser::Static::Target { Target() : Analyser::Static::Target(Machine::Atari2600) {} }; -} -} } #endif /* Analyser_Static_Atari_Target_h */ diff --git a/Analyser/Static/AtariST/StaticAnalyser.hpp b/Analyser/Static/AtariST/StaticAnalyser.hpp index 54c041eed..061e2cb4c 100644 --- a/Analyser/Static/AtariST/StaticAnalyser.hpp +++ b/Analyser/Static/AtariST/StaticAnalyser.hpp @@ -13,15 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace AtariST { +namespace Analyser::Static::AtariST { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); } -} -} - #endif /* Analyser_Static_AtariST_StaticAnalyser_hpp */ diff --git a/Analyser/Static/AtariST/Target.hpp b/Analyser/Static/AtariST/Target.hpp index b4d01279f..a8cd792da 100644 --- a/Analyser/Static/AtariST/Target.hpp +++ b/Analyser/Static/AtariST/Target.hpp @@ -12,9 +12,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace AtariST { +namespace Analyser::Static::AtariST { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(MemorySize, @@ -31,8 +29,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace Coleco { +namespace Analyser::Static::Coleco { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/Commodore/Disk.hpp b/Analyser/Static/Commodore/Disk.hpp index 486ea086d..ec4376d87 100644 --- a/Analyser/Static/Commodore/Disk.hpp +++ b/Analyser/Static/Commodore/Disk.hpp @@ -14,14 +14,10 @@ #include -namespace Analyser { -namespace Static { -namespace Commodore { +namespace Analyser::Static::Commodore { std::vector GetFiles(const std::shared_ptr &disk); -} -} } #endif /* Disk_hpp */ diff --git a/Analyser/Static/Commodore/File.hpp b/Analyser/Static/Commodore/File.hpp index 5f943a3c8..61b4a9b10 100644 --- a/Analyser/Static/Commodore/File.hpp +++ b/Analyser/Static/Commodore/File.hpp @@ -12,9 +12,7 @@ #include #include -namespace Analyser { -namespace Static { -namespace Commodore { +namespace Analyser::Static::Commodore { struct File { std::wstring name; @@ -35,8 +33,6 @@ struct File { bool is_basic(); }; -} -} } #endif /* File_hpp */ diff --git a/Analyser/Static/Commodore/StaticAnalyser.hpp b/Analyser/Static/Commodore/StaticAnalyser.hpp index 86d7c9bed..548020ae5 100644 --- a/Analyser/Static/Commodore/StaticAnalyser.hpp +++ b/Analyser/Static/Commodore/StaticAnalyser.hpp @@ -13,14 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace Commodore { +namespace Analyser::Static::Commodore { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* CommodoreAnalyser_hpp */ diff --git a/Analyser/Static/Commodore/Tape.hpp b/Analyser/Static/Commodore/Tape.hpp index 1dec3a1cc..2531bb89c 100644 --- a/Analyser/Static/Commodore/Tape.hpp +++ b/Analyser/Static/Commodore/Tape.hpp @@ -12,14 +12,10 @@ #include "../../../Storage/Tape/Tape.hpp" #include "File.hpp" -namespace Analyser { -namespace Static { -namespace Commodore { +namespace Analyser::Static::Commodore { std::vector GetFiles(const std::shared_ptr &tape); -} -} } #endif /* Tape_hpp */ diff --git a/Analyser/Static/Commodore/Target.hpp b/Analyser/Static/Commodore/Target.hpp index 9da8506ec..4752544c0 100644 --- a/Analyser/Static/Commodore/Target.hpp +++ b/Analyser/Static/Commodore/Target.hpp @@ -14,9 +14,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace Commodore { +namespace Analyser::Static::Commodore { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { enum class MemoryModel { @@ -71,8 +69,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl #include -namespace Analyser { -namespace Static { -namespace MOS6502 { +namespace Analyser::Static::MOS6502 { /*! Describes a 6502 instruciton: its address, the operation it performs, its addressing mode @@ -95,7 +93,5 @@ Disassembly Disassemble( std::vector entry_points); } -} -} #endif /* Disassembler6502_hpp */ diff --git a/Analyser/Static/Disassembler/AddressMapper.hpp b/Analyser/Static/Disassembler/AddressMapper.hpp index 0bb8988c0..debc18600 100644 --- a/Analyser/Static/Disassembler/AddressMapper.hpp +++ b/Analyser/Static/Disassembler/AddressMapper.hpp @@ -11,9 +11,7 @@ #include -namespace Analyser { -namespace Static { -namespace Disassembler { +namespace Analyser::Static::Disassembler { /*! Provides an address mapper that relocates a chunk of memory so that it starts at @@ -25,8 +23,6 @@ template std::function OffsetMapper(T start_address }; } -} -} } #endif /* AddressMapper_hpp */ diff --git a/Analyser/Static/Disassembler/Kernel.hpp b/Analyser/Static/Disassembler/Kernel.hpp index d18e9e915..e6817b760 100644 --- a/Analyser/Static/Disassembler/Kernel.hpp +++ b/Analyser/Static/Disassembler/Kernel.hpp @@ -9,9 +9,7 @@ #ifndef Kernel_hpp #define Kernel_hpp -namespace Analyser { -namespace Static { -namespace Disassembly { +namespace Analyser::Static::Disassembly { template struct PartialDisassembly { D disassembly; @@ -45,8 +43,6 @@ template D Disassemble( return partial_disassembly.disassembly; } -} -} } #endif /* Kernel_hpp */ diff --git a/Analyser/Static/Disassembler/Z80.hpp b/Analyser/Static/Disassembler/Z80.hpp index 4f46b055d..ebed669d2 100644 --- a/Analyser/Static/Disassembler/Z80.hpp +++ b/Analyser/Static/Disassembler/Z80.hpp @@ -15,9 +15,7 @@ #include #include -namespace Analyser { -namespace Static { -namespace Z80 { +namespace Analyser::Static::Z80 { struct Instruction { /*! The address this instruction starts at. This is a mapped address. */ @@ -84,7 +82,5 @@ Disassembly Disassemble( std::vector entry_points); } -} -} #endif /* StaticAnalyser_Disassembler_Z80_hpp */ diff --git a/Analyser/Static/DiskII/StaticAnalyser.hpp b/Analyser/Static/DiskII/StaticAnalyser.hpp index a1f7a09f1..87ebc413b 100644 --- a/Analyser/Static/DiskII/StaticAnalyser.hpp +++ b/Analyser/Static/DiskII/StaticAnalyser.hpp @@ -13,15 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace DiskII { +namespace Analyser::Static::DiskII { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); } -} -} - #endif /* Analyser_Static_DiskII_StaticAnalyser_hpp */ diff --git a/Analyser/Static/Enterprise/StaticAnalyser.hpp b/Analyser/Static/Enterprise/StaticAnalyser.hpp index 0d7435d0a..ef03fc17f 100644 --- a/Analyser/Static/Enterprise/StaticAnalyser.hpp +++ b/Analyser/Static/Enterprise/StaticAnalyser.hpp @@ -13,15 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace Enterprise { +namespace Analyser::Static::Enterprise { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); } -} -} - #endif /* Analyser_Static_Enterprise_StaticAnalyser_hpp */ diff --git a/Analyser/Static/Enterprise/Target.hpp b/Analyser/Static/Enterprise/Target.hpp index 957852c5f..c1428ae73 100644 --- a/Analyser/Static/Enterprise/Target.hpp +++ b/Analyser/Static/Enterprise/Target.hpp @@ -15,9 +15,7 @@ #include -namespace Analyser { -namespace Static { -namespace Enterprise { +namespace Analyser::Static::Enterprise { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, Enterprise64, Enterprise128, Enterprise256); @@ -50,8 +48,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace MSX { +namespace Analyser::Static::MSX { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_MSX_StaticAnalyser_hpp */ diff --git a/Analyser/Static/MSX/Tape.hpp b/Analyser/Static/MSX/Tape.hpp index eb0ca66bf..b57a5928c 100644 --- a/Analyser/Static/MSX/Tape.hpp +++ b/Analyser/Static/MSX/Tape.hpp @@ -14,9 +14,7 @@ #include #include -namespace Analyser { -namespace Static { -namespace MSX { +namespace Analyser::Static::MSX { struct File { std::string name; @@ -37,8 +35,6 @@ struct File { std::vector GetFiles(const std::shared_ptr &tape); -} -} } #endif /* StaticAnalyser_MSX_Tape_hpp */ diff --git a/Analyser/Static/MSX/Target.hpp b/Analyser/Static/MSX/Target.hpp index 13b95eff1..4b6ae5185 100644 --- a/Analyser/Static/MSX/Target.hpp +++ b/Analyser/Static/MSX/Target.hpp @@ -14,9 +14,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace MSX { +namespace Analyser::Static::MSX { struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl { bool has_disk_drive = false; @@ -46,8 +44,6 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl< } }; -} -} } #endif /* Analyser_Static_MSX_Target_h */ diff --git a/Analyser/Static/Macintosh/StaticAnalyser.hpp b/Analyser/Static/Macintosh/StaticAnalyser.hpp index 8b40c0120..e9b165c74 100644 --- a/Analyser/Static/Macintosh/StaticAnalyser.hpp +++ b/Analyser/Static/Macintosh/StaticAnalyser.hpp @@ -13,15 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace Macintosh { +namespace Analyser::Static::Macintosh { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); } -} -} - #endif /* Analyser_Static_Macintosh_StaticAnalyser_hpp */ diff --git a/Analyser/Static/Macintosh/Target.hpp b/Analyser/Static/Macintosh/Target.hpp index f00cb4a24..6a46ca1e0 100644 --- a/Analyser/Static/Macintosh/Target.hpp +++ b/Analyser/Static/Macintosh/Target.hpp @@ -13,9 +13,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace Macintosh { +namespace Analyser::Static::Macintosh { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, Mac128k, Mac512k, Mac512ke, MacPlus); @@ -30,8 +28,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace Oric { +namespace Analyser::Static::Oric { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/Oric/Tape.hpp b/Analyser/Static/Oric/Tape.hpp index fc7734697..bf0931950 100644 --- a/Analyser/Static/Oric/Tape.hpp +++ b/Analyser/Static/Oric/Tape.hpp @@ -14,9 +14,7 @@ #include #include -namespace Analyser { -namespace Static { -namespace Oric { +namespace Analyser::Static::Oric { struct File { std::string name; @@ -33,8 +31,6 @@ struct File { std::vector GetFiles(const std::shared_ptr &tape); -} -} } #endif /* Tape_hpp */ diff --git a/Analyser/Static/Oric/Target.hpp b/Analyser/Static/Oric/Target.hpp index 74e686dff..4b43c4aff 100644 --- a/Analyser/Static/Oric/Target.hpp +++ b/Analyser/Static/Oric/Target.hpp @@ -14,9 +14,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace Oric { +namespace Analyser::Static::Oric { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(ROM, @@ -56,8 +54,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace Sega { +namespace Analyser::Static::Sega { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/Sega/Target.hpp b/Analyser/Static/Sega/Target.hpp index 24230293d..20142ca48 100644 --- a/Analyser/Static/Sega/Target.hpp +++ b/Analyser/Static/Sega/Target.hpp @@ -13,9 +13,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace Sega { +namespace Analyser::Static::Sega { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { enum class Model { @@ -52,8 +50,6 @@ constexpr bool is_master_system(Analyser::Static::Sega::Target::Model model) { return model >= Analyser::Static::Sega::Target::Model::MasterSystem; } -} -} } #endif /* Analyser_Static_Sega_Target_h */ diff --git a/Analyser/Static/StaticAnalyser.hpp b/Analyser/Static/StaticAnalyser.hpp index 259f7cca9..f4e3fd317 100644 --- a/Analyser/Static/StaticAnalyser.hpp +++ b/Analyser/Static/StaticAnalyser.hpp @@ -21,8 +21,7 @@ #include #include -namespace Analyser { -namespace Static { +namespace Analyser::Static { struct State; @@ -79,7 +78,6 @@ TargetList GetTargets(const std::string &file_name); */ Media GetMedia(const std::string &file_name); -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/ZX8081/StaticAnalyser.hpp b/Analyser/Static/ZX8081/StaticAnalyser.hpp index 141a15945..2fa1ce49e 100644 --- a/Analyser/Static/ZX8081/StaticAnalyser.hpp +++ b/Analyser/Static/ZX8081/StaticAnalyser.hpp @@ -13,14 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace ZX8081 { +namespace Analyser::Static::ZX8081 { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/ZX8081/Target.hpp b/Analyser/Static/ZX8081/Target.hpp index c7dd7e60d..f4a27c4ad 100644 --- a/Analyser/Static/ZX8081/Target.hpp +++ b/Analyser/Static/ZX8081/Target.hpp @@ -14,9 +14,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace ZX8081 { +namespace Analyser::Static::ZX8081 { struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(MemoryModel, @@ -40,8 +38,6 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl< } }; -} -} } #endif /* Analyser_Static_ZX8081_Target_h */ diff --git a/Analyser/Static/ZXSpectrum/StaticAnalyser.hpp b/Analyser/Static/ZXSpectrum/StaticAnalyser.hpp index 756c28ad0..7e5ef7945 100644 --- a/Analyser/Static/ZXSpectrum/StaticAnalyser.hpp +++ b/Analyser/Static/ZXSpectrum/StaticAnalyser.hpp @@ -13,14 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace ZXSpectrum { +namespace Analyser::Static::ZXSpectrum { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/ZXSpectrum/Target.hpp b/Analyser/Static/ZXSpectrum/Target.hpp index 76eada20e..bd42dbd8d 100644 --- a/Analyser/Static/ZXSpectrum/Target.hpp +++ b/Analyser/Static/ZXSpectrum/Target.hpp @@ -13,9 +13,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace ZXSpectrum { +namespace Analyser::Static::ZXSpectrum { struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, @@ -38,8 +36,6 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl< } }; -} -} } #endif /* Target_h */ diff --git a/Components/5380/ncr5380.hpp b/Components/5380/ncr5380.hpp index 6ea409b53..18d4e367d 100644 --- a/Components/5380/ncr5380.hpp +++ b/Components/5380/ncr5380.hpp @@ -14,8 +14,7 @@ #include "../../Storage/MassStorage/SCSI/SCSI.hpp" -namespace NCR { -namespace NCR5380 { +namespace NCR::NCR5380 { /*! Models the NCR 5380, a SCSI interface chip. @@ -86,7 +85,6 @@ class NCR5380 final: public SCSI::Bus::Observer { bool phase_matches() const; }; -} } #endif /* ncr5380_hpp */ diff --git a/Components/6522/6522.hpp b/Components/6522/6522.hpp index 3e09819d0..20eaeaa3e 100644 --- a/Components/6522/6522.hpp +++ b/Components/6522/6522.hpp @@ -15,8 +15,7 @@ #include "../../ClockReceiver/ClockReceiver.hpp" -namespace MOS { -namespace MOS6522 { +namespace MOS::MOS6522 { enum Port { A = 0, @@ -138,7 +137,6 @@ template class MOS6522: public MOS6522Storage { void evaluate_port_b_output(); }; -} } #include "Implementation/6522Implementation.hpp" diff --git a/Components/6522/Implementation/6522Implementation.hpp b/Components/6522/Implementation/6522Implementation.hpp index 3e23422eb..52edea000 100644 --- a/Components/6522/Implementation/6522Implementation.hpp +++ b/Components/6522/Implementation/6522Implementation.hpp @@ -12,8 +12,7 @@ // // PB6 count-down mode for timer 2. -namespace MOS { -namespace MOS6522 { +namespace MOS::MOS6522 { template void MOS6522::access(int address) { switch(address) { @@ -494,4 +493,3 @@ template void MOS6522::shift_out() { } } -} diff --git a/Components/6522/Implementation/6522Storage.hpp b/Components/6522/Implementation/6522Storage.hpp index 0c7f4c789..1488954e2 100644 --- a/Components/6522/Implementation/6522Storage.hpp +++ b/Components/6522/Implementation/6522Storage.hpp @@ -11,8 +11,7 @@ #include -namespace MOS { -namespace MOS6522 { +namespace MOS::MOS6522 { class MOS6522Storage { protected: @@ -107,7 +106,6 @@ class MOS6522Storage { } }; -} } #endif /* _522Storage_hpp */ diff --git a/Components/6526/6526.hpp b/Components/6526/6526.hpp index 99eb5e8e6..08c68cf6e 100644 --- a/Components/6526/6526.hpp +++ b/Components/6526/6526.hpp @@ -14,8 +14,7 @@ #include "Implementation/6526Storage.hpp" #include "../Serial/Line.hpp" -namespace MOS { -namespace MOS6526 { +namespace MOS::MOS6526 { enum Port { A = 0, @@ -86,7 +85,6 @@ template class MOS6526: bool serial_line_did_produce_bit(Serial::Line *line, int bit) final; }; -} } #include "Implementation/6526Implementation.hpp" diff --git a/Components/6526/Implementation/6526Implementation.hpp b/Components/6526/Implementation/6526Implementation.hpp index 92ecf5269..dad339574 100644 --- a/Components/6526/Implementation/6526Implementation.hpp +++ b/Components/6526/Implementation/6526Implementation.hpp @@ -12,8 +12,7 @@ #include #include -namespace MOS { -namespace MOS6526 { +namespace MOS::MOS6526 { enum Interrupts: uint8_t { TimerA = 1 << 0, @@ -238,7 +237,6 @@ bool MOS6526::serial_line_did_produce_bit(Serial::Line return true; } -} } #endif /* _526Implementation_h */ diff --git a/Components/6526/Implementation/6526Storage.hpp b/Components/6526/Implementation/6526Storage.hpp index 7a3c2bf1b..99978f67c 100644 --- a/Components/6526/Implementation/6526Storage.hpp +++ b/Components/6526/Implementation/6526Storage.hpp @@ -13,8 +13,7 @@ #include "../../../ClockReceiver/ClockReceiver.hpp" -namespace MOS { -namespace MOS6526 { +namespace MOS::MOS6526 { class TODBase { public: @@ -333,7 +332,6 @@ struct MOS6526Storage { int pending_ = 0; }; -} } #endif /* _526Storage_h */ diff --git a/Components/6560/6560.hpp b/Components/6560/6560.hpp index 1ebd3e6e8..91fc82a74 100644 --- a/Components/6560/6560.hpp +++ b/Components/6560/6560.hpp @@ -15,8 +15,7 @@ #include "../../Outputs/Speaker/Implementation/LowpassSpeaker.hpp" #include "../../Outputs/Speaker/Implementation/SampleSource.hpp" -namespace MOS { -namespace MOS6560 { +namespace MOS::MOS6560 { // audio state class AudioGenerator: public ::Outputs::Speaker::SampleSource { @@ -520,7 +519,6 @@ template class MOS6560 { OutputMode output_mode_ = OutputMode::NTSC; }; -} } #endif /* _560_hpp */ diff --git a/Components/6845/CRTC6845.hpp b/Components/6845/CRTC6845.hpp index 7006a37e9..fd7008041 100644 --- a/Components/6845/CRTC6845.hpp +++ b/Components/6845/CRTC6845.hpp @@ -14,8 +14,7 @@ #include #include -namespace Motorola { -namespace CRTC { +namespace Motorola::CRTC { struct BusState { bool display_enable = false; @@ -269,7 +268,6 @@ template class CRTC6845 { unsigned int character_is_visible_shifter_ = 0; }; -} } #endif /* CRTC6845_hpp */ diff --git a/Components/6850/6850.hpp b/Components/6850/6850.hpp index 69e192e90..280723e0b 100644 --- a/Components/6850/6850.hpp +++ b/Components/6850/6850.hpp @@ -15,8 +15,7 @@ #include "../../ClockReceiver/ClockingHintSource.hpp" #include "../Serial/Line.hpp" -namespace Motorola { -namespace ACIA { +namespace Motorola::ACIA { class ACIA: public ClockingHint::Source, private Serial::Line::ReadDelegate { public: @@ -126,7 +125,6 @@ class ACIA: public ClockingHint::Source, private Serial::Line::ReadDelega uint8_t get_status(); }; -} } #endif /* Motorola_ACIA_6850_hpp */ diff --git a/Components/68901/MFP68901.hpp b/Components/68901/MFP68901.hpp index f1bda90dd..4c067d1f2 100644 --- a/Components/68901/MFP68901.hpp +++ b/Components/68901/MFP68901.hpp @@ -14,8 +14,7 @@ #include -namespace Motorola { -namespace MFP68901 { +namespace Motorola::MFP68901 { class PortHandler { public: @@ -182,7 +181,6 @@ class MFP68901: public ClockingHint::Source { } }; -} } #endif /* MFP68901_hpp */ diff --git a/Components/8255/i8255.hpp b/Components/8255/i8255.hpp index d8e2a42f6..2551c402e 100644 --- a/Components/8255/i8255.hpp +++ b/Components/8255/i8255.hpp @@ -11,8 +11,7 @@ #include -namespace Intel { -namespace i8255 { +namespace Intel::i8255 { class PortHandler { public: @@ -88,7 +87,6 @@ template class i8255 { T &port_handler_; }; -} } #endif /* i8255_hpp */ diff --git a/Components/8272/i8272.hpp b/Components/8272/i8272.hpp index cb589343c..0c502e3c8 100644 --- a/Components/8272/i8272.hpp +++ b/Components/8272/i8272.hpp @@ -15,8 +15,7 @@ #include #include -namespace Intel { -namespace i8272 { +namespace Intel::i8272 { class BusHandler { public: @@ -130,7 +129,6 @@ class i8272 : public Storage::Disk::MFMController { bool is_sleeping_ = false; }; -} } #endif /* i8272_hpp */ diff --git a/Components/8530/z8530.hpp b/Components/8530/z8530.hpp index 4826cb445..099aa6e24 100644 --- a/Components/8530/z8530.hpp +++ b/Components/8530/z8530.hpp @@ -11,8 +11,7 @@ #include -namespace Zilog { -namespace SCC { +namespace Zilog::SCC { /*! Models the Zilog 8530 SCC, a serial adaptor. @@ -110,7 +109,5 @@ class z8530 { }; } -} - #endif /* z8530_hpp */ diff --git a/Components/AY38910/AY38910.hpp b/Components/AY38910/AY38910.hpp index b06a92b2b..a42a51124 100644 --- a/Components/AY38910/AY38910.hpp +++ b/Components/AY38910/AY38910.hpp @@ -14,8 +14,7 @@ #include "../../Reflection/Struct.hpp" -namespace GI { -namespace AY38910 { +namespace GI::AY38910 { /*! A port handler provides all input for an AY's two 8-bit ports, and may optionally receive @@ -219,7 +218,6 @@ struct State: public Reflection::StructImpl { } }; -} } #endif /* AY_3_8910_hpp */ diff --git a/Components/AppleClock/AppleClock.hpp b/Components/AppleClock/AppleClock.hpp index 0b06bb2cf..cf27a796f 100644 --- a/Components/AppleClock/AppleClock.hpp +++ b/Components/AppleClock/AppleClock.hpp @@ -11,8 +11,7 @@ #include -namespace Apple { -namespace Clock { +namespace Apple::Clock { /*! Models Apple's real-time clocks, as contained in the Macintosh and IIgs. @@ -293,7 +292,6 @@ class ParallelClock: public ClockStorage { uint8_t control_; }; -} } #endif /* Apple_RealTimeClock_hpp */ diff --git a/Components/DiskII/DiskIIDrive.hpp b/Components/DiskII/DiskIIDrive.hpp index e003919aa..55e883e08 100644 --- a/Components/DiskII/DiskIIDrive.hpp +++ b/Components/DiskII/DiskIIDrive.hpp @@ -11,8 +11,7 @@ #include "IWM.hpp" -namespace Apple { -namespace Disk { +namespace Apple::Disk { class DiskIIDrive: public IWMDrive { public: @@ -27,7 +26,6 @@ class DiskIIDrive: public IWMDrive { int stepper_position_ = 0; }; -} } #endif /* DiskIIDrive_hpp */ diff --git a/Components/DiskII/MacintoshDoubleDensityDrive.hpp b/Components/DiskII/MacintoshDoubleDensityDrive.hpp index 3c6bf5b8f..31ab1934e 100644 --- a/Components/DiskII/MacintoshDoubleDensityDrive.hpp +++ b/Components/DiskII/MacintoshDoubleDensityDrive.hpp @@ -11,8 +11,7 @@ #include "IWM.hpp" -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { class DoubleDensityDrive: public IWMDrive { public: @@ -47,7 +46,6 @@ class DoubleDensityDrive: public IWMDrive { int step_direction_ = 1; }; -} } #endif /* MacintoshDoubleDensityDrive_hpp */ diff --git a/Components/OPx/Implementation/EnvelopeGenerator.hpp b/Components/OPx/Implementation/EnvelopeGenerator.hpp index 3d7b80c19..06c7f2eb6 100644 --- a/Components/OPx/Implementation/EnvelopeGenerator.hpp +++ b/Components/OPx/Implementation/EnvelopeGenerator.hpp @@ -13,8 +13,7 @@ #include #include "LowFrequencyOscillator.hpp" -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { /*! Models an OPL-style envelope generator. @@ -258,7 +257,6 @@ template class EnvelopeGenerator } }; -} } #endif /* EnvelopeGenerator_h */ diff --git a/Components/OPx/Implementation/KeyLevelScaler.hpp b/Components/OPx/Implementation/KeyLevelScaler.hpp index a86995bdf..e1dbc66fc 100644 --- a/Components/OPx/Implementation/KeyLevelScaler.hpp +++ b/Components/OPx/Implementation/KeyLevelScaler.hpp @@ -9,8 +9,7 @@ #ifndef KeyLevelScaler_h #define KeyLevelScaler_h -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { template class KeyLevelScaler { public: @@ -51,8 +50,6 @@ template class KeyLevelScaler { int shift_ = 0; }; - -} } #endif /* KeyLevelScaler_h */ diff --git a/Components/OPx/Implementation/LowFrequencyOscillator.hpp b/Components/OPx/Implementation/LowFrequencyOscillator.hpp index a3d852e67..5c53eac29 100644 --- a/Components/OPx/Implementation/LowFrequencyOscillator.hpp +++ b/Components/OPx/Implementation/LowFrequencyOscillator.hpp @@ -11,8 +11,7 @@ #include "../../../Numeric/LFSR.hpp" -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { /*! Models the output of the OPL low-frequency oscillator, which provides a couple of optional fixed-frequency @@ -62,7 +61,6 @@ class LowFrequencyOscillator { Numeric::LFSR noise_source_; }; -} } #endif /* LowFrequencyOscillator_hpp */ diff --git a/Components/OPx/Implementation/OPLBase.hpp b/Components/OPx/Implementation/OPLBase.hpp index 8183d4287..7ed6ca775 100644 --- a/Components/OPx/Implementation/OPLBase.hpp +++ b/Components/OPx/Implementation/OPLBase.hpp @@ -12,8 +12,7 @@ #include "../../../Outputs/Speaker/Implementation/SampleSource.hpp" #include "../../../Concurrency/AsyncTaskQueue.hpp" -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { template class OPLBase: public ::Outputs::Speaker::SampleSource { public: @@ -34,7 +33,6 @@ template class OPLBase: public ::Outputs::Speaker::SampleSource uint8_t selected_register_ = 0; }; -} } #endif /* OPLBase_h */ diff --git a/Components/OPx/Implementation/PhaseGenerator.hpp b/Components/OPx/Implementation/PhaseGenerator.hpp index 89ca27ebd..b5cb3ff73 100644 --- a/Components/OPx/Implementation/PhaseGenerator.hpp +++ b/Components/OPx/Implementation/PhaseGenerator.hpp @@ -13,8 +13,7 @@ #include "LowFrequencyOscillator.hpp" #include "Tables.hpp" -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { /*! Models an OPL-style phase generator of templated precision; having been told its period ('f-num'), octave ('block') and @@ -119,7 +118,6 @@ template class PhaseGenerator { int enable_vibrato_ = 0; }; -} } #endif /* PhaseGenerator_h */ diff --git a/Components/OPx/Implementation/Tables.hpp b/Components/OPx/Implementation/Tables.hpp index d50f2c391..242144ee7 100644 --- a/Components/OPx/Implementation/Tables.hpp +++ b/Components/OPx/Implementation/Tables.hpp @@ -9,8 +9,7 @@ #ifndef Tables_hpp #define Tables_hpp -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { /* These are the OPL's built-in log-sin and exponentiation tables, as recovered by @@ -221,7 +220,6 @@ inline int LogSign::level(int fractional) const { return power_two(*this, fractional); } -} } #endif /* Tables_hpp */ diff --git a/Components/OPx/Implementation/WaveformGenerator.hpp b/Components/OPx/Implementation/WaveformGenerator.hpp index 381fe7eea..f325b1012 100644 --- a/Components/OPx/Implementation/WaveformGenerator.hpp +++ b/Components/OPx/Implementation/WaveformGenerator.hpp @@ -12,8 +12,7 @@ #include "Tables.hpp" #include "LowFrequencyOscillator.hpp" -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { enum class Waveform { Sine, HalfSine, AbsSine, PulseSine @@ -86,7 +85,6 @@ template class WaveformGenerator { } }; -} } #endif /* WaveformGenerator_h */ diff --git a/Components/OPx/OPLL.hpp b/Components/OPx/OPLL.hpp index 530d84e77..5341f40ca 100644 --- a/Components/OPx/OPLL.hpp +++ b/Components/OPx/OPLL.hpp @@ -18,8 +18,7 @@ #include -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { class OPLL: public OPLBase { public: @@ -125,7 +124,6 @@ class OPLL: public OPLBase { const uint8_t *instrument_definition(int instrument, int channel); }; -} } #endif /* OPLL_hpp */ diff --git a/Components/RP5C01/RP5C01.hpp b/Components/RP5C01/RP5C01.hpp index ba7e5fe71..5b6914d98 100644 --- a/Components/RP5C01/RP5C01.hpp +++ b/Components/RP5C01/RP5C01.hpp @@ -14,8 +14,7 @@ #include #include -namespace Ricoh { -namespace RP5C01 { +namespace Ricoh::RP5C01 { class RP5C01 { public: @@ -56,8 +55,5 @@ class RP5C01 { }; } -} - -#include #endif /* RP5C01_hpp */ diff --git a/InstructionSets/6809/OperationMapper.hpp b/InstructionSets/6809/OperationMapper.hpp index 8c6fafd45..478c12d84 100644 --- a/InstructionSets/6809/OperationMapper.hpp +++ b/InstructionSets/6809/OperationMapper.hpp @@ -14,8 +14,7 @@ // Subject to corrections: // // * CWAI and the pushes and pulls at 0x3x are immediate, not inherent. -namespace InstructionSet { -namespace M6809 { +namespace InstructionSet::M6809 { enum class AddressingMode { Illegal, @@ -239,7 +238,6 @@ template void OperationMapper::dispatc } } -} } #endif /* InstructionSets_M6809_OperationMapper_hpp */ diff --git a/InstructionSets/AccessType.hpp b/InstructionSets/AccessType.hpp index 196bfc44b..4b5635542 100644 --- a/InstructionSets/AccessType.hpp +++ b/InstructionSets/AccessType.hpp @@ -20,5 +20,4 @@ enum class AccessType { } - #endif /* AccessType_h */ diff --git a/InstructionSets/M50740/Decoder.hpp b/InstructionSets/M50740/Decoder.hpp index 4f3f3d5b2..409d5f535 100644 --- a/InstructionSets/M50740/Decoder.hpp +++ b/InstructionSets/M50740/Decoder.hpp @@ -14,8 +14,7 @@ #include #include -namespace InstructionSet { -namespace M50740 { +namespace InstructionSet::M50740 { class Decoder { public: @@ -33,7 +32,6 @@ class Decoder { Instruction instr_; }; -} } #endif /* InstructionSets_M50740_Decoder_hpp */ diff --git a/InstructionSets/M50740/Executor.hpp b/InstructionSets/M50740/Executor.hpp index 28c83e43d..6ab8bcf55 100644 --- a/InstructionSets/M50740/Executor.hpp +++ b/InstructionSets/M50740/Executor.hpp @@ -18,8 +18,7 @@ #include #include -namespace InstructionSet { -namespace M50740 { +namespace InstructionSet::M50740 { class Executor; using CachingExecutor = CachingExecutor; @@ -174,7 +173,6 @@ class Executor: public CachingExecutor { inline void subtract_duration(int duration); }; -} } #endif /* Executor_h */ diff --git a/InstructionSets/M50740/Instruction.hpp b/InstructionSets/M50740/Instruction.hpp index deafa692f..057a79640 100644 --- a/InstructionSets/M50740/Instruction.hpp +++ b/InstructionSets/M50740/Instruction.hpp @@ -15,8 +15,7 @@ #include #include "../AccessType.hpp" -namespace InstructionSet { -namespace M50740 { +namespace InstructionSet::M50740 { enum class AddressingMode { Implied, Accumulator, Immediate, @@ -236,7 +235,5 @@ inline std::ostream &operator <<(std::ostream &stream, const Instruction &instru } } -} - #endif /* InstructionSets_M50740_Instruction_h */ diff --git a/InstructionSets/M50740/Parser.hpp b/InstructionSets/M50740/Parser.hpp index 9c9937921..dc739048a 100644 --- a/InstructionSets/M50740/Parser.hpp +++ b/InstructionSets/M50740/Parser.hpp @@ -13,8 +13,7 @@ #include "Decoder.hpp" #include "../AccessType.hpp" -namespace InstructionSet { -namespace M50740 { +namespace InstructionSet::M50740 { template struct Parser { void parse(Target &target, const uint8_t *storage, uint16_t start, uint16_t closing_bound) { @@ -119,7 +118,6 @@ template struct Parser { } }; -} } #endif /* InstructionSets_M50740_Parser_hpp */ diff --git a/InstructionSets/M68k/Decoder.hpp b/InstructionSets/M68k/Decoder.hpp index d54cdabfd..2f4413df8 100644 --- a/InstructionSets/M68k/Decoder.hpp +++ b/InstructionSets/M68k/Decoder.hpp @@ -13,8 +13,7 @@ #include "Model.hpp" #include "../../Numeric/Sizes.hpp" -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { /*! A stateless decoder that can map from instruction words to preinstructions @@ -115,7 +114,6 @@ template class Predecoder { static constexpr Operation operation(OpT op); }; -} } #endif /* InstructionSets_M68k_Decoder_hpp */ diff --git a/InstructionSets/M68k/ExceptionVectors.hpp b/InstructionSets/M68k/ExceptionVectors.hpp index e56c71efb..99bab495a 100644 --- a/InstructionSets/M68k/ExceptionVectors.hpp +++ b/InstructionSets/M68k/ExceptionVectors.hpp @@ -9,8 +9,7 @@ #ifndef InstructionSets_M68k_ExceptionVectors_hpp #define InstructionSets_M68k_ExceptionVectors_hpp -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { enum Exception { InitialStackPointer = 0, @@ -44,7 +43,6 @@ enum Exception { MMUAccessLevelViolationError = 58, }; -} } #endif /* InstructionSets_M68k_ExceptionVectors_hpp */ diff --git a/InstructionSets/M68k/Executor.hpp b/InstructionSets/M68k/Executor.hpp index 7d86d8bfe..5c2737bd7 100644 --- a/InstructionSets/M68k/Executor.hpp +++ b/InstructionSets/M68k/Executor.hpp @@ -16,8 +16,7 @@ #include "RegisterSet.hpp" #include "Status.hpp" -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { /// Maps the 68k function codes such that bits 0, 1 and 2 represent /// FC0, FC1 and FC2 respectively. @@ -163,7 +162,6 @@ template class Executor { } state_; }; -} } #include "Implementation/ExecutorImplementation.hpp" diff --git a/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp b/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp index 608f62161..b064237aa 100644 --- a/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp +++ b/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp @@ -15,8 +15,7 @@ #include -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { #define An(x) state_.registers[8 + x] #define Dn(x) state_.registers[x] @@ -749,7 +748,6 @@ void Executor::State::movem_toR(Preinstruction instruction, u #undef An #undef AccessException -} } #endif /* InstructionSets_M68k_ExecutorImplementation_hpp */ diff --git a/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp b/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp index e78aca928..8e6630ef3 100644 --- a/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp +++ b/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp @@ -9,8 +9,7 @@ #ifndef InstructionSets_68k_InstructionOperandFlags_hpp #define InstructionSets_68k_InstructionOperandFlags_hpp -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { template constexpr uint8_t operand_flags(Operation r_operation) { switch((t_operation != Operation::Undefined) ? t_operation : r_operation) { @@ -168,7 +167,6 @@ template constexpr uint8_t operand_flags(Op } } -} } #endif /* InstructionSets_68k_InstructionOperandFlags_hpp */ diff --git a/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp b/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp index 44e07011e..3d6308dbc 100644 --- a/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp +++ b/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp @@ -9,8 +9,7 @@ #ifndef InstructionSets_68k_InstructionOperandSize_hpp #define InstructionSets_68k_InstructionOperandSize_hpp -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { template constexpr DataSize operand_size(Operation r_operation) { @@ -128,7 +127,6 @@ constexpr DataSize operand_size(Operation r_operation) { } } -} } #endif /* InstructionSets_68k_InstructionOperandSize_hpp */ diff --git a/InstructionSets/M68k/Implementation/PerformImplementation.hpp b/InstructionSets/M68k/Implementation/PerformImplementation.hpp index 2291ef6b1..51c2fc81c 100644 --- a/InstructionSets/M68k/Implementation/PerformImplementation.hpp +++ b/InstructionSets/M68k/Implementation/PerformImplementation.hpp @@ -15,8 +15,7 @@ #include #include -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { /// Sign-extend @c x to 32 bits and return as an unsigned 32-bit int. inline uint32_t u_extend16(uint16_t x) { return uint32_t(int16_t(x)); } @@ -1030,7 +1029,6 @@ template < } -} } #endif /* InstructionSets_M68k_PerformImplementation_h */ diff --git a/InstructionSets/M68k/Instruction.hpp b/InstructionSets/M68k/Instruction.hpp index b7b7ce0ac..5251cf5af 100644 --- a/InstructionSets/M68k/Instruction.hpp +++ b/InstructionSets/M68k/Instruction.hpp @@ -15,8 +15,7 @@ #include #include -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { enum class Operation: uint8_t { Undefined, @@ -494,7 +493,6 @@ class Preinstruction { const char *operation_string() const; }; -} } #include "Implementation/InstructionOperandSize.hpp" diff --git a/InstructionSets/M68k/Model.hpp b/InstructionSets/M68k/Model.hpp index 3de18d405..65572331c 100644 --- a/InstructionSets/M68k/Model.hpp +++ b/InstructionSets/M68k/Model.hpp @@ -9,8 +9,7 @@ #ifndef InstructionSets_M68k_Model_hpp #define InstructionSets_M68k_Model_hpp -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { enum class Model { M68000, @@ -20,7 +19,6 @@ enum class Model { M68040, }; -} } #endif /* InstructionSets_M68k_Model_hpp */ diff --git a/InstructionSets/M68k/Perform.hpp b/InstructionSets/M68k/Perform.hpp index 300706b00..7bba658b3 100644 --- a/InstructionSets/M68k/Perform.hpp +++ b/InstructionSets/M68k/Perform.hpp @@ -14,8 +14,7 @@ #include "Status.hpp" #include "../../Numeric/RegisterSizes.hpp" -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { struct NullFlowController { // @@ -167,7 +166,6 @@ template < Operation operation = Operation::Undefined > void perform(Preinstruction instruction, CPU::RegisterPair32 &source, CPU::RegisterPair32 &dest, Status &status, FlowController &flow_controller); -} } #include "Implementation/PerformImplementation.hpp" diff --git a/InstructionSets/M68k/RegisterSet.hpp b/InstructionSets/M68k/RegisterSet.hpp index 87e98f70b..ee2a66f3b 100644 --- a/InstructionSets/M68k/RegisterSet.hpp +++ b/InstructionSets/M68k/RegisterSet.hpp @@ -9,8 +9,7 @@ #ifndef InstructionSets_M68k_RegisterSet_h #define InstructionSets_M68k_RegisterSet_h -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { struct RegisterSet { uint32_t data[8], address[7]; @@ -25,7 +24,6 @@ struct RegisterSet { } }; -} } #endif /* InstructionSets_M68k_RegisterSet_h */ diff --git a/InstructionSets/M68k/Status.hpp b/InstructionSets/M68k/Status.hpp index 22f15c52d..404eefb24 100644 --- a/InstructionSets/M68k/Status.hpp +++ b/InstructionSets/M68k/Status.hpp @@ -11,8 +11,7 @@ #include "Instruction.hpp" -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { namespace ConditionCode { @@ -159,7 +158,6 @@ struct Status { } }; -} } #endif /* InstructionSets_M68k_Status_h */ diff --git a/InstructionSets/PowerPC/Decoder.hpp b/InstructionSets/PowerPC/Decoder.hpp index ac763217e..9f2cb6e1d 100644 --- a/InstructionSets/PowerPC/Decoder.hpp +++ b/InstructionSets/PowerPC/Decoder.hpp @@ -11,8 +11,7 @@ #include "Instruction.hpp" -namespace InstructionSet { -namespace PowerPC { +namespace InstructionSet::PowerPC { enum class Model { /// i.e. 32-bit, with POWER carry-over instructions. @@ -50,7 +49,6 @@ template struct Decoder { Instruction decode(uint32_t opcode); }; -} } #endif /* InstructionSets_PowerPC_Decoder_hpp */ diff --git a/InstructionSets/PowerPC/Instruction.hpp b/InstructionSets/PowerPC/Instruction.hpp index 07d9b0175..9348ea08b 100644 --- a/InstructionSets/PowerPC/Instruction.hpp +++ b/InstructionSets/PowerPC/Instruction.hpp @@ -11,8 +11,7 @@ #include -namespace InstructionSet { -namespace PowerPC { +namespace InstructionSet::PowerPC { enum class CacheLine: uint32_t { Instruction = 0b01100, @@ -1530,7 +1529,6 @@ struct Instruction { // Sanity check on Instruction size. static_assert(sizeof(Instruction) <= 8); -} } #endif /* InstructionSets_PowerPC_Instruction_h */ diff --git a/InstructionSets/x86/DataPointerResolver.hpp b/InstructionSets/x86/DataPointerResolver.hpp index 2a2197a25..df7aa53db 100644 --- a/InstructionSets/x86/DataPointerResolver.hpp +++ b/InstructionSets/x86/DataPointerResolver.hpp @@ -14,8 +14,7 @@ #include -namespace InstructionSet { -namespace x86 { +namespace InstructionSet::x86 { /// Unlike source, describes only registers, and breaks /// them down by conventional name — so AL, AH, AX and EAX are all @@ -314,7 +313,6 @@ template void DataPointerResolver #include -namespace InstructionSet { -namespace x86 { +namespace InstructionSet::x86 { /*! Implements Intel x86 instruction decoding. @@ -227,7 +226,6 @@ template class Decoder { } }; -} } #endif /* InstructionSets_x86_Decoder_hpp */ diff --git a/InstructionSets/x86/Instruction.hpp b/InstructionSets/x86/Instruction.hpp index d34acb44c..a3172f911 100644 --- a/InstructionSets/x86/Instruction.hpp +++ b/InstructionSets/x86/Instruction.hpp @@ -13,8 +13,7 @@ #include #include -namespace InstructionSet { -namespace x86 { +namespace InstructionSet::x86 { /* Operations are documented below to establish expectations as to which @@ -796,7 +795,6 @@ template class Instruction { static_assert(sizeof(Instruction) <= 16); static_assert(sizeof(Instruction) <= 10); -} } #endif /* InstructionSets_x86_Instruction_h */ diff --git a/InstructionSets/x86/Model.hpp b/InstructionSets/x86/Model.hpp index 304214475..4a4ac0bdb 100644 --- a/InstructionSets/x86/Model.hpp +++ b/InstructionSets/x86/Model.hpp @@ -9,8 +9,7 @@ #ifndef Model_h #define Model_h -namespace InstructionSet { -namespace x86 { +namespace InstructionSet::x86 { enum class Model { i8086, @@ -21,7 +20,6 @@ enum class Model { static constexpr bool is_32bit(Model model) { return model >= Model::i80386; } -} } #endif /* Model_h */ diff --git a/Machines/Amiga/Amiga.cpp b/Machines/Amiga/Amiga.cpp index 370217d7c..5ad0a7bca 100644 --- a/Machines/Amiga/Amiga.cpp +++ b/Machines/Amiga/Amiga.cpp @@ -11,7 +11,7 @@ #include "../../Activity/Source.hpp" #include "../MachineTypes.hpp" -#include "../../Processors/68000Mk2/68000Mk2.hpp" +#include "../../Processors/68000/68000.hpp" #include "../../Analyser/Static/Amiga/Target.hpp" @@ -41,7 +41,7 @@ namespace Amiga { class ConcreteMachine: public Activity::Source, - public CPU::MC68000Mk2::BusHandler, + public CPU::MC68000::BusHandler, public MachineTypes::AudioProducer, public MachineTypes::JoystickMachine, public MachineTypes::MappedKeyboardMachine, @@ -177,7 +177,7 @@ class ConcreteMachine: } private: - CPU::MC68000Mk2::Processor mc68000_; + CPU::MC68000::Processor mc68000_; // MARK: - Memory map. diff --git a/Machines/Amiga/Chipset.cpp b/Machines/Amiga/Chipset.cpp index 8f1c23f25..5766c9b2c 100644 --- a/Machines/Amiga/Chipset.cpp +++ b/Machines/Amiga/Chipset.cpp @@ -841,8 +841,8 @@ void Chipset::update_interrupts() { } } -void Chipset::perform(const CPU::MC68000Mk2::Microcycle &cycle) { - using Microcycle = CPU::MC68000Mk2::Microcycle; +void Chipset::perform(const CPU::MC68000::Microcycle &cycle) { + using Microcycle = CPU::MC68000::Microcycle; const uint32_t register_address = *cycle.address & ChipsetAddressMask; if(cycle.operation & Microcycle::Read) { diff --git a/Machines/Amiga/Chipset.hpp b/Machines/Amiga/Chipset.hpp index 9957f0328..5b3ac8b10 100644 --- a/Machines/Amiga/Chipset.hpp +++ b/Machines/Amiga/Chipset.hpp @@ -20,7 +20,7 @@ #include "../../ClockReceiver/JustInTime.hpp" #include "../../Components/6526/6526.hpp" #include "../../Outputs/CRT/CRT.hpp" -#include "../../Processors/68000Mk2/68000Mk2.hpp" +#include "../../Processors/68000/68000.hpp" #include "../../Storage/Disk/Controller/DiskController.hpp" #include "../../Storage/Disk/Drive.hpp" @@ -58,7 +58,7 @@ class Chipset: private ClockingHint::Observer { Changes run_until_after_cpu_slot(); /// Performs the provided microcycle, which the caller guarantees to be a memory access. - void perform(const CPU::MC68000Mk2::Microcycle &); + void perform(const CPU::MC68000::Microcycle &); /// Sets the current state of the CIA interrupt lines. void set_cia_interrupts(bool cia_a, bool cia_b); diff --git a/Machines/Amiga/MemoryMap.hpp b/Machines/Amiga/MemoryMap.hpp index fbe920027..9e6c8fdf1 100644 --- a/Machines/Amiga/MemoryMap.hpp +++ b/Machines/Amiga/MemoryMap.hpp @@ -19,8 +19,8 @@ namespace Amiga { class MemoryMap { private: - static constexpr auto PermitRead = CPU::MC68000Mk2::Microcycle::PermitRead; - static constexpr auto PermitWrite = CPU::MC68000Mk2::Microcycle::PermitWrite; + static constexpr auto PermitRead = CPU::MC68000::Microcycle::PermitRead; + static constexpr auto PermitWrite = CPU::MC68000::Microcycle::PermitWrite; static constexpr auto PermitReadWrite = PermitRead | PermitWrite; public: @@ -109,12 +109,12 @@ class MemoryMap { /// Performs the provided microcycle, which the caller guarantees to be a memory access, /// and in the Zorro register range. - bool perform(const CPU::MC68000Mk2::Microcycle &cycle) { + bool perform(const CPU::MC68000::Microcycle &cycle) { if(!fast_autoconf_visible_) return false; const uint32_t register_address = *cycle.address & 0xfe; - using Microcycle = CPU::MC68000Mk2::Microcycle; + using Microcycle = CPU::MC68000::Microcycle; if(cycle.operation & Microcycle::Read) { // Re: Autoconf: // diff --git a/Machines/AmstradCPC/AmstradCPC.cpp b/Machines/AmstradCPC/AmstradCPC.cpp index bcffa6f3c..d720303db 100644 --- a/Machines/AmstradCPC/AmstradCPC.cpp +++ b/Machines/AmstradCPC/AmstradCPC.cpp @@ -905,7 +905,7 @@ template class ConcreteMachine: // first bit of this byte. parser.process_pulse(tape_player_.get_current_pulse()); const auto byte = parser.get_byte(tape_player_.get_tape()); - auto flags = z80_.get_value_of_register(CPU::Z80::Register::Flags); + auto flags = z80_.value_of(CPU::Z80::Register::Flags); if(byte) { // In A ROM-esque fashion, begin the first pulse after the final one @@ -927,14 +927,14 @@ template class ConcreteMachine: write_pointers_[(tape_crc_address+1) >> 14][(tape_crc_address+1) & 16383] = uint8_t(crc_value >> 8); // Indicate successful byte read. - z80_.set_value_of_register(CPU::Z80::Register::A, *byte); + z80_.set_value_of(CPU::Z80::Register::A, *byte); flags |= CPU::Z80::Flag::Carry; } else { // TODO: return tape player to previous state and decline to serve. - z80_.set_value_of_register(CPU::Z80::Register::A, 0); + z80_.set_value_of(CPU::Z80::Register::A, 0); flags &= ~CPU::Z80::Flag::Carry; } - z80_.set_value_of_register(CPU::Z80::Register::Flags, flags); + z80_.set_value_of(CPU::Z80::Register::Flags, flags); // RET. *cycle.value = 0xc9; diff --git a/Machines/Apple/ADB/Bus.hpp b/Machines/Apple/ADB/Bus.hpp index a39f530ef..a6d35099f 100644 --- a/Machines/Apple/ADB/Bus.hpp +++ b/Machines/Apple/ADB/Bus.hpp @@ -16,8 +16,7 @@ #include #include -namespace Apple { -namespace ADB { +namespace Apple::ADB { struct Command { enum class Type { @@ -166,7 +165,6 @@ class Bus { } phase_ = Phase::AttentionCapture; }; -} } #endif /* Bus_hpp */ diff --git a/Machines/Apple/ADB/Keyboard.hpp b/Machines/Apple/ADB/Keyboard.hpp index a8213dd28..7438f6bc6 100644 --- a/Machines/Apple/ADB/Keyboard.hpp +++ b/Machines/Apple/ADB/Keyboard.hpp @@ -18,8 +18,7 @@ #include #include -namespace Apple { -namespace ADB { +namespace Apple::ADB { /*! Defines the keycodes that could be passed directly via set_key_pressed; these @@ -119,7 +118,6 @@ class KeyboardMapper: public MachineTypes::MappedKeyboardMachine::KeyboardMapper uint16_t mapped_key_for_key(Inputs::Keyboard::Key key) const final; }; -} } #endif /* Keyboard_hpp */ diff --git a/Machines/Apple/ADB/Mouse.hpp b/Machines/Apple/ADB/Mouse.hpp index 3e8a4dc1f..a085089e4 100644 --- a/Machines/Apple/ADB/Mouse.hpp +++ b/Machines/Apple/ADB/Mouse.hpp @@ -12,8 +12,7 @@ #include "ReactiveDevice.hpp" #include "../../../Inputs/Mouse.hpp" -namespace Apple { -namespace ADB { +namespace Apple::ADB { class Mouse: public ReactiveDevice, public Inputs::Mouse { public: @@ -32,7 +31,6 @@ class Mouse: public ReactiveDevice, public Inputs::Mouse { uint16_t last_posted_reg0_ = 0; }; -} } #endif /* Mouse_hpp */ diff --git a/Machines/Apple/ADB/ReactiveDevice.hpp b/Machines/Apple/ADB/ReactiveDevice.hpp index 54a3ad53c..215a2123c 100644 --- a/Machines/Apple/ADB/ReactiveDevice.hpp +++ b/Machines/Apple/ADB/ReactiveDevice.hpp @@ -15,8 +15,7 @@ #include #include -namespace Apple { -namespace ADB { +namespace Apple::ADB { class ReactiveDevice: public Bus::Device { protected: @@ -60,7 +59,6 @@ class ReactiveDevice: public Bus::Device { void reset(); }; -} } #endif /* ReactiveDevice_hpp */ diff --git a/Machines/Apple/AppleII/AppleII.hpp b/Machines/Apple/AppleII/AppleII.hpp index 97d348578..2e8733ce4 100644 --- a/Machines/Apple/AppleII/AppleII.hpp +++ b/Machines/Apple/AppleII/AppleII.hpp @@ -16,8 +16,7 @@ #include -namespace Apple { -namespace II { +namespace Apple::II { class Machine { public: @@ -42,7 +41,6 @@ class Machine { }; }; -} } #endif /* AppleII_hpp */ diff --git a/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp b/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp index 389083b95..3c12a5e00 100644 --- a/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp +++ b/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp @@ -11,8 +11,7 @@ #include "MemorySwitches.hpp" -namespace Apple { -namespace II { +namespace Apple::II { /*! Models the auxiliary memory soft switches, added as of the Apple IIe, which allow access to the auxiliary 64kb of RAM and to @@ -271,7 +270,6 @@ template class AuxiliaryMemorySwitches { } }; -} } #endif /* AuxiliaryMemorySwitches_h */ diff --git a/Machines/Apple/AppleII/Card.hpp b/Machines/Apple/AppleII/Card.hpp index 60c3bd519..64f0e9c78 100644 --- a/Machines/Apple/AppleII/Card.hpp +++ b/Machines/Apple/AppleII/Card.hpp @@ -13,8 +13,7 @@ #include "../../../ClockReceiver/ClockReceiver.hpp" #include "../../../Activity/Observer.hpp" -namespace Apple { -namespace II { +namespace Apple::II { /*! This provides a small subset of the interface offered to cards installed in @@ -112,7 +111,6 @@ class Card { } }; -} } #endif /* Card_h */ diff --git a/Machines/Apple/AppleII/DiskIICard.hpp b/Machines/Apple/AppleII/DiskIICard.hpp index 979d31b07..0d3803ba5 100644 --- a/Machines/Apple/AppleII/DiskIICard.hpp +++ b/Machines/Apple/AppleII/DiskIICard.hpp @@ -20,8 +20,7 @@ #include #include -namespace Apple { -namespace II { +namespace Apple::II { class DiskIICard: public Card, public ClockingHint::Observer { public: @@ -43,7 +42,6 @@ class DiskIICard: public Card, public ClockingHint::Observer { ClockingHint::Preference diskii_clocking_preference_ = ClockingHint::Preference::RealTime; }; -} } #endif /* DiskIICard_hpp */ diff --git a/Machines/Apple/AppleII/Joystick.hpp b/Machines/Apple/AppleII/Joystick.hpp index 33f943c54..d76e02f99 100644 --- a/Machines/Apple/AppleII/Joystick.hpp +++ b/Machines/Apple/AppleII/Joystick.hpp @@ -14,8 +14,7 @@ #include #include -namespace Apple { -namespace II { +namespace Apple::II { class JoystickPair { public: @@ -106,7 +105,6 @@ class JoystickPair { } }; -} } #endif /* AppleII_Joystick_hpp */ diff --git a/Machines/Apple/AppleII/LanguageCardSwitches.hpp b/Machines/Apple/AppleII/LanguageCardSwitches.hpp index 873260a36..5efddf526 100644 --- a/Machines/Apple/AppleII/LanguageCardSwitches.hpp +++ b/Machines/Apple/AppleII/LanguageCardSwitches.hpp @@ -11,8 +11,7 @@ #include "MemorySwitches.hpp" -namespace Apple { -namespace II { +namespace Apple::II { /*! Models the language card soft switches, present on any Apple II with a language card and provided built-in from the IIe onwards. @@ -112,7 +111,6 @@ template class LanguageCardSwitches { bool pre_write_ = false; }; -} } #endif /* LanguageCard_h */ diff --git a/Machines/Apple/AppleII/MemorySwitches.hpp b/Machines/Apple/AppleII/MemorySwitches.hpp index c71bd4c1e..5be77517a 100644 --- a/Machines/Apple/AppleII/MemorySwitches.hpp +++ b/Machines/Apple/AppleII/MemorySwitches.hpp @@ -9,8 +9,7 @@ #ifndef MemorySwitches_h #define MemorySwitches_h -namespace Apple { -namespace II { +namespace Apple::II { enum PagingType: int { Main = 1 << 0, @@ -19,7 +18,6 @@ enum PagingType: int { LanguageCard = 1 << 3, }; -} } #endif /* MemorySwitches_h */ diff --git a/Machines/Apple/AppleII/SCSICard.hpp b/Machines/Apple/AppleII/SCSICard.hpp index 0859730b1..d12d12918 100644 --- a/Machines/Apple/AppleII/SCSICard.hpp +++ b/Machines/Apple/AppleII/SCSICard.hpp @@ -21,8 +21,7 @@ #include #include -namespace Apple { -namespace II { +namespace Apple::II { class SCSICard: public Card { public: @@ -51,7 +50,6 @@ class SCSICard: public Card { SCSI::Target::Target storage_; }; -} } #endif /* SCSICard_hpp */ diff --git a/Machines/Apple/AppleII/Video.hpp b/Machines/Apple/AppleII/Video.hpp index 1e66d1cc2..1e84d2c04 100644 --- a/Machines/Apple/AppleII/Video.hpp +++ b/Machines/Apple/AppleII/Video.hpp @@ -18,9 +18,7 @@ #include #include -namespace Apple { -namespace II { -namespace Video { +namespace Apple::II::Video { class BusHandler { public: @@ -439,8 +437,6 @@ template class Video: public VideoBase { BusHandler &bus_handler_; }; -} -} } #endif /* Apple_II_Video_hpp */ diff --git a/Machines/Apple/AppleII/VideoSwitches.hpp b/Machines/Apple/AppleII/VideoSwitches.hpp index 7852516f4..dd4845e2e 100644 --- a/Machines/Apple/AppleII/VideoSwitches.hpp +++ b/Machines/Apple/AppleII/VideoSwitches.hpp @@ -13,8 +13,7 @@ #include "../../../ClockReceiver/DeferredQueue.hpp" #include "../../ROMMachine.hpp" -namespace Apple { -namespace II { +namespace Apple::II { // Enumerates all Apple II and IIe display modes. enum class GraphicsMode { @@ -341,7 +340,6 @@ template class VideoSwitches { std::vector character_rom_; }; -} } #endif /* VideoSwitches_h */ diff --git a/Machines/Apple/AppleIIgs/ADB.hpp b/Machines/Apple/AppleIIgs/ADB.hpp index a57594335..fb055da26 100644 --- a/Machines/Apple/AppleIIgs/ADB.hpp +++ b/Machines/Apple/AppleIIgs/ADB.hpp @@ -17,9 +17,7 @@ #include "../ADB/Mouse.hpp" #include "../ADB/Keyboard.hpp" -namespace Apple { -namespace IIgs { -namespace ADB { +namespace Apple::IIgs::ADB { class GLU: public InstructionSet::M50740::PortHandler { public: @@ -85,8 +83,6 @@ class GLU: public InstructionSet::M50740::PortHandler { Apple::ADB::Keyboard keyboard_; }; -} -} } #endif /* Apple_IIgs_ADB_hpp */ diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.cpp b/Machines/Apple/AppleIIgs/AppleIIgs.cpp index 5bc2a1afe..a2af523aa 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.cpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.cpp @@ -395,13 +395,13 @@ class ConcreteMachine: // // printf("%06x a:%04x x:%04x y:%04x s:%04x d:%04x b:%04x\n", // address, -// m65816_.get_value_of_register(CPU::WDC65816::Register::A), -// m65816_.get_value_of_register(CPU::WDC65816::Register::X), -// m65816_.get_value_of_register(CPU::WDC65816::Register::Y), -//// m65816_.get_value_of_register(CPU::WDC65816::Register::Flags), -// m65816_.get_value_of_register(CPU::WDC65816::Register::StackPointer), -// m65816_.get_value_of_register(CPU::WDC65816::Register::Direct), -// m65816_.get_value_of_register(CPU::WDC65816::Register::DataBank) +// m65816_.value_of(CPU::WDC65816::Register::A), +// m65816_.value_of(CPU::WDC65816::Register::X), +// m65816_.value_of(CPU::WDC65816::Register::Y), +//// m65816_.value_of(CPU::WDC65816::Register::Flags), +// m65816_.value_of(CPU::WDC65816::Register::StackPointer), +// m65816_.value_of(CPU::WDC65816::Register::Direct), +// m65816_.value_of(CPU::WDC65816::Register::DataBank) // ); // } @@ -1009,15 +1009,15 @@ class ConcreteMachine: printf("%06x %s %02x [%s]", address, isReadOperation(operation) ? "->" : "<-", *value, (is_1Mhz || (speed_register_ & motor_flags_)) ? "1.0" : "2.8"); if(operation == CPU::WDC65816::BusOperation::ReadOpcode) { printf(" a:%04x x:%04x y:%04x s:%04x e:%d p:%02x db:%02x pb:%02x d:%04x [tot:%llu]\n", - m65816_.get_value_of_register(CPU::WDC65816::Register::A), - m65816_.get_value_of_register(CPU::WDC65816::Register::X), - m65816_.get_value_of_register(CPU::WDC65816::Register::Y), - m65816_.get_value_of_register(CPU::WDC65816::Register::StackPointer), - m65816_.get_value_of_register(CPU::WDC65816::Register::EmulationFlag), - m65816_.get_value_of_register(CPU::WDC65816::Register::Flags), - m65816_.get_value_of_register(CPU::WDC65816::Register::DataBank), - m65816_.get_value_of_register(CPU::WDC65816::Register::ProgramBank), - m65816_.get_value_of_register(CPU::WDC65816::Register::Direct), + m65816_.value_of(CPU::WDC65816::Register::A), + m65816_.value_of(CPU::WDC65816::Register::X), + m65816_.value_of(CPU::WDC65816::Register::Y), + m65816_.value_of(CPU::WDC65816::Register::StackPointer), + m65816_.value_of(CPU::WDC65816::Register::EmulationFlag), + m65816_.value_of(CPU::WDC65816::Register::Flags), + m65816_.value_of(CPU::WDC65816::Register::DataBank), + m65816_.value_of(CPU::WDC65816::Register::ProgramBank), + m65816_.value_of(CPU::WDC65816::Register::Direct), static_cast(total) ); } else printf("\n"); diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.hpp b/Machines/Apple/AppleIIgs/AppleIIgs.hpp index f92bfd11c..1cd1a862a 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.hpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.hpp @@ -16,8 +16,7 @@ #include -namespace Apple { -namespace IIgs { +namespace Apple::IIgs { class Machine { public: @@ -27,7 +26,6 @@ class Machine { static Machine *AppleIIgs(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); }; -} } #endif /* Machines_Apple_AppleIIgs_hpp */ diff --git a/Machines/Apple/AppleIIgs/MemoryMap.hpp b/Machines/Apple/AppleIIgs/MemoryMap.hpp index f52b98dad..ff9ce110c 100644 --- a/Machines/Apple/AppleIIgs/MemoryMap.hpp +++ b/Machines/Apple/AppleIIgs/MemoryMap.hpp @@ -16,8 +16,7 @@ #include "../AppleII/LanguageCardSwitches.hpp" #include "../AppleII/AuxiliaryMemorySwitches.hpp" -namespace Apple { -namespace IIgs { +namespace Apple::IIgs { class MemoryMap { private: @@ -687,7 +686,6 @@ class MemoryMap { // // With a further twist: the modulo and pointer are indexed on ::IsShadowed to eliminate a branch even on that. -} } #endif /* MemoryMap_h */ diff --git a/Machines/Apple/AppleIIgs/Sound.hpp b/Machines/Apple/AppleIIgs/Sound.hpp index 942a94b7d..c9cba701e 100644 --- a/Machines/Apple/AppleIIgs/Sound.hpp +++ b/Machines/Apple/AppleIIgs/Sound.hpp @@ -15,9 +15,7 @@ #include "../../../Concurrency/AsyncTaskQueue.hpp" #include "../../../Outputs/Speaker/Implementation/SampleSource.hpp" -namespace Apple { -namespace IIgs { -namespace Sound { +namespace Apple::IIgs::Sound { class GLU: public Outputs::Speaker::SampleSource { public: @@ -104,8 +102,6 @@ class GLU: public Outputs::Speaker::SampleSource { int16_t output_range_ = 0; }; -} -} } #endif /* SoundGLU_hpp */ diff --git a/Machines/Apple/AppleIIgs/Video.hpp b/Machines/Apple/AppleIIgs/Video.hpp index d02e21d63..6d7ba977c 100644 --- a/Machines/Apple/AppleIIgs/Video.hpp +++ b/Machines/Apple/AppleIIgs/Video.hpp @@ -13,9 +13,7 @@ #include "../../../Outputs/CRT/CRT.hpp" #include "../../../ClockReceiver/ClockReceiver.hpp" -namespace Apple { -namespace IIgs { -namespace Video { +namespace Apple::IIgs::Video { /*! Provides IIgs video output; assumed clocking here is seven times the usual Apple II clock. @@ -205,8 +203,6 @@ class Video: public Apple::II::VideoSwitches { int megaii_frame_counter_ = 0; // To count up to quarter-second interrupts. }; -} -} } #endif /* Video_hpp */ diff --git a/Machines/Apple/Macintosh/Audio.hpp b/Machines/Apple/Macintosh/Audio.hpp index bdf0ebd40..457bec6b0 100644 --- a/Machines/Apple/Macintosh/Audio.hpp +++ b/Machines/Apple/Macintosh/Audio.hpp @@ -16,8 +16,7 @@ #include #include -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { /*! Implements the Macintosh's audio output hardware. @@ -83,7 +82,6 @@ class Audio: public ::Outputs::Speaker::SampleSource { void set_volume_multiplier(); }; -} } #endif /* Audio_hpp */ diff --git a/Machines/Apple/Macintosh/DeferredAudio.hpp b/Machines/Apple/Macintosh/DeferredAudio.hpp index 9277e1569..395632f14 100644 --- a/Machines/Apple/Macintosh/DeferredAudio.hpp +++ b/Machines/Apple/Macintosh/DeferredAudio.hpp @@ -12,8 +12,7 @@ #include "Audio.hpp" #include "../../../Outputs/Speaker/Implementation/LowpassSpeaker.hpp" -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { struct DeferredAudio { Concurrency::AsyncTaskQueue queue; @@ -28,7 +27,6 @@ struct DeferredAudio { } }; -} } #endif /* DeferredAudio_h */ diff --git a/Machines/Apple/Macintosh/DriveSpeedAccumulator.hpp b/Machines/Apple/Macintosh/DriveSpeedAccumulator.hpp index 45568e006..815e354f5 100644 --- a/Machines/Apple/Macintosh/DriveSpeedAccumulator.hpp +++ b/Machines/Apple/Macintosh/DriveSpeedAccumulator.hpp @@ -13,8 +13,7 @@ #include #include -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { class DriveSpeedAccumulator { public: @@ -40,7 +39,6 @@ class DriveSpeedAccumulator { Delegate *delegate_ = nullptr; }; -} } #endif /* DriveSpeedAccumulator_hpp */ diff --git a/Machines/Apple/Macintosh/Keyboard.hpp b/Machines/Apple/Macintosh/Keyboard.hpp index d69af1f56..9f77eb348 100644 --- a/Machines/Apple/Macintosh/Keyboard.hpp +++ b/Machines/Apple/Macintosh/Keyboard.hpp @@ -15,8 +15,7 @@ #include #include -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { constexpr uint16_t KeypadMask = 0x100; @@ -294,7 +293,6 @@ class KeyboardMapper: public MachineTypes::MappedKeyboardMachine::KeyboardMapper uint16_t mapped_key_for_key(Inputs::Keyboard::Key key) const final; }; -} } #endif /* Apple_Macintosh_Keyboard_hpp */ diff --git a/Machines/Apple/Macintosh/Macintosh.cpp b/Machines/Apple/Macintosh/Macintosh.cpp index 02378af24..d2f0dd11e 100644 --- a/Machines/Apple/Macintosh/Macintosh.cpp +++ b/Machines/Apple/Macintosh/Macintosh.cpp @@ -34,9 +34,8 @@ #include "../../../Components/AppleClock/AppleClock.hpp" #include "../../../Components/DiskII/IWM.hpp" #include "../../../Components/DiskII/MacintoshDoubleDensityDrive.hpp" -#include "../../../Processors/68000/68000.hpp" -#include "../../../Processors/68000Mk2/68000Mk2.hpp" +#include "../../../Processors/68000/68000.hpp" #include "../../../Storage/MassStorage/SCSI/SCSI.hpp" #include "../../../Storage/MassStorage/SCSI/DirectAccessDevice.hpp" @@ -74,7 +73,7 @@ template class ConcreteMachin public MachineTypes::MediaTarget, public MachineTypes::MouseMachine, public MachineTypes::MappedKeyboardMachine, - public CPU::MC68000Mk2::BusHandler, + public CPU::MC68000::BusHandler, public Zilog::SCC::z8530::Delegate, public Activity::Source, public Configurable::Device, @@ -192,7 +191,7 @@ template class ConcreteMachin mc68000_.run_for(cycles); } - using Microcycle = CPU::MC68000Mk2::Microcycle; + using Microcycle = CPU::MC68000::Microcycle; HalfCycles perform_bus_operation(const Microcycle &cycle, int) { // Advance time. @@ -748,7 +747,7 @@ template class ConcreteMachin Inputs::QuadratureMouse &mouse_; }; - CPU::MC68000Mk2::Processor mc68000_; + CPU::MC68000::Processor mc68000_; DriveSpeedAccumulator drive_speed_accumulator_; IWMActor iwm_; diff --git a/Machines/Apple/Macintosh/Macintosh.hpp b/Machines/Apple/Macintosh/Macintosh.hpp index 5c42b555f..167106ff7 100644 --- a/Machines/Apple/Macintosh/Macintosh.hpp +++ b/Machines/Apple/Macintosh/Macintosh.hpp @@ -14,8 +14,7 @@ #include "../../../Analyser/Static/StaticAnalyser.hpp" #include "../../ROMMachine.hpp" -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { class Machine { public: @@ -36,8 +35,6 @@ class Machine { }; }; - -} } #endif /* Macintosh_hpp */ diff --git a/Machines/Apple/Macintosh/Video.hpp b/Machines/Apple/Macintosh/Video.hpp index 4ade61a19..87aa4b61d 100644 --- a/Machines/Apple/Macintosh/Video.hpp +++ b/Machines/Apple/Macintosh/Video.hpp @@ -14,8 +14,7 @@ #include "DeferredAudio.hpp" #include "DriveSpeedAccumulator.hpp" -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { constexpr HalfCycles line_length(704); constexpr int number_of_lines = 370; @@ -102,7 +101,6 @@ class Video { bool use_alternate_audio_buffer_ = false; }; -} } #endif /* Video_hpp */ diff --git a/Machines/Atari/2600/Cartridges/ActivisionStack.hpp b/Machines/Atari/2600/Cartridges/ActivisionStack.hpp index 025a874b4..6fcc46712 100644 --- a/Machines/Atari/2600/Cartridges/ActivisionStack.hpp +++ b/Machines/Atari/2600/Cartridges/ActivisionStack.hpp @@ -9,8 +9,7 @@ #ifndef Atari2600_ActivisionStack_hpp #define Atari2600_ActivisionStack_hpp -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class ActivisionStack: public BusExtender { public: @@ -45,7 +44,6 @@ class ActivisionStack: public BusExtender { uint8_t last_opcode_; }; -} } #endif /* Atari2600_CartridgeActivisionStack_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Atari16k.hpp b/Machines/Atari/2600/Cartridges/Atari16k.hpp index a98ff72fd..b99381305 100644 --- a/Machines/Atari/2600/Cartridges/Atari16k.hpp +++ b/Machines/Atari/2600/Cartridges/Atari16k.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Atari16k: public BusExtender { public: @@ -60,7 +59,6 @@ class Atari16kSuperChip: public BusExtender { uint8_t ram_[128]; }; -} } #endif /* Atari2600_CartridgeAtari16k_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Atari32k.hpp b/Machines/Atari/2600/Cartridges/Atari32k.hpp index eff10e86d..dba8c9a7b 100644 --- a/Machines/Atari/2600/Cartridges/Atari32k.hpp +++ b/Machines/Atari/2600/Cartridges/Atari32k.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Atari32k: public BusExtender { public: @@ -56,7 +55,6 @@ class Atari32kSuperChip: public BusExtender { uint8_t ram_[128]; }; -} } #endif /* Atari2600_CartridgeAtari32k_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Atari8k.hpp b/Machines/Atari/2600/Cartridges/Atari8k.hpp index 9f57527f8..5fe346734 100644 --- a/Machines/Atari/2600/Cartridges/Atari8k.hpp +++ b/Machines/Atari/2600/Cartridges/Atari8k.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Atari8k: public BusExtender { public: @@ -58,7 +57,6 @@ class Atari8kSuperChip: public BusExtender { uint8_t ram_[128]; }; -} } #endif /* Atari2600_CartridgeAtari8k_hpp */ diff --git a/Machines/Atari/2600/Cartridges/CBSRAMPlus.hpp b/Machines/Atari/2600/Cartridges/CBSRAMPlus.hpp index e10a5f287..4c064f3ef 100644 --- a/Machines/Atari/2600/Cartridges/CBSRAMPlus.hpp +++ b/Machines/Atari/2600/Cartridges/CBSRAMPlus.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class CBSRAMPlus: public BusExtender { public: @@ -37,7 +36,6 @@ class CBSRAMPlus: public BusExtender { uint8_t ram_[256]; }; -} } #endif /* Atari2600_CartridgeCBSRAMPlus_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Cartridge.hpp b/Machines/Atari/2600/Cartridges/Cartridge.hpp index 90706fb04..a2c6538da 100644 --- a/Machines/Atari/2600/Cartridges/Cartridge.hpp +++ b/Machines/Atari/2600/Cartridges/Cartridge.hpp @@ -12,8 +12,7 @@ #include "../../../../Processors/6502/6502.hpp" #include "../Bus.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class BusExtender: public CPU::MOS6502::BusHandler { public: @@ -214,7 +213,6 @@ template class Cartridge: }; -} } #endif /* Atari2600_Cartridge_hpp */ diff --git a/Machines/Atari/2600/Cartridges/CommaVid.hpp b/Machines/Atari/2600/Cartridges/CommaVid.hpp index 251abb139..d6c576387 100644 --- a/Machines/Atari/2600/Cartridges/CommaVid.hpp +++ b/Machines/Atari/2600/Cartridges/CommaVid.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class CommaVid: public BusExtender { public: @@ -39,7 +38,6 @@ class CommaVid: public BusExtender { uint8_t ram_[1024]; }; -} } #endif /* Atari2600_CartridgeCommaVid_hpp */ diff --git a/Machines/Atari/2600/Cartridges/MNetwork.hpp b/Machines/Atari/2600/Cartridges/MNetwork.hpp index 9ad5a0faa..c85b854a3 100644 --- a/Machines/Atari/2600/Cartridges/MNetwork.hpp +++ b/Machines/Atari/2600/Cartridges/MNetwork.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class MNetwork: public BusExtender { public: @@ -63,7 +62,6 @@ class MNetwork: public BusExtender { uint8_t low_ram_[1024], high_ram_[1024]; }; -} } #endif /* Atari2600_CartridgeMNetwork_hpp */ diff --git a/Machines/Atari/2600/Cartridges/MegaBoy.hpp b/Machines/Atari/2600/Cartridges/MegaBoy.hpp index a4cc2b91f..b00ab909d 100644 --- a/Machines/Atari/2600/Cartridges/MegaBoy.hpp +++ b/Machines/Atari/2600/Cartridges/MegaBoy.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class MegaBoy: public BusExtender { public: @@ -41,7 +40,6 @@ class MegaBoy: public BusExtender { uint8_t current_page_; }; -} } #endif /* CartridgeMegaBoy_h */ diff --git a/Machines/Atari/2600/Cartridges/ParkerBros.hpp b/Machines/Atari/2600/Cartridges/ParkerBros.hpp index 559491bad..9e3c9ee5d 100644 --- a/Machines/Atari/2600/Cartridges/ParkerBros.hpp +++ b/Machines/Atari/2600/Cartridges/ParkerBros.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class ParkerBros: public BusExtender { public: @@ -42,7 +41,6 @@ class ParkerBros: public BusExtender { uint8_t *rom_ptr_[4]; }; -} } #endif /* Atari2600_CartridgeParkerBros_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Pitfall2.hpp b/Machines/Atari/2600/Cartridges/Pitfall2.hpp index 3cd2dd557..35e7236bf 100644 --- a/Machines/Atari/2600/Cartridges/Pitfall2.hpp +++ b/Machines/Atari/2600/Cartridges/Pitfall2.hpp @@ -9,8 +9,7 @@ #ifndef Atari2600_CartridgePitfall2_hpp #define Atari2600_CartridgePitfall2_hpp -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Pitfall2: public BusExtender { public: @@ -123,7 +122,6 @@ class Pitfall2: public BusExtender { Cycles cycles_since_audio_update_ = 0; }; -} } #endif /* Atari2600_CartridgePitfall2_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Tigervision.hpp b/Machines/Atari/2600/Cartridges/Tigervision.hpp index fa2f46a51..c9fa9856e 100644 --- a/Machines/Atari/2600/Cartridges/Tigervision.hpp +++ b/Machines/Atari/2600/Cartridges/Tigervision.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Tigervision: public BusExtender { public: @@ -36,7 +35,6 @@ class Tigervision: public BusExtender { uint8_t *rom_ptr_[2]; }; -} } #endif /* Atari2600_CartridgeTigervision_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Unpaged.hpp b/Machines/Atari/2600/Cartridges/Unpaged.hpp index 703e127c3..fbf192f78 100644 --- a/Machines/Atari/2600/Cartridges/Unpaged.hpp +++ b/Machines/Atari/2600/Cartridges/Unpaged.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Unpaged: public BusExtender { public: @@ -25,7 +24,6 @@ class Unpaged: public BusExtender { } }; -} } #endif /* Atari2600_CartridgeUnpaged_hpp */ diff --git a/Machines/Atari/ST/AtariST.cpp b/Machines/Atari/ST/AtariST.cpp index 6925ad85a..f40e1de0a 100644 --- a/Machines/Atari/ST/AtariST.cpp +++ b/Machines/Atari/ST/AtariST.cpp @@ -13,7 +13,7 @@ //#define LOG_TRACE //bool should_log = false; -#include "../../../Processors/68000Mk2/68000Mk2.hpp" +#include "../../../Processors/68000/68000.hpp" #include "../../../Components/AY38910/AY38910.hpp" #include "../../../Components/68901/MFP68901.hpp" @@ -45,7 +45,7 @@ constexpr int CLOCK_RATE = 8021247; using Target = Analyser::Static::AtariST::Target; class ConcreteMachine: public Atari::ST::Machine, - public CPU::MC68000Mk2::BusHandler, + public CPU::MC68000::BusHandler, public MachineTypes::TimedMachine, public MachineTypes::ScanProducer, public MachineTypes::AudioProducer, @@ -492,7 +492,7 @@ class ConcreteMachine: speaker_.run_for(audio_queue_, cycles_since_audio_update_.divide_cycles(Cycles(4))); } - CPU::MC68000Mk2::Processor mc68000_; + CPU::MC68000::Processor mc68000_; HalfCycles bus_phase_; JustInTimeActor