mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-26 08:29:33 +00:00
Expose speed as an option.
This commit is contained in:
parent
3a103217d1
commit
664890cead
@ -20,10 +20,17 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
|
|||||||
CGA);
|
CGA);
|
||||||
VideoAdaptor adaptor = VideoAdaptor::CGA;
|
VideoAdaptor adaptor = VideoAdaptor::CGA;
|
||||||
|
|
||||||
|
ReflectableEnum(Speed,
|
||||||
|
Original,
|
||||||
|
Fast);
|
||||||
|
Speed speed = Speed::Fast;
|
||||||
|
|
||||||
Target() : Analyser::Static::Target(Machine::PCCompatible) {
|
Target() : Analyser::Static::Target(Machine::PCCompatible) {
|
||||||
if(needs_declare()) {
|
if(needs_declare()) {
|
||||||
DeclareField(adaptor);
|
|
||||||
AnnounceEnum(VideoAdaptor);
|
AnnounceEnum(VideoAdaptor);
|
||||||
|
AnnounceEnum(Speed);
|
||||||
|
DeclareField(adaptor);
|
||||||
|
DeclareField(speed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1236,10 +1236,18 @@ Machine *Machine::PCCompatible(const Analyser::Static::Target *target, const ROM
|
|||||||
using Target = Analyser::Static::PCCompatible::Target;
|
using Target = Analyser::Static::PCCompatible::Target;
|
||||||
const Target *const pc_target = dynamic_cast<const Target *>(target);
|
const Target *const pc_target = dynamic_cast<const Target *>(target);
|
||||||
|
|
||||||
switch(pc_target->adaptor) {
|
if(pc_target->speed == Target::Speed::Fast) {
|
||||||
case VideoAdaptor::MDA: return new PCCompatible::ConcreteMachine<VideoAdaptor::MDA, false>(*pc_target, rom_fetcher);
|
switch(pc_target->adaptor) {
|
||||||
case VideoAdaptor::CGA: return new PCCompatible::ConcreteMachine<VideoAdaptor::CGA, false>(*pc_target, rom_fetcher);
|
case VideoAdaptor::MDA: return new PCCompatible::ConcreteMachine<VideoAdaptor::MDA, true>(*pc_target, rom_fetcher);
|
||||||
default: return nullptr;
|
case VideoAdaptor::CGA: return new PCCompatible::ConcreteMachine<VideoAdaptor::CGA, true>(*pc_target, rom_fetcher);
|
||||||
|
default: return nullptr;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch(pc_target->adaptor) {
|
||||||
|
case VideoAdaptor::MDA: return new PCCompatible::ConcreteMachine<VideoAdaptor::MDA, false>(*pc_target, rom_fetcher);
|
||||||
|
case VideoAdaptor::CGA: return new PCCompatible::ConcreteMachine<VideoAdaptor::CGA, false>(*pc_target, rom_fetcher);
|
||||||
|
default: return nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
</Testables>
|
</Testables>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Release"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
enableASanStackUseAfterReturn = "YES"
|
enableASanStackUseAfterReturn = "YES"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user