mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +00:00
Avoid potential lengthy startup; work towards display option.
This commit is contained in:
parent
fd298ffbe9
commit
1c7f8841f4
@ -73,6 +73,16 @@ class CGA {
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets the type of display.
|
||||
void set_display_type(Outputs::Display::DisplayType display_type) {
|
||||
outputter_.crt.set_display_type(display_type);
|
||||
}
|
||||
|
||||
/// Gets the type of display.
|
||||
Outputs::Display::DisplayType get_display_type() const {
|
||||
return outputter_.crt.get_display_type();
|
||||
}
|
||||
|
||||
// MARK: - Call-ins for ScanProducer.
|
||||
|
||||
void set_scan_target(Outputs::Display::ScanTarget *scan_target) {
|
||||
@ -92,8 +102,9 @@ class CGA {
|
||||
CRTCOutputter() :
|
||||
crt(910, 8, Outputs::Display::Type::NTSC60, Outputs::Display::InputDataType::Red2Green2Blue2)
|
||||
{
|
||||
// crt.set_visible_area(Outputs::Display::Rect(0.1072f, 0.1f, 0.842105263157895f, 0.842105263157895f));
|
||||
crt.set_visible_area(Outputs::Display::Rect(0.097f, 0.095f, 0.82f, 0.82f));
|
||||
crt.set_display_type(Outputs::Display::DisplayType::CompositeColour); // TODO: needs to be a user option.
|
||||
// crt.set_display_type(Outputs::Display::DisplayType::RGB); // TODO: needs to be a user option.
|
||||
}
|
||||
|
||||
void set_mode(uint8_t control) {
|
||||
@ -341,7 +352,7 @@ class CGA {
|
||||
} outputter_;
|
||||
Motorola::CRTC::CRTC6845<CRTCOutputter, Motorola::CRTC::CursorType::MDA> crtc_;
|
||||
|
||||
int full_clock_;
|
||||
int full_clock_ = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ class MDA {
|
||||
} outputter_;
|
||||
Motorola::CRTC::CRTC6845<CRTCOutputter, Motorola::CRTC::CursorType::MDA> crtc_;
|
||||
|
||||
int full_clock_;
|
||||
int full_clock_ = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,8 @@
|
||||
#ifndef PCCompatible_hpp
|
||||
#define PCCompatible_hpp
|
||||
|
||||
#include "../../Configurable/Configurable.hpp"
|
||||
#include "../../Configurable/StandardOptions.hpp"
|
||||
#include "../../Analyser/Static/StaticAnalyser.hpp"
|
||||
#include "../ROMMachine.hpp"
|
||||
|
||||
@ -26,6 +28,23 @@ class Machine {
|
||||
const Analyser::Static::Target *target,
|
||||
const ROMMachine::ROMFetcher &rom_fetcher
|
||||
);
|
||||
|
||||
/// Defines the runtime options [sometimes] available for a PC.
|
||||
class Options:
|
||||
public Reflection::StructImpl<Options>,
|
||||
public Configurable::DisplayOption<Options>
|
||||
{
|
||||
friend Configurable::DisplayOption<Options>;
|
||||
public:
|
||||
Options(Configurable::OptionsType) :
|
||||
Configurable::DisplayOption<Options>(Configurable::Display::RGB)
|
||||
{
|
||||
if(needs_declare()) {
|
||||
declare_display_option();
|
||||
limit_enum(&output, Configurable::Display::RGB, Configurable::Display::CompositeColour, -1);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ std::map<std::string, std::unique_ptr<Reflection::Struct>> Machine::AllOptionsBy
|
||||
Emplace(MasterSystem, Sega::MasterSystem::Machine);
|
||||
Emplace(MSX, MSX::Machine);
|
||||
Emplace(Oric, Oric::Machine);
|
||||
Emplace(PCCompatible, PCCompatible::Machine);
|
||||
Emplace(Vic20, Commodore::Vic20::Machine);
|
||||
Emplace(ZX8081, Sinclair::ZX8081::Machine);
|
||||
Emplace(ZXSpectrum, Sinclair::ZXSpectrum::Machine);
|
||||
|
Loading…
Reference in New Issue
Block a user