mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-31 14:29:25 +00:00
Merge pull request #915 from TomHarte/SpectrumSDLOptions
Adds display of Spectrum command-line options.
This commit is contained in:
commit
2a9c73a1d3
@ -32,7 +32,7 @@ class Machine {
|
|||||||
class Options: public Reflection::StructImpl<Options>, public Configurable::QuickloadOption<Options> {
|
class Options: public Reflection::StructImpl<Options>, public Configurable::QuickloadOption<Options> {
|
||||||
friend Configurable::QuickloadOption<Options>;
|
friend Configurable::QuickloadOption<Options>;
|
||||||
public:
|
public:
|
||||||
bool automatic_tape_motor_control;
|
bool automatic_tape_motor_control = true;
|
||||||
|
|
||||||
Options(Configurable::OptionsType type):
|
Options(Configurable::OptionsType type):
|
||||||
Configurable::QuickloadOption<Options>(type == Configurable::OptionsType::UserFriendly),
|
Configurable::QuickloadOption<Options>(type == Configurable::OptionsType::UserFriendly),
|
||||||
|
@ -224,6 +224,17 @@ template<Model model> class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch(cycle.operation) {
|
switch(cycle.operation) {
|
||||||
|
case CPU::Z80::PartialMachineCycle::Input:
|
||||||
|
case CPU::Z80::PartialMachineCycle::Output:
|
||||||
|
case CPU::Z80::PartialMachineCycle::Read:
|
||||||
|
case CPU::Z80::PartialMachineCycle::Write:
|
||||||
|
case CPU::Z80::PartialMachineCycle::ReadOpcode:
|
||||||
|
case CPU::Z80::PartialMachineCycle::Interrupt:
|
||||||
|
// For these, carry on into the actual handler, below.
|
||||||
|
break;
|
||||||
|
|
||||||
|
// For anything else that isn't listed below, just advance
|
||||||
|
// time and conclude here.
|
||||||
default:
|
default:
|
||||||
advance(cycle.length);
|
advance(cycle.length);
|
||||||
return HalfCycles(0);
|
return HalfCycles(0);
|
||||||
@ -250,7 +261,7 @@ template<Model model> class ConcreteMachine:
|
|||||||
|
|
||||||
advance(cycle.length + delay);
|
advance(cycle.length + delay);
|
||||||
return delay;
|
return delay;
|
||||||
}
|
} break;
|
||||||
|
|
||||||
case PartialMachineCycle::ReadOpcodeStart:
|
case PartialMachineCycle::ReadOpcodeStart:
|
||||||
case PartialMachineCycle::ReadStart:
|
case PartialMachineCycle::ReadStart:
|
||||||
@ -263,7 +274,7 @@ template<Model model> class ConcreteMachine:
|
|||||||
advance(cycle.length + delay);
|
advance(cycle.length + delay);
|
||||||
return delay;
|
return delay;
|
||||||
}
|
}
|
||||||
}
|
} break;
|
||||||
|
|
||||||
case PartialMachineCycle::Internal: {
|
case PartialMachineCycle::Internal: {
|
||||||
// Whatever's on the address bus will remain there, without IOREQ or
|
// Whatever's on the address bus will remain there, without IOREQ or
|
||||||
@ -284,15 +295,7 @@ template<Model model> class ConcreteMachine:
|
|||||||
advance(cycle.length + delay);
|
advance(cycle.length + delay);
|
||||||
return delay;
|
return delay;
|
||||||
}
|
}
|
||||||
}
|
} break;
|
||||||
|
|
||||||
case CPU::Z80::PartialMachineCycle::Input:
|
|
||||||
case CPU::Z80::PartialMachineCycle::Output:
|
|
||||||
case CPU::Z80::PartialMachineCycle::Read:
|
|
||||||
case CPU::Z80::PartialMachineCycle::Write:
|
|
||||||
case CPU::Z80::PartialMachineCycle::ReadOpcode:
|
|
||||||
// For these, carry on into the actual handler, below.
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,6 +499,13 @@ template<Model model> class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case PartialMachineCycle::Interrupt:
|
||||||
|
// At least one piece of Spectrum software, Escape from M.O.N.J.A.S. explicitly
|
||||||
|
// assumes that a 0xff value will be on the bus during an interrupt acknowledgment.
|
||||||
|
// I wasn't otherwise aware that this value is reliable.
|
||||||
|
*cycle.value = 0xff;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return HalfCycles(0);
|
return HalfCycles(0);
|
||||||
|
@ -31,7 +31,7 @@ class Machine {
|
|||||||
friend Configurable::DisplayOption<Options>;
|
friend Configurable::DisplayOption<Options>;
|
||||||
friend Configurable::QuickloadOption<Options>;
|
friend Configurable::QuickloadOption<Options>;
|
||||||
public:
|
public:
|
||||||
bool automatic_tape_motor_control;
|
bool automatic_tape_motor_control = true;
|
||||||
|
|
||||||
Options(Configurable::OptionsType type) :
|
Options(Configurable::OptionsType type) :
|
||||||
Configurable::DisplayOption<Options>(type == Configurable::OptionsType::UserFriendly ? Configurable::Display::RGB : Configurable::Display::CompositeColour),
|
Configurable::DisplayOption<Options>(type == Configurable::OptionsType::UserFriendly ? Configurable::Display::RGB : Configurable::Display::CompositeColour),
|
||||||
|
@ -182,6 +182,7 @@ std::vector<std::string> Machine::AllMachines(Type type, bool long_names) {
|
|||||||
AddName(Oric);
|
AddName(Oric);
|
||||||
AddName(Vic20);
|
AddName(Vic20);
|
||||||
AddName(ZX8081);
|
AddName(ZX8081);
|
||||||
|
AddName(ZXSpectrum);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef AddName
|
#undef AddName
|
||||||
|
Loading…
Reference in New Issue
Block a user