mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-12 00:30:31 +00:00
Load ROMs.
This commit is contained in:
parent
06a005321e
commit
949cfcfa69
@ -19,11 +19,17 @@ namespace {
|
||||
class ConcreteMachine:
|
||||
public MachineTypes::TimedMachine,
|
||||
public MachineTypes::ScanProducer,
|
||||
public MachineTypes::MediaTarget,
|
||||
public Machine {
|
||||
public:
|
||||
ConcreteMachine(const Analyser::Static::Commodore::Target &target, const ROMMachine::ROMFetcher &rom_fetcher) {
|
||||
(void)target;
|
||||
(void)rom_fetcher;
|
||||
const ROM::Request request = ROM::Request(ROM::Name::Plus4BASIC) && ROM::Request(ROM::Name::Plus4KernelPALv5);
|
||||
auto roms = rom_fetcher(request);
|
||||
if(!request.validate(roms)) {
|
||||
throw ROMMachine::Error::MissingROMs;
|
||||
}
|
||||
|
||||
insert_media(target.media);
|
||||
}
|
||||
|
||||
private:
|
||||
@ -36,6 +42,10 @@ private:
|
||||
|
||||
void run_for(const Cycles) final {
|
||||
}
|
||||
|
||||
bool insert_media(const Analyser::Static::Media &) final {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ struct Request {
|
||||
bool empty();
|
||||
|
||||
/// @returns what remains of this ROM request given that everything in @c map has been found.
|
||||
Request subtract(const ROM::Map &map) const;
|
||||
Request subtract(const Map &map) const;
|
||||
|
||||
enum class ListType {
|
||||
Any, All, Single
|
||||
@ -303,7 +303,7 @@ private:
|
||||
const std::function<void(void)> &exit_list,
|
||||
const std::function<void(ROM::Request::ListType type, const ROM::Description &, bool is_optional, size_t remaining)> &add_item
|
||||
) const;
|
||||
bool subtract(const ROM::Map &map);
|
||||
bool subtract(const Map &map);
|
||||
void sort() {
|
||||
// Don't do a full sort, but move anything optional to the back.
|
||||
// This makes them print more nicely; it's a human-facing tweak only.
|
||||
|
12
ROMImages/Plus4/readme.txt
Normal file
12
ROMImages/Plus4/readme.txt
Normal file
@ -0,0 +1,12 @@
|
||||
ROM files would ordinarily go here; the copyright status of these is uncertain so they have not been included in this repository.
|
||||
|
||||
Expected files:
|
||||
|
||||
At least one of:
|
||||
kernal.318004-03.bin — the PAL kernel, v3;
|
||||
kernal.318004-04.bin — the PAL kernel, v4; and
|
||||
kernal.318004-05.bin — the PAL kernel, v5.
|
||||
|
||||
|
||||
And:
|
||||
basic.318006-01.bin — the BASIC 3.5 ROM.
|
Loading…
x
Reference in New Issue
Block a user