mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-19 07:31:15 +00:00
Eliminates the Oric's non-reflective inputs for selections, and the Oric-specific ROM setter.
This commit is contained in:
parent
bc65ba3f9b
commit
a8ac51da73
@ -25,10 +25,16 @@
|
|||||||
#include "../../ClockReceiver/ForceInline.hpp"
|
#include "../../ClockReceiver/ForceInline.hpp"
|
||||||
#include "../../Configurable/StandardOptions.hpp"
|
#include "../../Configurable/StandardOptions.hpp"
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Oric {
|
namespace Oric {
|
||||||
|
|
||||||
|
enum ROM {
|
||||||
|
BASIC10 = 0, BASIC11, Microdisc, Colour
|
||||||
|
};
|
||||||
|
|
||||||
std::vector<std::unique_ptr<Configurable::Option>> get_options() {
|
std::vector<std::unique_ptr<Configurable::Option>> get_options() {
|
||||||
return Configurable::standard_options(
|
return Configurable::standard_options(
|
||||||
static_cast<Configurable::StandardOptions>(Configurable::DisplayRGBComposite | Configurable::QuickLoadTape)
|
static_cast<Configurable::StandardOptions>(Configurable::DisplayRGBComposite | Configurable::QuickLoadTape)
|
||||||
@ -198,7 +204,7 @@ class ConcreteMachine:
|
|||||||
Memory::Fuzz(ram_, sizeof(ram_));
|
Memory::Fuzz(ram_, sizeof(ram_));
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_rom(ROM rom, const std::vector<uint8_t> &data) override final {
|
void set_rom(ROM rom, const std::vector<uint8_t> &data) {
|
||||||
switch(rom) {
|
switch(rom) {
|
||||||
case BASIC11: basic11_rom_ = std::move(data); break;
|
case BASIC11: basic11_rom_ = std::move(data); break;
|
||||||
case BASIC10: basic10_rom_ = std::move(data); break;
|
case BASIC10: basic10_rom_ = std::move(data); break;
|
||||||
@ -240,11 +246,11 @@ class ConcreteMachine:
|
|||||||
keyboard_.clear_all_keys();
|
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;
|
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);
|
video_output_->set_output_device(output_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,15 +14,8 @@
|
|||||||
#include "../CRTMachine.hpp"
|
#include "../CRTMachine.hpp"
|
||||||
#include "../KeyboardMachine.hpp"
|
#include "../KeyboardMachine.hpp"
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
namespace Oric {
|
namespace Oric {
|
||||||
|
|
||||||
enum ROM {
|
|
||||||
BASIC10 = 0, BASIC11, Microdisc, Colour
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @returns The options available for an Oric.
|
/// @returns The options available for an Oric.
|
||||||
std::vector<std::unique_ptr<Configurable::Option>> get_options();
|
std::vector<std::unique_ptr<Configurable::Option>> get_options();
|
||||||
|
|
||||||
@ -39,15 +32,6 @@ class Machine:
|
|||||||
|
|
||||||
/// Creates and returns an Oric.
|
/// Creates and returns an Oric.
|
||||||
static Machine *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<uint8_t> &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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#import "CSOric.h"
|
#import "CSOric.h"
|
||||||
|
|
||||||
#include "Oric.hpp"
|
#include "Oric.hpp"
|
||||||
|
#include "StandardOptions.hpp"
|
||||||
|
|
||||||
@implementation CSOric {
|
@implementation CSOric {
|
||||||
std::unique_ptr<Oric::Machine> _oric;
|
std::unique_ptr<Oric::Machine> _oric;
|
||||||
@ -29,14 +30,20 @@
|
|||||||
- (void)setUseFastLoadingHack:(BOOL)useFastLoadingHack {
|
- (void)setUseFastLoadingHack:(BOOL)useFastLoadingHack {
|
||||||
@synchronized(self) {
|
@synchronized(self) {
|
||||||
_useFastLoadingHack = useFastLoadingHack;
|
_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 {
|
- (void)setUseCompositeOutput:(BOOL)useCompositeOutput {
|
||||||
@synchronized(self) {
|
@synchronized(self) {
|
||||||
_useCompositeOutput = useCompositeOutput;
|
_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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user