diff --git a/Machines/Apple/AppleII/AppleII.cpp b/Machines/Apple/AppleII/AppleII.cpp index a04c82318..67435b4c5 100644 --- a/Machines/Apple/AppleII/AppleII.cpp +++ b/Machines/Apple/AppleII/AppleII.cpp @@ -347,29 +347,29 @@ template class ConcreteMachine: // Pick the required ROMs. using Target = Analyser::Static::AppleII::Target; - std::vector rom_names; + std::vector rom_descriptions; size_t rom_size = 12*1024; switch(target.model) { default: - rom_names.emplace_back("apple2-character.rom"); - rom_names.emplace_back("apple2o.rom"); + rom_descriptions.emplace_back("the basic Apple II character ROM", "apple2-character.rom", 2*1024, 0x64f415c6); + rom_descriptions.emplace_back("the original Apple II ROM", "apple2o.rom", 12*1024, 0xba210588); break; case Target::Model::IIplus: - rom_names.emplace_back("apple2-character.rom"); - rom_names.emplace_back("apple2.rom"); + rom_descriptions.emplace_back("the basic Apple II character ROM", "apple2-character.rom", 2*1024, 0x64f415c6); + rom_descriptions.emplace_back("the Apple II+ ROM", "apple2.rom", 12*1024, 0xf66f9c26); break; case Target::Model::IIe: rom_size += 3840; - rom_names.emplace_back("apple2eu-character.rom"); - rom_names.emplace_back("apple2eu.rom"); + rom_descriptions.emplace_back("the Apple IIe character ROM", "apple2eu-character.rom", 4*1024, 0x816a86f1); + rom_descriptions.emplace_back("the Apple IIe ROM", "apple2eu.rom", 32*1024, 0xe12be18d); break; case Target::Model::EnhancedIIe: rom_size += 3840; - rom_names.emplace_back("apple2e-character.rom"); - rom_names.emplace_back("apple2e.rom"); + rom_descriptions.emplace_back("the Enhanced Apple IIe character ROM", "apple2e-character.rom", 4*1024, 0x2651014d); + rom_descriptions.emplace_back("the Enhanced Apple IIe ROM", "apple2e.rom", 32*1024, 0x65989942); break; } - const auto roms = rom_fetcher("AppleII", rom_names); + const auto roms = rom_fetcher("AppleII", rom_descriptions); if(!roms[0] || !roms[1]) { throw ROMMachine::Error::MissingROMs; diff --git a/Machines/Apple/Macintosh/Macintosh.cpp b/Machines/Apple/Macintosh/Macintosh.cpp index 46730e890..3915edadd 100644 --- a/Machines/Apple/Macintosh/Macintosh.cpp +++ b/Machines/Apple/Macintosh/Macintosh.cpp @@ -70,33 +70,34 @@ template class ConcreteMachin // Select a ROM name and determine the proper ROM and RAM sizes // based on the machine model. using Model = Analyser::Static::Macintosh::Target::Model; - std::string rom_name; uint32_t ram_size, rom_size; + std::vector rom_descriptions; switch(model) { default: case Model::Mac128k: ram_size = 128*1024; rom_size = 64*1024; - rom_name = "mac128k.rom"; + rom_descriptions.emplace_back("the Macintosh 128k ROM", "mac128k.rom", 64*1024, 0x6d0c8a28); break; case Model::Mac512k: ram_size = 512*1024; rom_size = 64*1024; - rom_name = "mac512k.rom"; + rom_descriptions.emplace_back("the Macintosh 512k ROM", "mac512k.rom", 64*1024, 0xcf759e0d); break; case Model::Mac512ke: - case Model::MacPlus: + case Model::MacPlus: { ram_size = 512*1024; rom_size = 128*1024; - rom_name = "macplus.rom"; - break; + const std::initializer_list crc32s = { 0x4fa5b399, 0x7cacd18f, 0xb2102e8e }; + rom_descriptions.emplace_back("the Macintosh Plus ROM", "macplus.rom", 128*1024, crc32s); + } break; } ram_mask_ = (ram_size >> 1) - 1; rom_mask_ = (rom_size >> 1) - 1; video_.set_ram_mask(ram_mask_); // Grab a copy of the ROM and convert it into big-endian data. - const auto roms = rom_fetcher("Macintosh", { rom_name }); + const auto roms = rom_fetcher("Macintosh", rom_descriptions); if(!roms[0]) { throw ROMMachine::Error::MissingROMs; } diff --git a/Machines/ROMMachine.hpp b/Machines/ROMMachine.hpp index cd187bfe6..3b47fb41a 100644 --- a/Machines/ROMMachine.hpp +++ b/Machines/ROMMachine.hpp @@ -38,8 +38,8 @@ struct ROM { ROM(std::string descriptive_name, std::string file_name, size_t size, uint32_t crc32) : descriptive_name(descriptive_name), file_name(file_name), size(size), crc32s({crc32}) {} - ROM(std::string descriptive_name, std::string file_name, size_t size, std::vector &crc32s) : - descriptive_name(descriptive_name), file_name(file_name), size(size), crc32s(std::move(crc32s)) {} + ROM(std::string descriptive_name, std::string file_name, size_t size, std::initializer_list crc32s) : + descriptive_name(descriptive_name), file_name(file_name), size(size), crc32s(crc32s) {} }; /*!