diff --git a/Machines/Oric/Oric.cpp b/Machines/Oric/Oric.cpp index e75ae27c8..ac0b3a08a 100644 --- a/Machines/Oric/Oric.cpp +++ b/Machines/Oric/Oric.cpp @@ -25,10 +25,16 @@ #include "../../ClockReceiver/ForceInline.hpp" #include "../../Configurable/StandardOptions.hpp" +#include #include +#include namespace Oric { +enum ROM { + BASIC10 = 0, BASIC11, Microdisc, Colour +}; + std::vector> get_options() { return Configurable::standard_options( static_cast(Configurable::DisplayRGBComposite | Configurable::QuickLoadTape) @@ -198,7 +204,7 @@ class ConcreteMachine: Memory::Fuzz(ram_, sizeof(ram_)); } - void set_rom(ROM rom, const std::vector &data) override final { + void set_rom(ROM rom, const std::vector &data) { switch(rom) { case BASIC11: basic11_rom_ = std::move(data); break; case BASIC10: basic10_rom_ = std::move(data); break; @@ -240,11 +246,11 @@ class ConcreteMachine: keyboard_.clear_all_keys(); } - void set_use_fast_tape_hack(bool activate) override final { + void set_use_fast_tape_hack(bool activate) { use_fast_tape_hack_ = activate; } - void set_output_device(Outputs::CRT::OutputDevice output_device) override final { + void set_output_device(Outputs::CRT::OutputDevice output_device) { video_output_->set_output_device(output_device); } diff --git a/Machines/Oric/Oric.hpp b/Machines/Oric/Oric.hpp index 6bba6eb93..e808b9ff8 100644 --- a/Machines/Oric/Oric.hpp +++ b/Machines/Oric/Oric.hpp @@ -14,15 +14,8 @@ #include "../CRTMachine.hpp" #include "../KeyboardMachine.hpp" -#include -#include - namespace Oric { -enum ROM { - BASIC10 = 0, BASIC11, Microdisc, Colour -}; - /// @returns The options available for an Oric. std::vector> get_options(); @@ -39,15 +32,6 @@ class Machine: /// Creates and returns an Oric. static Machine *Oric(); - - /// Sets the contents of @c rom to @c data. Assumed to be a setup step; has no effect once a machine is running. - virtual void set_rom(ROM rom, const std::vector &data) = 0; - - /// Enables or disables turbo-speed tape loading. - virtual void set_use_fast_tape_hack(bool activate) = 0; - - /// Sets the type of display the Oric is connected to. - virtual void set_output_device(Outputs::CRT::OutputDevice output_device) = 0; }; } diff --git a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm index b3739bc8c..de0ba39d2 100644 --- a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm +++ b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm @@ -9,6 +9,7 @@ #import "CSOric.h" #include "Oric.hpp" +#include "StandardOptions.hpp" @implementation CSOric { std::unique_ptr _oric; @@ -29,14 +30,20 @@ - (void)setUseFastLoadingHack:(BOOL)useFastLoadingHack { @synchronized(self) { _useFastLoadingHack = useFastLoadingHack; - _oric->set_use_fast_tape_hack(useFastLoadingHack ? true : false); + + Configurable::SelectionSet selection_set; + append_quick_load_tape_selection(selection_set, useFastLoadingHack ? true : false); + _oric->set_selections(selection_set); } } - (void)setUseCompositeOutput:(BOOL)useCompositeOutput { @synchronized(self) { _useCompositeOutput = useCompositeOutput; - _oric->set_output_device(useCompositeOutput ? Outputs::CRT::OutputDevice::Television : Outputs::CRT::OutputDevice::Monitor); + + Configurable::SelectionSet selection_set; + append_display_selection(selection_set, useCompositeOutput ? Configurable::Display::Composite : Configurable::Display::RGB); + _oric->set_selections(selection_set); } }