1
0
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:
Thomas Harte 2018-04-23 20:20:14 -07:00
parent 4cbe5068a9
commit e92e06a5f4
10 changed files with 10 additions and 10 deletions

View File

@ -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?
}; };
} }

View File

@ -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",
{ {

View File

@ -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" });

View File

@ -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.

View File

@ -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;

View File

@ -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(

View File

@ -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",
{ {

View File

@ -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",
{ {

View File

@ -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",
{ {

View File

@ -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",
{ {