Get to being able to use an MO6 as the usual target machine.
This commit is contained in:
1 parent
1355ae6448
commit
7051cee437
3 files changed
+28
-5
No files matched your search
@@ -58,6 +58,8 @@ CartridgeList validated(const CartridgeList &cartridges) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static constexpr bool DefaultMO6 = true;
|
||||
|
||||
}
|
||||
|
||||
Analyser::Static::TargetList Analyser::Static::Thomson::GetTargets(
|
||||
@@ -71,6 +73,10 @@ Analyser::Static::TargetList Analyser::Static::Thomson::GetTargets(
|
||||
TargetList destination;
|
||||
auto target = std::make_unique<MOTarget>();
|
||||
|
||||
if(DefaultMO6) {
|
||||
target->model = MOTarget::Model::MO6v3;
|
||||
}
|
||||
|
||||
if(!media.tapes.empty()) {
|
||||
Storage::Tape::Thomson::MO::Parser parser;
|
||||
auto &tape = media.tapes.front();
|
||||
@@ -85,10 +91,18 @@ Analyser::Static::TargetList Analyser::Static::Thomson::GetTargets(
|
||||
// in ->data.
|
||||
static constexpr size_t TypeOffset = 0xb;
|
||||
if(!first->type && first->data.size() > TypeOffset) {
|
||||
if(!first->data[TypeOffset]) { // File type; 0 = BASIC, 1 = DATA; 2 = binary.
|
||||
target->loading_command = L"RUN\"\n";
|
||||
const auto command = [&]() -> std::wstring {
|
||||
if(!first->data[TypeOffset]) { // File type; 0 = BASIC, 1 = DATA; 2 = binary.
|
||||
return L"RUN\"";
|
||||
} else {
|
||||
return L"LOADM\"\",,R";
|
||||
}
|
||||
};
|
||||
|
||||
if(DefaultMO6) {
|
||||
target->loading_command = std::wstring(L"1 ") + command() + L"\n";
|
||||
} else {
|
||||
target->loading_command = L"LOADM\"\",,R\n";
|
||||
target->loading_command = command() + L"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,10 +112,19 @@ Analyser::Static::TargetList Analyser::Static::Thomson::GetTargets(
|
||||
if(!media.disks.empty()) {
|
||||
target->floppy = MOTarget::Floppy::CD90_640;
|
||||
target->media.disks = media.disks;
|
||||
if(DefaultMO6) {
|
||||
target->loading_command = L"1";
|
||||
}
|
||||
}
|
||||
|
||||
if(!media.cartridges.empty()) {
|
||||
target->media.cartridges = is_confident ? media.cartridges : validated(media.cartridges);
|
||||
|
||||
// Upon survey, it seemed that there are no catridges that require or that do anything additional on an MO6.
|
||||
// So switch to an MO5 for faster launch.
|
||||
if(!target->media.cartridges.empty()) {
|
||||
target->model = MOTarget::Model::MO5v11;
|
||||
}
|
||||
}
|
||||
|
||||
if(!target->media.empty()) {
|
||||
|
||||
@@ -22,7 +22,7 @@ struct MOTarget: public Analyser::Static::Target, public Reflection::StructImpl<
|
||||
Floppy floppy = Floppy::None;
|
||||
|
||||
ReflectableEnum(Model, MO5v1, MO5v11, MO6v1, MO6v2, MO6v3, Prodest128);
|
||||
Model model = Model::MO5v11;
|
||||
Model model = Model::MO6v3;
|
||||
|
||||
MOTarget() : Analyser::Static::Target(Machine::ThomsonMO) {}
|
||||
|
||||
|
||||
@@ -664,7 +664,7 @@ private:
|
||||
|
||||
HalfCycles typer_delay(const std::wstring &) const final {
|
||||
if(m6809_.template get<CPU::M6809::Line::PowerOnReset>()) {
|
||||
return Cycles(1'000'000);
|
||||
return is_mo6 ? Cycles(1'750'000) : Cycles(1'000'000);
|
||||
} else {
|
||||
return Cycles(0);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user