1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-06 01:28:57 +00:00

Merge pull request #915 from TomHarte/SpectrumSDLOptions

Adds display of Spectrum command-line options.
This commit is contained in:
Thomas Harte 2021-04-18 12:08:02 -04:00 committed by GitHub
commit 2a9c73a1d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 13 deletions

View File

@ -32,7 +32,7 @@ class Machine {
class Options: public Reflection::StructImpl<Options>, public Configurable::QuickloadOption<Options> {
friend Configurable::QuickloadOption<Options>;
public:
bool automatic_tape_motor_control;
bool automatic_tape_motor_control = true;
Options(Configurable::OptionsType type):
Configurable::QuickloadOption<Options>(type == Configurable::OptionsType::UserFriendly),

View File

@ -224,6 +224,17 @@ template<Model model> class ConcreteMachine:
}
} else {
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:
advance(cycle.length);
return HalfCycles(0);
@ -250,7 +261,7 @@ template<Model model> class ConcreteMachine:
advance(cycle.length + delay);
return delay;
}
} break;
case PartialMachineCycle::ReadOpcodeStart:
case PartialMachineCycle::ReadStart:
@ -263,7 +274,7 @@ template<Model model> class ConcreteMachine:
advance(cycle.length + delay);
return delay;
}
}
} break;
case PartialMachineCycle::Internal: {
// 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);
return delay;
}
}
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;
} break;
}
}
@ -496,6 +499,13 @@ template<Model model> class ConcreteMachine:
}
}
} 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);

View File

@ -31,7 +31,7 @@ class Machine {
friend Configurable::DisplayOption<Options>;
friend Configurable::QuickloadOption<Options>;
public:
bool automatic_tape_motor_control;
bool automatic_tape_motor_control = true;
Options(Configurable::OptionsType type) :
Configurable::DisplayOption<Options>(type == Configurable::OptionsType::UserFriendly ? Configurable::Display::RGB : Configurable::Display::CompositeColour),

View File

@ -182,6 +182,7 @@ std::vector<std::string> Machine::AllMachines(Type type, bool long_names) {
AddName(Oric);
AddName(Vic20);
AddName(ZX8081);
AddName(ZXSpectrum);
}
#undef AddName