diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiCRTMachine.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiCRTMachine.hpp index 9480fb50a..1152483d9 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiCRTMachine.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiCRTMachine.hpp @@ -13,14 +13,13 @@ #include "../../../../Machines/CRTMachine.hpp" #include "../../../../Machines/DynamicMachine.hpp" - #include #include namespace Analyser { namespace Dynamic { -struct MultiCRTMachine: public ::CRTMachine::Machine, public ::CRTMachine::Machine::Delegate { +class MultiCRTMachine: public ::CRTMachine::Machine, public ::CRTMachine::Machine::Delegate { public: MultiCRTMachine(const std::vector> &machines); diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.cpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.cpp new file mode 100644 index 000000000..8d288cfb1 --- /dev/null +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.cpp @@ -0,0 +1,62 @@ +// +// MultiConfigurable.cpp +// Clock Signal +// +// Created by Thomas Harte on 09/02/2018. +// Copyright © 2018 Thomas Harte. All rights reserved. +// + +#include "MultiConfigurable.hpp" + +using namespace Analyser::Dynamic; + +MultiConfigurable::MultiConfigurable(const std::vector> &machines) { + for(const auto &machine: machines) { + Configurable::Device *device = machine->configurable_device(); + if(device) devices_.push_back(device); + } +} + +std::vector> MultiConfigurable::get_options() { + std::vector> options; + + // Produce the list of unique options. + for(const auto &device : devices_) { + std::vector> device_options = device->get_options(); + for(auto &option : device_options) { + if(std::find(options.begin(), options.end(), option) == options.end()) { + options.push_back(std::move(option)); + } + } + } + + return options; +} + +void MultiConfigurable::set_selections(const Configurable::SelectionSet &selection_by_option) { + for(const auto &device : devices_) { + device->set_selections(selection_by_option); + } +} + +Configurable::SelectionSet MultiConfigurable::get_accurate_selections() { + Configurable::SelectionSet set; + for(const auto &device : devices_) { + Configurable::SelectionSet device_set = device->get_accurate_selections(); + for(auto &selection : device_set) { + set.insert(std::move(selection)); + } + } + return set; +} + +Configurable::SelectionSet MultiConfigurable::get_user_friendly_selections() { + Configurable::SelectionSet set; + for(const auto &device : devices_) { + Configurable::SelectionSet device_set = device->get_user_friendly_selections(); + for(auto &selection : device_set) { + set.insert(std::move(selection)); + } + } + return set; +} diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp new file mode 100644 index 000000000..8f00057e8 --- /dev/null +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp @@ -0,0 +1,36 @@ +// +// MultiConfigurable.hpp +// Clock Signal +// +// Created by Thomas Harte on 09/02/2018. +// Copyright © 2018 Thomas Harte. All rights reserved. +// + +#ifndef MultiConfigurable_hpp +#define MultiConfigurable_hpp + +#include "../../../../Machines/DynamicMachine.hpp" + +#include +#include + +namespace Analyser { +namespace Dynamic { + +class MultiConfigurable: public Configurable::Device { + public: + MultiConfigurable(const std::vector> &machines); + + std::vector> get_options() override; + void set_selections(const Configurable::SelectionSet &selection_by_option) override; + Configurable::SelectionSet get_accurate_selections() override; + Configurable::SelectionSet get_user_friendly_selections() override; + + private: + std::vector devices_; +}; + +} +} + +#endif /* MultiConfigurable_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.cpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.cpp new file mode 100644 index 000000000..d899b9e36 --- /dev/null +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.cpp @@ -0,0 +1,22 @@ +// +// MultiJoystickMachine.cpp +// Clock Signal +// +// Created by Thomas Harte on 09/02/2018. +// Copyright © 2018 Thomas Harte. All rights reserved. +// + +#include "MultiJoystickMachine.hpp" + +using namespace Analyser::Dynamic; + +MultiJoystickMachine::MultiJoystickMachine(const std::vector> &machines) { + for(const auto &machine: machines) { + JoystickMachine::Machine *joystick_machine = machine->joystick_machine(); + if(joystick_machine) machines_.push_back(joystick_machine); + } +} + +std::vector> &MultiJoystickMachine::get_joysticks() { + return joysticks_; +} diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp new file mode 100644 index 000000000..dad324354 --- /dev/null +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp @@ -0,0 +1,35 @@ +// +// MultiJoystickMachine.hpp +// Clock Signal +// +// Created by Thomas Harte on 09/02/2018. +// Copyright © 2018 Thomas Harte. All rights reserved. +// + +#ifndef MultiJoystickMachine_hpp +#define MultiJoystickMachine_hpp + +#include "../../../../Machines/DynamicMachine.hpp" + +#include +#include + +namespace Analyser { +namespace Dynamic { + +class MultiJoystickMachine: public JoystickMachine::Machine { + public: + MultiJoystickMachine(const std::vector> &machines); + + std::vector> &get_joysticks() override; + + private: + std::vector machines_; + std::vector> joysticks_; + +}; + +} +} + +#endif /* MultiJoystickMachine_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.cpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.cpp new file mode 100644 index 000000000..2806801a7 --- /dev/null +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.cpp @@ -0,0 +1,43 @@ +// +// MultiKeyboardMachine.cpp +// Clock Signal +// +// Created by Thomas Harte on 09/02/2018. +// Copyright © 2018 Thomas Harte. All rights reserved. +// + +#include "MultiKeyboardMachine.hpp" + +using namespace Analyser::Dynamic; + +MultiKeyboardMachine::MultiKeyboardMachine(const std::vector> &machines) { + for(const auto &machine: machines) { + KeyboardMachine::Machine *keyboard_machine = machine->keyboard_machine(); + if(keyboard_machine) machines_.push_back(keyboard_machine); + } +} + +void MultiKeyboardMachine::clear_all_keys() { + for(const auto &machine: machines_) { + machine->clear_all_keys(); + } +} + +void MultiKeyboardMachine::set_key_state(uint16_t key, bool is_pressed) { + for(const auto &machine: machines_) { + machine->set_key_state(key, is_pressed); + } +} + +void MultiKeyboardMachine::type_string(const std::string &string) { + for(const auto &machine: machines_) { + machine->type_string(string); + } +} + +void MultiKeyboardMachine::keyboard_did_change_key(Inputs::Keyboard *keyboard, Inputs::Keyboard::Key key, bool is_pressed) { + for(const auto &machine: machines_) { + uint16_t mapped_key = machine->get_keyboard_mapper()->mapped_key_for_key(key); + if(mapped_key != KeyNotMapped) machine->set_key_state(mapped_key, is_pressed); + } +} diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp new file mode 100644 index 000000000..47df189a0 --- /dev/null +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp @@ -0,0 +1,37 @@ +// +// MultiKeyboardMachine.hpp +// Clock Signal +// +// Created by Thomas Harte on 09/02/2018. +// Copyright © 2018 Thomas Harte. All rights reserved. +// + +#ifndef MultiKeyboardMachine_hpp +#define MultiKeyboardMachine_hpp + +#include "../../../../Machines/DynamicMachine.hpp" +#include "../../../../Machines/KeyboardMachine.hpp" + +#include +#include + +namespace Analyser { +namespace Dynamic { + +class MultiKeyboardMachine: public ::KeyboardMachine::Machine { + public: + MultiKeyboardMachine(const std::vector> &machines); + + void clear_all_keys() override; + void set_key_state(uint16_t key, bool is_pressed) override; + void type_string(const std::string &) override; + void keyboard_did_change_key(Inputs::Keyboard *keyboard, Inputs::Keyboard::Key key, bool is_pressed) override; + + private: + std::vector<::KeyboardMachine::Machine *> machines_; +}; + +} +} + +#endif /* MultiKeyboardMachine_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/MultiMachine.cpp b/Analyser/Dynamic/MultiMachine/MultiMachine.cpp index 380347e98..daceb8a7a 100644 --- a/Analyser/Dynamic/MultiMachine/MultiMachine.cpp +++ b/Analyser/Dynamic/MultiMachine/MultiMachine.cpp @@ -12,8 +12,11 @@ using namespace Analyser::Dynamic; MultiMachine::MultiMachine(std::vector> &&machines) : machines_(std::move(machines)), + configurable_(machines_), configuration_target_(machines_), - crt_machine_(machines_) { + crt_machine_(machines_), + joystick_machine_(machines), + keyboard_machine_(machines_) { crt_machine_.set_delegate(this); } @@ -26,19 +29,15 @@ CRTMachine::Machine *MultiMachine::crt_machine() { } JoystickMachine::Machine *MultiMachine::joystick_machine() { - return nullptr; + return &joystick_machine_; } KeyboardMachine::Machine *MultiMachine::keyboard_machine() { - return nullptr; + return &keyboard_machine_; } Configurable::Device *MultiMachine::configurable_device() { - return nullptr; -} - -Utility::TypeRecipient *MultiMachine::type_recipient() { - return nullptr; + return &configurable_; } void MultiMachine::multi_crt_did_run_machines() { diff --git a/Analyser/Dynamic/MultiMachine/MultiMachine.hpp b/Analyser/Dynamic/MultiMachine/MultiMachine.hpp index bcf3d10ed..6afa5bd22 100644 --- a/Analyser/Dynamic/MultiMachine/MultiMachine.hpp +++ b/Analyser/Dynamic/MultiMachine/MultiMachine.hpp @@ -11,8 +11,11 @@ #include "../../../Machines/DynamicMachine.hpp" +#include "Implementation/MultiConfigurable.hpp" #include "Implementation/MultiConfigurationTarget.hpp" #include "Implementation/MultiCRTMachine.hpp" +#include "Implementation/MultiJoystickMachine.hpp" +#include "Implementation/MultiKeyboardMachine.hpp" #include #include @@ -41,15 +44,17 @@ class MultiMachine: public ::Machine::DynamicMachine, public MultiCRTMachine::De JoystickMachine::Machine *joystick_machine() override; KeyboardMachine::Machine *keyboard_machine() override; Configurable::Device *configurable_device() override; - Utility::TypeRecipient *type_recipient() override; void multi_crt_did_run_machines() override; private: std::vector> machines_; + MultiConfigurable configurable_; MultiConfigurationTarget configuration_target_; MultiCRTMachine crt_machine_; + MultiJoystickMachine joystick_machine_; + MultiKeyboardMachine keyboard_machine_; }; } diff --git a/Configurable/Configurable.hpp b/Configurable/Configurable.hpp index 7def8d64a..e08e72b8d 100644 --- a/Configurable/Configurable.hpp +++ b/Configurable/Configurable.hpp @@ -26,6 +26,10 @@ struct Option { virtual ~Option() {} Option(const std::string &long_name, const std::string &short_name) : long_name(long_name), short_name(short_name) {} + + virtual bool operator==(const Option &rhs) { + return long_name == rhs.long_name && short_name == rhs.short_name; + } }; struct BooleanOption: public Option { @@ -35,6 +39,12 @@ struct BooleanOption: public Option { struct ListOption: public Option { std::vector options; ListOption(const std::string &long_name, const std::string &short_name, const std::vector &options) : Option(long_name, short_name), options(options) {} + + virtual bool operator==(const Option &rhs) { + const ListOption *list_rhs = dynamic_cast(&rhs); + if(!list_rhs) return false; + return long_name == rhs.long_name && short_name == rhs.short_name && options == list_rhs->options; + } }; struct BooleanSelection; diff --git a/Machines/AmstradCPC/AmstradCPC.cpp b/Machines/AmstradCPC/AmstradCPC.cpp index 880b6a335..ed646e856 100644 --- a/Machines/AmstradCPC/AmstradCPC.cpp +++ b/Machines/AmstradCPC/AmstradCPC.cpp @@ -976,8 +976,8 @@ class ConcreteMachine: key_state_.clear_all_keys(); } - KeyboardMapper &get_keyboard_mapper() override { - return keyboard_mapper_; + KeyboardMapper *get_keyboard_mapper() override { + return &keyboard_mapper_; } private: diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index 8a4754218..551404825 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -662,8 +662,8 @@ class ConcreteMachine: keyboard_via_.set_control_line_input(MOS::MOS6522::Port::A, MOS::MOS6522::Line::One, !tape->get_input()); } - KeyboardMapper &get_keyboard_mapper() override { - return keyboard_mapper_; + KeyboardMapper *get_keyboard_mapper() override { + return &keyboard_mapper_; } // MARK: - Configuration options. diff --git a/Machines/DynamicMachine.hpp b/Machines/DynamicMachine.hpp index 1182120ee..96839410d 100644 --- a/Machines/DynamicMachine.hpp +++ b/Machines/DynamicMachine.hpp @@ -29,7 +29,6 @@ struct DynamicMachine { virtual JoystickMachine::Machine *joystick_machine() = 0; virtual KeyboardMachine::Machine *keyboard_machine() = 0; virtual Configurable::Device *configurable_device() = 0; - virtual Utility::TypeRecipient *type_recipient() = 0; }; } diff --git a/Machines/Electron/Electron.cpp b/Machines/Electron/Electron.cpp index 7697ceef8..714348515 100644 --- a/Machines/Electron/Electron.cpp +++ b/Machines/Electron/Electron.cpp @@ -425,8 +425,8 @@ class ConcreteMachine: Utility::TypeRecipient::add_typer(string, std::move(mapper)); } - KeyboardMapper &get_keyboard_mapper() override { - return keyboard_mapper_; + KeyboardMapper *get_keyboard_mapper() override { + return &keyboard_mapper_; } // MARK: - Configuration options. diff --git a/Machines/KeyboardMachine.cpp b/Machines/KeyboardMachine.cpp index ff21ddf44..1cbdc28d3 100644 --- a/Machines/KeyboardMachine.cpp +++ b/Machines/KeyboardMachine.cpp @@ -15,7 +15,7 @@ Machine::Machine() { } void Machine::keyboard_did_change_key(Inputs::Keyboard *keyboard, Inputs::Keyboard::Key key, bool is_pressed) { - uint16_t mapped_key = get_keyboard_mapper().mapped_key_for_key(key); + uint16_t mapped_key = get_keyboard_mapper()->mapped_key_for_key(key); if(mapped_key != KeyNotMapped) set_key_state(mapped_key, is_pressed); } @@ -30,3 +30,7 @@ Inputs::Keyboard &Machine::get_keyboard() { void Machine::type_string(const std::string &) { } + +Machine::KeyboardMapper *Machine::get_keyboard_mapper() { + return nullptr; +} diff --git a/Machines/KeyboardMachine.hpp b/Machines/KeyboardMachine.hpp index da911412b..4f65855f3 100644 --- a/Machines/KeyboardMachine.hpp +++ b/Machines/KeyboardMachine.hpp @@ -61,12 +61,11 @@ class Machine: public Inputs::Keyboard::Delegate { */ static const uint16_t KeyNotMapped = 0xfffe; - protected: /*! Allows individual machines to provide the mapping between host keys as per Inputs::Keyboard and their native scheme. */ - virtual KeyboardMapper &get_keyboard_mapper() = 0; + virtual KeyboardMapper *get_keyboard_mapper(); private: void keyboard_did_change_key(Inputs::Keyboard *keyboard, Inputs::Keyboard::Key key, bool is_pressed) override; diff --git a/Machines/MSX/MSX.cpp b/Machines/MSX/MSX.cpp index 5bbcce091..43fa774b4 100644 --- a/Machines/MSX/MSX.cpp +++ b/Machines/MSX/MSX.cpp @@ -529,8 +529,8 @@ class ConcreteMachine: if(is_pressed) key_states_[line] &= ~mask; else key_states_[line] |= mask; } - KeyboardMapper &get_keyboard_mapper() override { - return keyboard_mapper_; + KeyboardMapper *get_keyboard_mapper() override { + return &keyboard_mapper_; } // MARK: - Configuration options. diff --git a/Machines/Oric/Oric.cpp b/Machines/Oric/Oric.cpp index 6a0e42b27..262b55050 100644 --- a/Machines/Oric/Oric.cpp +++ b/Machines/Oric/Oric.cpp @@ -432,8 +432,8 @@ class ConcreteMachine: set_interrupt_line(); } - KeyboardMapper &get_keyboard_mapper() override { - return keyboard_mapper_; + KeyboardMapper *get_keyboard_mapper() override { + return &keyboard_mapper_; } // MARK: - Configuration options. diff --git a/Machines/Utility/TypedDynamicMachine.hpp b/Machines/Utility/TypedDynamicMachine.hpp index a39f710d1..83b3f7087 100644 --- a/Machines/Utility/TypedDynamicMachine.hpp +++ b/Machines/Utility/TypedDynamicMachine.hpp @@ -45,10 +45,6 @@ template class TypedDynamicMachine: public ::Machine::DynamicMachine return get(); } - Utility::TypeRecipient *type_recipient() override { - return get(); - } - private: template Class *get() { return dynamic_cast(machine_.get()); diff --git a/Machines/ZX8081/ZX8081.cpp b/Machines/ZX8081/ZX8081.cpp index 6906915c4..a5e044c53 100644 --- a/Machines/ZX8081/ZX8081.cpp +++ b/Machines/ZX8081/ZX8081.cpp @@ -349,8 +349,8 @@ template class ConcreteMachine: HalfCycles get_typer_delay() override final { return Cycles(7000000); } HalfCycles get_typer_frequency() override final { return Cycles(390000); } - KeyboardMapper &get_keyboard_mapper() override { - return keyboard_mapper_; + KeyboardMapper *get_keyboard_mapper() override { + return &keyboard_mapper_; } // MARK: - Configuration options. diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index c28a5e7a9..bf70503cc 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -131,6 +131,13 @@ 4B1497921EE4B5A800CE2596 /* ZX8081.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1497901EE4B5A800CE2596 /* ZX8081.cpp */; }; 4B1497981EE4B97F00CE2596 /* ZX8081Options.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B1497961EE4B97F00CE2596 /* ZX8081Options.xib */; }; 4B1558C01F844ECD006E9A97 /* BitReverse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1558BE1F844ECD006E9A97 /* BitReverse.cpp */; }; + 4B1B88BB202E2EC100B67DFF /* MultiKeyboardMachine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1B88B9202E2EC100B67DFF /* MultiKeyboardMachine.cpp */; }; + 4B1B88BC202E2EC100B67DFF /* MultiKeyboardMachine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1B88B9202E2EC100B67DFF /* MultiKeyboardMachine.cpp */; }; + 4B1B88BD202E3D3D00B67DFF /* MultiMachine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B3FCC3F201EC24200960631 /* MultiMachine.cpp */; }; + 4B1B88C0202E3DB200B67DFF /* MultiConfigurable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1B88BE202E3DB200B67DFF /* MultiConfigurable.cpp */; }; + 4B1B88C1202E3DB200B67DFF /* MultiConfigurable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1B88BE202E3DB200B67DFF /* MultiConfigurable.cpp */; }; + 4B1B88C8202E469300B67DFF /* MultiJoystickMachine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1B88C6202E469300B67DFF /* MultiJoystickMachine.cpp */; }; + 4B1B88C9202E469400B67DFF /* MultiJoystickMachine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1B88C6202E469300B67DFF /* MultiJoystickMachine.cpp */; }; 4B1D08061E0F7A1100763741 /* TimeTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B1D08051E0F7A1100763741 /* TimeTests.mm */; }; 4B1E85811D176468001EF87D /* 6532Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B1E85801D176468001EF87D /* 6532Tests.swift */; }; 4B1EDB451E39A0AC009D6819 /* chip.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B1EDB431E39A0AC009D6819 /* chip.png */; }; @@ -691,6 +698,12 @@ 4B1667F91FFF215E00A16032 /* ASCII16kb.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ASCII16kb.hpp; path = MSX/Cartridges/ASCII16kb.hpp; sourceTree = ""; }; 4B1667FA1FFF215E00A16032 /* ASCII8kb.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ASCII8kb.hpp; path = MSX/Cartridges/ASCII8kb.hpp; sourceTree = ""; }; 4B1667FB1FFF215F00A16032 /* KonamiWithSCC.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = KonamiWithSCC.hpp; path = MSX/Cartridges/KonamiWithSCC.hpp; sourceTree = ""; }; + 4B1B88B9202E2EC100B67DFF /* MultiKeyboardMachine.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MultiKeyboardMachine.cpp; sourceTree = ""; }; + 4B1B88BA202E2EC100B67DFF /* MultiKeyboardMachine.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = MultiKeyboardMachine.hpp; sourceTree = ""; }; + 4B1B88BE202E3DB200B67DFF /* MultiConfigurable.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MultiConfigurable.cpp; sourceTree = ""; }; + 4B1B88BF202E3DB200B67DFF /* MultiConfigurable.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = MultiConfigurable.hpp; sourceTree = ""; }; + 4B1B88C6202E469300B67DFF /* MultiJoystickMachine.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MultiJoystickMachine.cpp; sourceTree = ""; }; + 4B1B88C7202E469300B67DFF /* MultiJoystickMachine.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = MultiJoystickMachine.hpp; sourceTree = ""; }; 4B1D08051E0F7A1100763741 /* TimeTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TimeTests.mm; sourceTree = ""; }; 4B1E857B1D174DEC001EF87D /* 6532.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = 6532.hpp; sourceTree = ""; }; 4B1E85801D176468001EF87D /* 6532Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 6532Tests.swift; sourceTree = ""; }; @@ -2665,6 +2678,12 @@ 4BBB70A3202011C2002FE009 /* MultiConfigurationTarget.cpp */, 4BBB70A6202014E2002FE009 /* MultiCRTMachine.cpp */, 4BBB70A7202014E2002FE009 /* MultiCRTMachine.hpp */, + 4B1B88B9202E2EC100B67DFF /* MultiKeyboardMachine.cpp */, + 4B1B88BA202E2EC100B67DFF /* MultiKeyboardMachine.hpp */, + 4B1B88BE202E3DB200B67DFF /* MultiConfigurable.cpp */, + 4B1B88BF202E3DB200B67DFF /* MultiConfigurable.hpp */, + 4B1B88C6202E469300B67DFF /* MultiJoystickMachine.cpp */, + 4B1B88C7202E469300B67DFF /* MultiJoystickMachine.hpp */, ); path = Implementation; sourceTree = ""; @@ -3359,6 +3378,7 @@ buildActionMask = 2147483647; files = ( 4B0E04FB1FC9FA3100F43484 /* 9918.cpp in Sources */, + 4B1B88C9202E469400B67DFF /* MultiJoystickMachine.cpp in Sources */, 4B055AAA1FAE85F50060FFFF /* CPM.cpp in Sources */, 4B055A9A1FAE85CB0060FFFF /* MFMDiskController.cpp in Sources */, 4B055ACB1FAE9AFB0060FFFF /* SerialBus.cpp in Sources */, @@ -3396,6 +3416,7 @@ 4B055AC71FAE9AEE0060FFFF /* TIA.cpp in Sources */, 4B055AD21FAE9B0B0060FFFF /* Keyboard.cpp in Sources */, 4B89451B201967B4007DE474 /* ConfidenceSummary.cpp in Sources */, + 4B1B88C1202E3DB200B67DFF /* MultiConfigurable.cpp in Sources */, 4B055AA31FAE85DF0060FFFF /* ImplicitSectors.cpp in Sources */, 4B055AAE1FAE85FD0060FFFF /* TrackSerialiser.cpp in Sources */, 4B89452B201967B4007DE474 /* File.cpp in Sources */, @@ -3414,6 +3435,7 @@ 4B894519201967B4007DE474 /* ConfidenceCounter.cpp in Sources */, 4B055AEE1FAE9BBF0060FFFF /* Keyboard.cpp in Sources */, 4B055AED1FAE9BA20060FFFF /* Z80Storage.cpp in Sources */, + 4B1B88BC202E2EC100B67DFF /* MultiKeyboardMachine.cpp in Sources */, 4B055AD11FAE9B030060FFFF /* Video.cpp in Sources */, 4B055AA21FAE85DA0060FFFF /* SSD.cpp in Sources */, 4BEBFB4E2002C4BF000708CC /* MSXDSK.cpp in Sources */, @@ -3447,6 +3469,7 @@ 4B055AC41FAE9AE80060FFFF /* Keyboard.cpp in Sources */, 4B055A941FAE85B50060FFFF /* CommodoreROM.cpp in Sources */, 4BBB70A5202011C2002FE009 /* MultiConfigurationTarget.cpp in Sources */, + 4B1B88BD202E3D3D00B67DFF /* MultiMachine.cpp in Sources */, 4B055A971FAE85BB0060FFFF /* ZX8081.cpp in Sources */, 4B055AAD1FAE85FD0060FFFF /* PCMTrack.cpp in Sources */, 4B055AC61FAE9AEE0060FFFF /* TIASound.cpp in Sources */, @@ -3512,6 +3535,7 @@ 4B322E041F5A2E3C004EB04C /* Z80Base.cpp in Sources */, 4B894530201967B4007DE474 /* StaticAnalyser.cpp in Sources */, 4B4518A31F75FD1C00926311 /* HFE.cpp in Sources */, + 4B1B88BB202E2EC100B67DFF /* MultiKeyboardMachine.cpp in Sources */, 4B4518A11F75FD1C00926311 /* D64.cpp in Sources */, 4B1558C01F844ECD006E9A97 /* BitReverse.cpp in Sources */, 4BCF1FA41DADC3DD0039D2E7 /* Oric.cpp in Sources */, @@ -3638,9 +3662,11 @@ 4B89453E201967B4007DE474 /* StaticAnalyser.cpp in Sources */, 4B37EE821D7345A6006A09A4 /* BinaryDump.cpp in Sources */, 4B8334821F5D9FF70097E338 /* PartialMachineCycle.cpp in Sources */, + 4B1B88C0202E3DB200B67DFF /* MultiConfigurable.cpp in Sources */, 4B54C0BC1F8D8E790050900F /* KeyboardMachine.cpp in Sources */, 4BB73EA21B587A5100552FC2 /* AppDelegate.swift in Sources */, 4B894534201967B4007DE474 /* AddressMapper.cpp in Sources */, + 4B1B88C8202E469300B67DFF /* MultiJoystickMachine.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/OSBindings/Mac/Clock Signal/Machine/CSMachine.mm b/OSBindings/Mac/Clock Signal/Machine/CSMachine.mm index 15fd31701..b0fe69d5d 100644 --- a/OSBindings/Mac/Clock Signal/Machine/CSMachine.mm +++ b/OSBindings/Mac/Clock Signal/Machine/CSMachine.mm @@ -181,7 +181,7 @@ struct MachineDelegate: CRTMachine::Machine::Delegate, public LockProtectedDeleg } - (void)paste:(NSString *)paste { - KeyboardMachine::Machine *keyboardMachine = _machine->type_recipient(); + KeyboardMachine::Machine *keyboardMachine = _machine->keyboard_machine(); if(keyboardMachine) keyboardMachine->type_string([paste UTF8String]); }