mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-08 14:25:05 +00:00
Avoid potential lengthy startup; work towards display option.
This commit is contained in:
@@ -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.
|
// MARK: - Call-ins for ScanProducer.
|
||||||
|
|
||||||
void set_scan_target(Outputs::Display::ScanTarget *scan_target) {
|
void set_scan_target(Outputs::Display::ScanTarget *scan_target) {
|
||||||
@@ -92,8 +102,9 @@ class CGA {
|
|||||||
CRTCOutputter() :
|
CRTCOutputter() :
|
||||||
crt(910, 8, Outputs::Display::Type::NTSC60, Outputs::Display::InputDataType::Red2Green2Blue2)
|
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::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) {
|
void set_mode(uint8_t control) {
|
||||||
@@ -341,7 +352,7 @@ class CGA {
|
|||||||
} outputter_;
|
} outputter_;
|
||||||
Motorola::CRTC::CRTC6845<CRTCOutputter, Motorola::CRTC::CursorType::MDA> crtc_;
|
Motorola::CRTC::CRTC6845<CRTCOutputter, Motorola::CRTC::CursorType::MDA> crtc_;
|
||||||
|
|
||||||
int full_clock_;
|
int full_clock_ = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -222,7 +222,7 @@ class MDA {
|
|||||||
} outputter_;
|
} outputter_;
|
||||||
Motorola::CRTC::CRTC6845<CRTCOutputter, Motorola::CRTC::CursorType::MDA> crtc_;
|
Motorola::CRTC::CRTC6845<CRTCOutputter, Motorola::CRTC::CursorType::MDA> crtc_;
|
||||||
|
|
||||||
int full_clock_;
|
int full_clock_ = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,8 @@
|
|||||||
#ifndef PCCompatible_hpp
|
#ifndef PCCompatible_hpp
|
||||||
#define PCCompatible_hpp
|
#define PCCompatible_hpp
|
||||||
|
|
||||||
|
#include "../../Configurable/Configurable.hpp"
|
||||||
|
#include "../../Configurable/StandardOptions.hpp"
|
||||||
#include "../../Analyser/Static/StaticAnalyser.hpp"
|
#include "../../Analyser/Static/StaticAnalyser.hpp"
|
||||||
#include "../ROMMachine.hpp"
|
#include "../ROMMachine.hpp"
|
||||||
|
|
||||||
@@ -26,6 +28,23 @@ class Machine {
|
|||||||
const Analyser::Static::Target *target,
|
const Analyser::Static::Target *target,
|
||||||
const ROMMachine::ROMFetcher &rom_fetcher
|
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(MasterSystem, Sega::MasterSystem::Machine);
|
||||||
Emplace(MSX, MSX::Machine);
|
Emplace(MSX, MSX::Machine);
|
||||||
Emplace(Oric, Oric::Machine);
|
Emplace(Oric, Oric::Machine);
|
||||||
|
Emplace(PCCompatible, PCCompatible::Machine);
|
||||||
Emplace(Vic20, Commodore::Vic20::Machine);
|
Emplace(Vic20, Commodore::Vic20::Machine);
|
||||||
Emplace(ZX8081, Sinclair::ZX8081::Machine);
|
Emplace(ZX8081, Sinclair::ZX8081::Machine);
|
||||||
Emplace(ZXSpectrum, Sinclair::ZXSpectrum::Machine);
|
Emplace(ZXSpectrum, Sinclair::ZXSpectrum::Machine);
|
||||||
|
Reference in New Issue
Block a user