mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-23 20:29:42 +00:00
Corrects longstanding survival of camel case in the analyser's loadingCommand
.
This commit is contained in:
parent
2cc1a2684a
commit
76af0228dd
@ -901,8 +901,8 @@ class ConcreteMachine:
|
||||
read_pointers_[3] = roms_[upper_rom_].data();
|
||||
|
||||
// Type whatever is required.
|
||||
if(target.loadingCommand.length()) {
|
||||
set_typer_for_string(target.loadingCommand.c_str());
|
||||
if(target.loading_command.length()) {
|
||||
set_typer_for_string(target.loading_command.c_str());
|
||||
}
|
||||
|
||||
insert_media(target.media);
|
||||
|
@ -347,8 +347,8 @@ class ConcreteMachine:
|
||||
}
|
||||
|
||||
void configure_as_target(const StaticAnalyser::Target &target) override final {
|
||||
if(target.loadingCommand.length()) {
|
||||
set_typer_for_string(target.loadingCommand.c_str());
|
||||
if(target.loading_command.length()) {
|
||||
set_typer_for_string(target.loading_command.c_str());
|
||||
}
|
||||
|
||||
switch(target.vic20.memory_model) {
|
||||
|
@ -114,8 +114,8 @@ class ConcreteMachine:
|
||||
}
|
||||
|
||||
void configure_as_target(const StaticAnalyser::Target &target) override final {
|
||||
if(target.loadingCommand.length()) {
|
||||
set_typer_for_string(target.loadingCommand.c_str());
|
||||
if(target.loading_command.length()) {
|
||||
set_typer_for_string(target.loading_command.c_str());
|
||||
}
|
||||
|
||||
if(target.acorn.should_shift_restart) {
|
||||
|
@ -261,8 +261,8 @@ class ConcreteMachine:
|
||||
microdisc_.set_delegate(this);
|
||||
}
|
||||
|
||||
if(target.loadingCommand.length()) {
|
||||
set_typer_for_string(target.loadingCommand.c_str());
|
||||
if(target.loading_command.length()) {
|
||||
set_typer_for_string(target.loading_command.c_str());
|
||||
}
|
||||
|
||||
if(target.oric.use_atmos_rom) {
|
||||
|
@ -278,8 +278,8 @@ template<bool is_zx81> class ConcreteMachine:
|
||||
}
|
||||
Memory::Fuzz(ram_);
|
||||
|
||||
if(target.loadingCommand.length()) {
|
||||
set_typer_for_string(target.loadingCommand.c_str());
|
||||
if(target.loading_command.length()) {
|
||||
set_typer_for_string(target.loading_command.c_str());
|
||||
}
|
||||
|
||||
insert_media(target.media);
|
||||
|
@ -96,7 +96,7 @@ void StaticAnalyser::Acorn::AddTargets(const Media &media, std::list<Target> &de
|
||||
|
||||
// Inspect first file. If it's protected or doesn't look like BASIC
|
||||
// then the loading command is *RUN. Otherwise it's CHAIN"".
|
||||
target.loadingCommand = is_basic ? "CHAIN\"\"\n" : "*RUN\n";
|
||||
target.loading_command = is_basic ? "CHAIN\"\"\n" : "*RUN\n";
|
||||
|
||||
target.media.tapes = media.tapes;
|
||||
}
|
||||
@ -116,7 +116,7 @@ void StaticAnalyser::Acorn::AddTargets(const Media &media, std::list<Target> &de
|
||||
if(bootOption != Catalogue::BootOption::None)
|
||||
target.acorn.should_shift_restart = true;
|
||||
else
|
||||
target.loadingCommand = "*CAT\n";
|
||||
target.loading_command = "*CAT\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ static void InspectCatalogue(
|
||||
|
||||
// If there's just one file, run that.
|
||||
if(candidate_files.size() == 1) {
|
||||
target.loadingCommand = RunCommandFor(*candidate_files[0]);
|
||||
target.loading_command = RunCommandFor(*candidate_files[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ static void InspectCatalogue(
|
||||
}
|
||||
if(basic_files == 1 || implicit_suffixed_files == 1) {
|
||||
std::size_t selected_file = (basic_files == 1) ? last_basic_file : last_implicit_suffixed_file;
|
||||
target.loadingCommand = RunCommandFor(*candidate_files[selected_file]);
|
||||
target.loading_command = RunCommandFor(*candidate_files[selected_file]);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -143,14 +143,14 @@ static void InspectCatalogue(
|
||||
if(name_counts.size() == 2) {
|
||||
for(auto &pair : name_counts) {
|
||||
if(pair.second == 1) {
|
||||
target.loadingCommand = RunCommandFor(*candidate_files[indices_by_name[pair.first]]);
|
||||
target.loading_command = RunCommandFor(*candidate_files[indices_by_name[pair.first]]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Desperation.
|
||||
target.loadingCommand = "cat\n";
|
||||
target.loading_command = "cat\n";
|
||||
}
|
||||
|
||||
static bool CheckBootSector(const std::shared_ptr<Storage::Disk::Disk> &disk, StaticAnalyser::Target &target) {
|
||||
@ -169,7 +169,7 @@ static bool CheckBootSector(const std::shared_ptr<Storage::Disk::Disk> &disk, St
|
||||
|
||||
// This is a system disk, then launch it as though it were CP/M.
|
||||
if(!matched) {
|
||||
target.loadingCommand = "|cpm\n";
|
||||
target.loading_command = "|cpm\n";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -191,7 +191,7 @@ void StaticAnalyser::AmstradCPC::AddTargets(const Media &media, std::list<Target
|
||||
// Ugliness flows here: assume the CPC isn't smart enough to pause between pressing
|
||||
// enter and responding to the follow-on prompt to press a key, so just type for
|
||||
// a while. Yuck!
|
||||
target.loadingCommand = "|tape\nrun\"\n1234567890";
|
||||
target.loading_command = "|tape\nrun\"\n1234567890";
|
||||
}
|
||||
|
||||
if(!target.media.disks.empty()) {
|
||||
|
@ -82,7 +82,7 @@ void StaticAnalyser::Commodore::AddTargets(const Media &media, std::list<Target>
|
||||
string_stream << "1";
|
||||
}
|
||||
string_stream << "\nRUN\n";
|
||||
target.loadingCommand = string_stream.str();
|
||||
target.loading_command = string_stream.str();
|
||||
|
||||
// make a first guess based on loading address
|
||||
switch(files.front().starting_address) {
|
||||
|
@ -61,9 +61,9 @@ void StaticAnalyser::MSX::AddTargets(const Media &media, std::list<Target> &dest
|
||||
std::vector<File> files_on_tape = GetFiles(tape);
|
||||
if(!files_on_tape.empty()) {
|
||||
switch(files_on_tape.front().type) {
|
||||
case File::Type::ASCII: target.loadingCommand = "RUN\"CAS:\n"; break;
|
||||
case File::Type::TokenisedBASIC: target.loadingCommand = "CLOAD\nRUN\n"; break;
|
||||
case File::Type::Binary: target.loadingCommand = "BLOAD\"CAS:\",R\n"; break;
|
||||
case File::Type::ASCII: target.loading_command = "RUN\"CAS:\n"; break;
|
||||
case File::Type::TokenisedBASIC: target.loading_command = "CLOAD\nRUN\n"; break;
|
||||
case File::Type::Binary: target.loading_command = "BLOAD\"CAS:\",R\n"; break;
|
||||
default: break;
|
||||
}
|
||||
target.media.tapes.push_back(tape);
|
||||
|
@ -97,7 +97,7 @@ void StaticAnalyser::Oric::AddTargets(const Media &media, std::list<Target> &des
|
||||
}
|
||||
|
||||
target.media.tapes.push_back(tape);
|
||||
target.loadingCommand = "CLOAD\"\"\n";
|
||||
target.loading_command = "CLOAD\"\"\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ struct Target {
|
||||
} amstradcpc;
|
||||
};
|
||||
|
||||
std::string loadingCommand;
|
||||
std::string loading_command;
|
||||
Media media;
|
||||
};
|
||||
|
||||
|
@ -56,9 +56,9 @@ void StaticAnalyser::ZX8081::AddTargets(const Media &media, std::list<Target> &d
|
||||
|
||||
// TODO: how to run software once loaded? Might require a BASIC detokeniser.
|
||||
if(target.zx8081.isZX81) {
|
||||
target.loadingCommand = "J\"\"\n";
|
||||
target.loading_command = "J\"\"\n";
|
||||
} else {
|
||||
target.loadingCommand = "W\n";
|
||||
target.loading_command = "W\n";
|
||||
}
|
||||
|
||||
destination.push_back(target);
|
||||
|
Loading…
Reference in New Issue
Block a user