mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-11 04:28:58 +00:00
Allowed the static analyser to specify a ZX80 or 81, and a memory model. Neither is respected yet in the machine.
This commit is contained in:
parent
e40d553045
commit
8116f85479
@ -50,7 +50,7 @@
|
|||||||
case StaticAnalyser::Target::Electron: return @"ElectronOptions";
|
case StaticAnalyser::Target::Electron: return @"ElectronOptions";
|
||||||
case StaticAnalyser::Target::Oric: return @"OricOptions";
|
case StaticAnalyser::Target::Oric: return @"OricOptions";
|
||||||
case StaticAnalyser::Target::Vic20: return @"Vic20Options";
|
case StaticAnalyser::Target::Vic20: return @"Vic20Options";
|
||||||
case StaticAnalyser::Target::ZX80: return @"ZX8081Options";
|
case StaticAnalyser::Target::ZX8081: return @"ZX8081Options";
|
||||||
default: return nil;
|
default: return nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@
|
|||||||
case StaticAnalyser::Target::Electron: return [[CSElectron alloc] init];
|
case StaticAnalyser::Target::Electron: return [[CSElectron alloc] init];
|
||||||
case StaticAnalyser::Target::Oric: return [[CSOric alloc] init];
|
case StaticAnalyser::Target::Oric: return [[CSOric alloc] init];
|
||||||
case StaticAnalyser::Target::Vic20: return [[CSVic20 alloc] init];
|
case StaticAnalyser::Target::Vic20: return [[CSVic20 alloc] init];
|
||||||
case StaticAnalyser::Target::ZX80: return [[CSZX8081 alloc] init];
|
case StaticAnalyser::Target::ZX8081: return [[CSZX8081 alloc] init];
|
||||||
default: return nil;
|
default: return nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,12 @@ enum class Atari2600PagingModel {
|
|||||||
Pitfall2
|
Pitfall2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class ZX8081MemoryModel {
|
||||||
|
Unexpanded,
|
||||||
|
SixteenKB,
|
||||||
|
SixtyFourKB
|
||||||
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
A list of disks, tapes and cartridges plus information about the machine to which to attach them and its configuration,
|
A list of disks, tapes and cartridges plus information about the machine to which to attach them and its configuration,
|
||||||
and instructions on how to launch the software attached, plus a measure of confidence in this target's correctness.
|
and instructions on how to launch the software attached, plus a measure of confidence in this target's correctness.
|
||||||
@ -50,7 +56,7 @@ struct Target {
|
|||||||
Electron,
|
Electron,
|
||||||
Vic20,
|
Vic20,
|
||||||
Oric,
|
Oric,
|
||||||
ZX80
|
ZX8081
|
||||||
} machine;
|
} machine;
|
||||||
float probability;
|
float probability;
|
||||||
|
|
||||||
@ -75,6 +81,11 @@ struct Target {
|
|||||||
Vic20MemoryModel memory_model;
|
Vic20MemoryModel memory_model;
|
||||||
bool has_c1540;
|
bool has_c1540;
|
||||||
} vic20;
|
} vic20;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
ZX8081MemoryModel memory_model;
|
||||||
|
bool isZX81;
|
||||||
|
} zx8081;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string loadingCommand;
|
std::string loadingCommand;
|
||||||
|
@ -36,9 +36,16 @@ void StaticAnalyser::ZX8081::AddTargets(
|
|||||||
if(!tapes.empty()) {
|
if(!tapes.empty()) {
|
||||||
std::vector<Storage::Data::ZX8081::File> files = GetFiles(tapes.front());
|
std::vector<Storage::Data::ZX8081::File> files = GetFiles(tapes.front());
|
||||||
if(!files.empty()) {
|
if(!files.empty()) {
|
||||||
// TODO: check files for machine type, memory size.
|
|
||||||
StaticAnalyser::Target target;
|
StaticAnalyser::Target target;
|
||||||
target.machine = Target::ZX80;
|
target.machine = Target::ZX8081;
|
||||||
|
target.zx8081.isZX81 = files.front().isZX81;
|
||||||
|
if(files.front().data.size() > 16384) {
|
||||||
|
target.zx8081.memory_model = ZX8081MemoryModel::SixtyFourKB;
|
||||||
|
} else if(files.front().data.size() > 1024) {
|
||||||
|
target.zx8081.memory_model = ZX8081MemoryModel::SixteenKB;
|
||||||
|
} else {
|
||||||
|
target.zx8081.memory_model = ZX8081MemoryModel::Unexpanded;
|
||||||
|
}
|
||||||
target.tapes = tapes;
|
target.tapes = tapes;
|
||||||
destination.push_back(target);
|
destination.push_back(target);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user