mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-12 00:30:31 +00:00
Doubled down on the ROMMachine::ROMFetcher typedef.
This commit is contained in:
parent
4cbe5068a9
commit
e92e06a5f4
@ -16,7 +16,7 @@ namespace Static {
|
|||||||
namespace AppleII {
|
namespace AppleII {
|
||||||
|
|
||||||
struct Target: public ::Analyser::Static::Target {
|
struct Target: public ::Analyser::Static::Target {
|
||||||
// TODO: probably some Disk II options here?
|
bool has_disk_; // TODO: Disk II versus IWM?
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -941,7 +941,7 @@ class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Obtains the system ROMs.
|
// Obtains the system ROMs.
|
||||||
bool set_rom_fetcher(const std::function<std::vector<std::unique_ptr<std::vector<uint8_t>>>(const std::string &machine, const std::vector<std::string> &names)> &roms_with_names) override {
|
bool set_rom_fetcher(const ROMMachine::ROMFetcher &roms_with_names) override {
|
||||||
auto roms = roms_with_names(
|
auto roms = roms_with_names(
|
||||||
"AmstradCPC",
|
"AmstradCPC",
|
||||||
{
|
{
|
||||||
|
@ -183,7 +183,7 @@ class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Obtains the system ROMs.
|
// Obtains the system ROMs.
|
||||||
bool set_rom_fetcher(const std::function<std::vector<std::unique_ptr<std::vector<uint8_t>>>(const std::string &machine, const std::vector<std::string> &names)> &roms_with_names) override {
|
bool set_rom_fetcher(const ROMMachine::ROMFetcher &roms_with_names) override {
|
||||||
auto roms = roms_with_names(
|
auto roms = roms_with_names(
|
||||||
"ColecoVision",
|
"ColecoVision",
|
||||||
{ "coleco.rom" });
|
{ "coleco.rom" });
|
||||||
|
@ -31,7 +31,7 @@ class Machine: public MachineBase, public ROMMachine::Machine {
|
|||||||
/*!
|
/*!
|
||||||
Sets the source for this drive's ROM image.
|
Sets the source for this drive's ROM image.
|
||||||
*/
|
*/
|
||||||
bool set_rom_fetcher(const std::function<std::vector<std::unique_ptr<std::vector<uint8_t>>>(const std::string &machine, const std::vector<std::string> &names)> &roms_with_names);
|
bool set_rom_fetcher(const ROMMachine::ROMFetcher &roms_with_names);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the serial bus to which this drive should attach itself.
|
Sets the serial bus to which this drive should attach itself.
|
||||||
|
@ -82,7 +82,7 @@ Cycles MachineBase::perform_bus_operation(CPU::MOS6502::BusOperation operation,
|
|||||||
return Cycles(1);
|
return Cycles(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Machine::set_rom_fetcher(const std::function<std::vector<std::unique_ptr<std::vector<uint8_t>>>(const std::string &machine, const std::vector<std::string> &names)> &roms_with_names) {
|
bool Machine::set_rom_fetcher(const ROMMachine::ROMFetcher &roms_with_names) {
|
||||||
std::string rom_name;
|
std::string rom_name;
|
||||||
switch(personality_) {
|
switch(personality_) {
|
||||||
case Personality::C1540: rom_name = "1540.bin"; break;
|
case Personality::C1540: rom_name = "1540.bin"; break;
|
||||||
|
@ -336,7 +336,7 @@ class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Obtains the system ROMs.
|
// Obtains the system ROMs.
|
||||||
bool set_rom_fetcher(const std::function<std::vector<std::unique_ptr<std::vector<uint8_t>>>(const std::string &machine, const std::vector<std::string> &names)> &roms_with_names) override {
|
bool set_rom_fetcher(const ROMMachine::ROMFetcher &roms_with_names) override {
|
||||||
rom_fetcher_ = roms_with_names;
|
rom_fetcher_ = roms_with_names;
|
||||||
|
|
||||||
auto roms = roms_with_names(
|
auto roms = roms_with_names(
|
||||||
|
@ -90,7 +90,7 @@ class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Obtains the system ROMs.
|
// Obtains the system ROMs.
|
||||||
bool set_rom_fetcher(const std::function<std::vector<std::unique_ptr<std::vector<uint8_t>>>(const std::string &machine, const std::vector<std::string> &names)> &roms_with_names) override {
|
bool set_rom_fetcher(const ROMMachine::ROMFetcher &roms_with_names) override {
|
||||||
auto roms = roms_with_names(
|
auto roms = roms_with_names(
|
||||||
"Electron",
|
"Electron",
|
||||||
{
|
{
|
||||||
|
@ -464,7 +464,7 @@ class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Obtains the system ROMs.
|
// Obtains the system ROMs.
|
||||||
bool set_rom_fetcher(const std::function<std::vector<std::unique_ptr<std::vector<uint8_t>>>(const std::string &machine, const std::vector<std::string> &names)> &roms_with_names) override {
|
bool set_rom_fetcher(const ROMMachine::ROMFetcher &roms_with_names) override {
|
||||||
auto roms = roms_with_names(
|
auto roms = roms_with_names(
|
||||||
"MSX",
|
"MSX",
|
||||||
{
|
{
|
||||||
|
@ -220,7 +220,7 @@ class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Obtains the system ROMs.
|
// Obtains the system ROMs.
|
||||||
bool set_rom_fetcher(const std::function<std::vector<std::unique_ptr<std::vector<uint8_t>>>(const std::string &machine, const std::vector<std::string> &names)> &roms_with_names) override {
|
bool set_rom_fetcher(const ROMMachine::ROMFetcher &roms_with_names) override {
|
||||||
auto roms = roms_with_names(
|
auto roms = roms_with_names(
|
||||||
"Oric",
|
"Oric",
|
||||||
{
|
{
|
||||||
|
@ -346,7 +346,7 @@ template<bool is_zx81> class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Obtains the system ROMs.
|
// Obtains the system ROMs.
|
||||||
bool set_rom_fetcher(const std::function<std::vector<std::unique_ptr<std::vector<uint8_t>>>(const std::string &machine, const std::vector<std::string> &names)> &roms_with_names) override {
|
bool set_rom_fetcher(const ROMMachine::ROMFetcher &roms_with_names) override {
|
||||||
const auto roms = roms_with_names(
|
const auto roms = roms_with_names(
|
||||||
"ZX8081",
|
"ZX8081",
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user