1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-19 19:16:34 +00:00

Head in search of a more-compact form.

This commit is contained in:
Thomas Harte
2025-09-05 16:55:00 -04:00
parent 26f82e8143
commit c7ff2cece4
3 changed files with 288 additions and 284 deletions
+269 -281
View File
@@ -14,11 +14,16 @@
#include <iomanip>
#include <locale>
#include <sstream>
#include <unordered_map>
using namespace ROM;
namespace {
constexpr Name MaxName = Name::SpectrumPlus3;
size_t operator ""_kb(const unsigned long long kilobytes) {
return kilobytes * 1024;
}
}
Request::Request(Name name, bool optional) {
@@ -231,17 +236,245 @@ std::vector<Description> ROM::all_descriptions() {
return result;
}
std::optional<Description> Description::from_crc(uint32_t crc32) {
for(int name = 1; name <= MaxName; name++) {
const Description candidate = Description(ROM::Name(name));
const std::vector<Description> &Description::all_roms() {
using enum Name;
const auto found_crc = std::find(candidate.crc32s.begin(), candidate.crc32s.end(), crc32);
if(found_crc != candidate.crc32s.end()) {
return candidate;
}
}
static const std::vector<Description> descriptions = {
{AMSDOS, "AmstradCPC", "the Amstrad Disk Operating System", "amsdos.rom", 16_kb, 0x1fe22ecdu},
{CPC464Firmware, "AmstradCPC", "the CPC 464 firmware", "os464.rom", 16_kb, 0x815752dfu},
{CPC464BASIC, "AmstradCPC", "the CPC 464 BASIC ROM", "basic464.rom", 16_kb, 0x7d9a3bacu},
{CPC664Firmware, "AmstradCPC", "the CPC 664 firmware", "os664.rom", 16_kb, 0x3f5a6dc4u},
{CPC664BASIC, "AmstradCPC", "the CPC 664 BASIC ROM", "basic664.rom", 16_kb, 0x32fee492u},
{CPC6128Firmware, "AmstradCPC", "the CPC 6128 firmware", "os6128.rom", 16_kb, 0x0219bb74u},
{CPC6128BASIC, "AmstradCPC", "the CPC 6128 BASIC ROM", "basic6128.rom", 16_kb, 0xca6af63du},
return std::nullopt;
{AmigaKickstart10, "Amiga", "the Kickstart 1.0 ROM", "Kickstart-v1.0-1985-Commodore-A1000-NTSC.rom", 256_kb, 0x299790ffu},
{AmigaKickstart11, "Amiga", "the Kickstart 1.1 ROM", "Kickstart-v1.1-rev31.34-1985-Commodore-A1000.NTSC.rom", 256_kb, 0xd060572au},
{AmigaKickstart12, "Amiga", "the Kickstart 1.2 ROM", "Kickstart-v1.2-rev33.166-1986-Commodore-A1000.rom", 256_kb, 0x9ed783d0u},
{AmigaA500Kickstart13, "Amiga", "the A500/A1000/A2000/CDTV Kickstart 1.3 ROM", "Kickstart-v1.3-rev34.5-1987-Commodore-A500-A1000-A2000-CDTV.rom", 256_kb, 0xc4f0f55fu},
{AmigaA3000Kickstart13, "Amiga", "the A3000 Kickstart 1.3 ROM", "Kickstart-v1.3-rev34.5-1987-Commodore-A3000.rom", 256_kb, 0xe0f37258u},
{AmigaKickstart20, "Amiga", "the Kickstart 2.0 ROM", "Kickstart-v2.0-rev36.143-1990-Commodore-A3000.rom", 512_kb, 0xb333d3c6u},
{AmigaA500PlusKickstart204, "Amiga", "the A500+ Kickstart 2.04 ROM", "Kickstart-v2.04-rev37.175-1991-Commodore-A500plus.rom", 512_kb, 0xc3bdb240u},
{AmigaA600Kickstart205, "Amiga", "the Kickstart 2.05 ROM", "Kickstart-v2.05-rev37.299-1991-Commodore-A600.rom", 512_kb, 0x83028fb5u},
{AmigaA500Kickstart31, "Amiga", "the A500/A600/A2000 Kickstart 3.1 ROM", "Kickstart-v3.1-rev40.63-1993-Commodore-A500-A600-A2000.rom", 512_kb, 0xfc24ae0du},
{AmigaDiagROM121, "Amiga", "DiagROM 1.2.1", "16bit.bin", 512_kb, 0xf2ac0a3b},
{AppleIIEnhancedE, "AppleII", "the Enhanced Apple IIe ROM", "apple2e.rom", 32_kb, 0x65989942u},
{AppleIIe, "AppleII", "the Apple IIe ROM", "apple2eu.rom", 32_kb, 0xe12be18du},
{AppleIIPlus, "AppleII", "the Apple II+ ROM", "apple2.rom", 12_kb, 0xf66f9c26u},
{AppleIIOriginal, "AppleII", "the original Apple II ROM", "apple2o.rom", 12_kb, 0xba210588u},
{AppleIICharacter, "AppleII", "the basic Apple II character ROM", "apple2-character.rom", 2_kb, 0x64f415c6u},
{AppleIIeCharacter, "AppleII", "the Apple IIe character ROM", "apple2eu-character.rom", 4_kb, 0x816a86f1u},
{AppleIIEnhancedECharacter, "AppleII", "the Enhanced Apple IIe character ROM", "apple2e-character.rom", 4_kb, 0x2651014du},
{AppleIISCSICard, "AppleII", "the Apple II SCSI card ROM", "scsi.rom", 16_kb, 0x5aff85d3u},
{AppleIIgsROM01, "AppleIIgs", "the Apple IIgs ROM01", "apple2gs.rom", 128_kb, 0x42f124b0u},
{AppleIIgsROM03, "AppleIIgs", "the Apple IIgs ROM03", "apple2gs.rom2", 256_kb, 0xde7ddf29u},
{AppleIIgsCharacter, "AppleIIgs", "the Apple IIgs character ROM", "apple2gs.chr", 4_kb, 0x91e53cd8u},
{AppleIIgsMicrocontrollerROM03, "AppleIIgs", "the Apple IIgs ROM03 ADB microcontroller ROM", "341s0632-2", 4_kb, 0xe1c11fb0u},
{DiskIIBoot16Sector, "DiskII", "the Disk II 16-sector boot ROM", "boot-16.rom", 256, 0xce7144f6u},
{DiskIIStateMachine16Sector, "DiskII", "the Disk II 16-sector state machine ROM", "state-machine-16.rom", 256, std::initializer_list<uint32_t>{ 0x9796a238, 0xb72a2c70 }},
{DiskIIBoot13Sector, "DiskII", "the Disk II 13-sector boot ROM", "boot-13.rom", 256, 0xd34eb2ffu},
{DiskIIStateMachine13Sector, "DiskII", "the Disk II 13-sector state machine ROM", "state-machine-13.rom", 256, 0x62e22620u},
// {EnterpriseEXOS10, "Enterprise", "the Enterprise EXOS ROM v1.0", {"exos10.bin", "Exos (198x)(Enterprise).bin"}, 32 * 1024, 0x30b26387u},
// case Name::EnterpriseEXOS20: {
// const std::initializer_list<std::string> filenames = {"exos20.bin", "Expandible OS v2.0 (1984)(Intelligent Software).bin"};
// *this = Description(name, "Enterprise", "the Enterprise EXOS ROM v2.0", filenames, 32 * 1024, 0xd421795fu);
// } break;
// case Name::EnterpriseEXOS21: {
// const std::initializer_list<std::string> filenames = {"exos21.bin", "Expandible OS v2.1 (1985)(Intelligent Software).bin"};
// *this = Description(name, "Enterprise", "the Enterprise EXOS ROM v2.1", filenames, 32 * 1024, 0x982a3b44u);
// } break;
// case Name::EnterpriseEXOS23: {
// const std::initializer_list<std::string> filenames = {"exos23.bin", "Expandible OS v2.3 (1987)(Intelligent Software).bin"};
// *this = Description(name, "Enterprise", "the Enterprise EXOS ROM v2.1", filenames, 64 * 1024, 0x24838410u);
// } break;
// case Name::EnterpriseBASIC10: {
// const std::initializer_list<std::string> filenames = {"basic10.bin"};
// *this = Description(name, "Enterprise", "the Enterprise BASIC ROM v1.0", filenames, 16 * 1024, 0xd62e4fb7u);
// } break;
// case Name::EnterpriseBASIC10Part1: {
// const std::initializer_list<std::string> filenames = {"BASIC 1.0 - EPROM 1-2 (198x)(Enterprise).bin"};
// *this = Description(name, "Enterprise", "the Enterprise BASIC ROM v1.0, Part 1", filenames, 8193, 0x37bf48e1u);
// } break;
// case Name::EnterpriseBASIC10Part2: {
// const std::initializer_list<std::string> filenames = {"BASIC 1.0 - EPROM 2-2 (198x)(Enterprise).bin"};
// *this = Description(name, "Enterprise", "the Enterprise BASIC ROM v1.0, Part 2", filenames, 8193, 0xc5298c79u);
// } break;
// case Name::EnterpriseBASIC11: {
// const std::initializer_list<std::string> filenames = {"basic11.bin"};
// *this = Description(name, "Enterprise", "the Enterprise BASIC ROM v1.1", filenames, 16 * 1024, 0x683cf455u);
// } break;
// case Name::EnterpriseBASIC11Suffixed: {
// const std::initializer_list<std::string> filenames = {"BASIC 1.1 - EPROM 1.1 (198x)(Enterprise).bin"};
// *this = Description(name, "Enterprise", "the Enterprise BASIC ROM v1.1, with trailing byte", filenames, 16385, 0xc96b7602u);
// } break;
// case Name::EnterpriseBASIC21: {
// const std::initializer_list<std::string> filenames = {
// "basic21.bin",
// "BASIC Interpreter v2.1 (1985)(Intelligent Software).bin",
// "BASIC Interpreter v2.1 (1985)(Intelligent Software)[a].bin"
// };
// const std::initializer_list<uint32_t> crcs = { 0x55f96251, 0x683cf455 };
// *this = Description(name, "Enterprise", "the Enterprise BASIC ROM v2.1", filenames, 16 * 1024, crcs);
// } break;
//
// case Name::EnterpriseEPDOS: {
// const std::initializer_list<std::string> filenames = {"epdos.bin", "EPDOS v1.7 (19xx)(Haluska, Laszlo).bin"};
// *this = Description(name, "Enterprise", "the Enterprise EPDOS ROM", filenames, 32 * 1024, 0x201319ebu);
// } break;
// case Name::EnterpriseEXDOS: {
// const std::initializer_list<std::string> filenames = {"exdos.bin", "EX-DOS EPROM (198x)(Enterprise).bin"};
// *this = Description(name, "Enterprise", "the Enterprise EXDOS ROM", filenames, 16 * 1024, 0xe6daa0e9u);
// } break;
//
{Macintosh128k, "Macintosh", "the Macintosh 128k ROM", "mac128k.rom", 64_kb, 0x6d0c8a28u},
{Macintosh512k, "Macintosh", "the Macintosh 512k ROM", "mac512k.rom", 64_kb, 0xcf759e0du},
// case Name::MacintoshPlus: {
// const std::initializer_list<uint32_t> crcs = { 0x4fa5b399, 0x7cacd18f, 0xb2102e8e };
// *this = Description(name, "Macintosh", "the Macintosh Plus ROM", "macplus.rom", 128_kb, crcs);
// } break;
//
// case Name::AtariSTTOS100: *this = Description(name, "AtariST", "the UK TOS 1.00 ROM", "tos100.img", 192_kb, 0x1a586c64u); break;
// case Name::AtariSTTOS104: *this = Description(name, "AtariST", "the UK TOS 1.04 ROM", "tos104.img", 192_kb, 0xa50d1d43u); break;
//
// case Name::ColecoVisionBIOS:
// *this = Description(name, "ColecoVision", "the ColecoVision BIOS", "coleco.rom", 8_kb, 0x3aa93ef3u);
// break;
//
// case Name::ZX80: *this = Description(name, "ZX8081", "the ZX80 BASIC ROM", "zx80.rom", 4 * 1024, 0x4c7fc597u); break;
// case Name::ZX81: *this = Description(name, "ZX8081", "the ZX81 BASIC ROM", "zx81.rom", 8 * 1024, 0x4b1dd6ebu); break;
//
// case Name::Spectrum48k: *this = Description(name, "ZXSpectrum", "the 48kb ROM", "48.rom", 16 * 1024, 0xddee531fu); break;
// case Name::Spectrum128k: *this = Description(name, "ZXSpectrum", "the 128kb ROM", "128.rom", 32 * 1024, 0x2cbe8995u); break;
// case Name::SpecrumPlus2: *this = Description(name, "ZXSpectrum", "the +2 ROM", "plus2.rom", 32 * 1024, 0xe7a517dcu); break;
// case Name::SpectrumPlus3: {
// const std::initializer_list<uint32_t> crcs = { 0x96e3c17a, 0xbe0d9ec4 };
// *this = Description(name, "ZXSpectrum", "the +2a/+3 ROM", "plus3.rom", 64 * 1024, crcs);
// } break;
//
// case Name::AcornBASICII: *this = Description(name, "Electron", "the Acorn BASIC II ROM", "basic.rom", 16_kb, 0x79434781u); break;
// case Name::PRESADFSSlot1: *this = Description(name, "Electron", "the E00 ADFS ROM, first slot", "ADFS-E00_1.rom", 16_kb, 0x51523993u); break;
// case Name::PRESADFSSlot2: *this = Description(name, "Electron", "the E00 ADFS ROM, second slot", "ADFS-E00_2.rom", 16_kb, 0x8d17de0eu); break;
// case Name::AcornADFS: *this = Description(name, "Electron", "the Acorn ADFS ROM", "adfs.rom", 16_kb, 0x3289bdc6u); break;
// case Name::Acorn1770DFS: *this = Description(name, "Electron", "the 1770 DFS ROM", "DFS-1770-2.20.rom", 16_kb, 0xf3dc9bc5u); break;
// case Name::AcornIDEADFS103:
// *this = Description(name, "Electron", "the IDE-mofidied ADFS 1.03 ROM", "ELK130E.rom", 16_kb, 0xa923368du);
// break;
// case Name::PRESAdvancedPlus6:
// *this = Description(name, "Electron", "the 8kb Advanced Plus 6 ROM", "AP6v133.rom", 8_kb, 0xe0013cfcu);
// break;
// case Name::AcornElectronMOS100:
// *this = Description(name, "Electron", "the Electron MOS ROM v1.00", "os.rom", 16_kb, 0xbf63fb1fu);
// break;
//
// case Name::AcornArthur030:
// *this = Description(name, "Archimedes", "Arthur v0.30", "ROM030", 512_kb, 0x5df8ed42u);
// break;
// case Name::AcornRISCOS200:
// *this = Description(name, "Archimedes", "RISC OS v2.00", "ROM200", 512_kb, 0x89c4ad36u);
// break;
// case Name::AcornRISCOS311:
// *this = Description(name, "Archimedes", "RISC OS v3.11", "ROM311", 2_kb_kb, 0x54c0c963u);
// break;
// case Name::AcornRISCOS319:
// *this = Description(name, "Archimedes", "RISC OS v3.19", "ROM319", 2_kb_kb, 0x00c7a3d3u);
// break;
//
// case Name::MasterSystemJapaneseBIOS: *this = Description(name, "MasterSystem", "the Japanese Master System BIOS", "japanese-bios.sms", 8_kb, 0x48d44a13u); break;
// case Name::MasterSystemWesternBIOS: *this = Description(name, "MasterSystem", "the European/US Master System BIOS", "bios.sms", 8_kb, 0x0072ed54u); break;
//
// case Name::Commodore1540: *this = Description(name, "Commodore1540", "the 1540 ROM", "1540.bin", 16_kb, 0x718d42b1u); break;
// case Name::Commodore1541: *this = Description(name, "Commodore1540", "the 1541 ROM", "1541.bin", 16_kb, 0xfb760019); break;
//
// case Name::Vic20BASIC: *this = Description(name, "Vic20", "the VIC-20 BASIC ROM", "basic.bin", 8_kb, 0xdb4c43c1u); break;
// case Name::Vic20EnglishCharacters: *this = Description(name, "Vic20", "the English-language VIC-20 character ROM", "characters-english.bin", 4_kb, 0x83e032a6u); break;
// case Name::Vic20EnglishPALKernel: *this = Description(name, "Vic20", "the English-language PAL VIC-20 kernel ROM", "kernel-pal.bin", 8_kb, 0x4be07cb4u); break;
// case Name::Vic20EnglishNTSCKernel: *this = Description(name, "Vic20", "the English-language NTSC VIC-20 kernel ROM", "kernel-ntsc.bin", 8_kb, 0xe5e7c174u); break;
// case Name::Vic20DanishCharacters: *this = Description(name, "Vic20", "the Danish VIC-20 character ROM", "characters-danish.bin", 4_kb, 0x7fc11454u); break;
// case Name::Vic20DanishKernel: *this = Description(name, "Vic20", "the Danish VIC-20 kernel ROM", "kernel-danish.bin", 8_kb, 0x02adaf16u); break;
// case Name::Vic20JapaneseCharacters: *this = Description(name, "Vic20", "the Japanese VIC-20 character ROM", "characters-japanese.bin", 4_kb, 0xfcfd8a4bu); break;
// case Name::Vic20JapaneseKernel: *this = Description(name, "Vic20", "the Japanese VIC-20 kernel ROM", "kernel-japanese.bin", 8_kb, 0x336900d7u); break;
// case Name::Vic20SwedishCharacters: *this = Description(name, "Vic20", "the Swedish VIC-20 character ROM", "characters-swedish.bin", 4_kb, 0xd808551du); break;
// case Name::Vic20SwedishKernel: *this = Description(name, "Vic20", "the Swedish VIC-20 kernel ROM", "kernel-swedish.bin", 8_kb, 0xb2a60662u); break;
//
// case Name::OricColourROM: *this = Description(name, "Oric", "the Oric colour ROM", "colour.rom", 128, 0xd50fca65u); break;
// case Name::OricBASIC10: *this = Description(name, "Oric", "Oric BASIC 1.0", "basic10.rom", 16_kb, 0xf18710b4u); break;
// case Name::OricBASIC11: *this = Description(name, "Oric", "Oric BASIC 1.1", "basic11.rom", 16_kb, 0xc3a92befu); break;
// case Name::OricPravetzBASIC: *this = Description(name, "Oric", "Pravetz BASIC", "pravetz.rom", 16_kb, 0x58079502u); break;
// case Name::OricByteDrive500: *this = Description(name, "Oric", "the Oric Byte Drive 500 ROM", "bd500.rom", 8_kb, 0x61952e34u); break;
// case Name::OricJasmin: *this = Description(name, "Oric", "the Oric Jasmin ROM", "jasmin.rom", 2_kb, 0x37220e89u); break;
// case Name::OricMicrodisc: *this = Description(name, "Oric", "the Oric Microdisc ROM", "microdisc.rom", 8_kb, 0xa9664a9cu); break;
// case Name::Oric8DOSBoot: *this = Description(name, "Oric", "the 8DOS boot ROM", "8dos.rom", 512, 0x49a74c06u); break;
//
// case Name::PCCompatibleGLaBIOS:
// *this = Description(name, "PCCompatible", "8088 GLaBIOS 0.2.5", "GLABIOS_0.2.5_8T.ROM", 8 * 1024, 0x9576944cu);
// break;
// case Name::PCCompatibleGLaTICK:
// *this = Description(name, "PCCompatible", "AT GLaTICK 0.8.5", "GLaTICK_0.8.5_AT.ROM", 2 * 1024, 0x371ea3f1u);
// break;
// case Name::PCCompatiblePhoenix80286BIOS:
// *this = Description(name, "PCCompatible", "Phoenix 80286 BIOS 3.05", "Phoenix 80286 ROM BIOS Version 3.05.bin", 32 * 1024, 0x8d0d318au);
// break;
// case Name::PCCompatibleIBMATBIOS:
// *this = Description(name, "PCCompatible", "IBM PC AT BIOS v3", "at-bios.bin", 64 * 1024, 0x674426beu);
// break;
// case Name::PCCompatibleIBMATBIOSNov85U27:
// *this = Description(name, "PCCompatible", "IBM PC AT BIOS; 15th Nov 1985; U27", "BIOS_5170_15NOV85_U27_61X9266_27256.BIN", 32 * 1024, 0x4995be7au);
// break;
// case Name::PCCompatibleIBMATBIOSNov85U47:
// *this = Description(name, "PCCompatible", "IBM PC AT BIOS; 15th Nov 1985; U47", "BIOS_5170_15NOV85_U47_61X9265_27256.BIN", 32 * 1024, 0xc32713e4u);
// break;
// case Name::PCCompatibleCGAFont:
// *this = Description(name, "PCCompatible", "IBM's CGA font", "CGA.F08", 8 * 256, 0xa362ffe6u);
// break;
// case Name::PCCompatibleMDAFont:
// *this = Description(name, "PCCompatible", "IBM's MDA font", "EUMDA9.F14", 14 * 256, 0x7754882au);
// break;
// case Name::PCCompatibleEGABIOS:
// *this = Description(name, "PCCompatible", "IBM's EGA BIOS", "ibm_6277356_ega_card_u44_27128.bin", 16 * 1024, 0x2f2fbc40u);
// break;
// case Name::PCCompatibleVGABIOS:
// *this = Description(name, "PCCompatible", "IBM's VGA BIOS", "ibm_vga.bin", 32 * 1024, 0x03b3f90du);
// break;
//
// case Name::IBMBASIC110:
// *this = Description(name, "PCCompatible", "IBM ROM BIOS 1.10", "ibm-basic-1.10.rom", 32 * 1024, 0xebacb791u);
// break;
//
// // TODO: CRCs below are incomplete, at best.
// case Name::MSXGenericBIOS: *this = Description(name, "MSX", "a generix MSX BIOS", "msx.rom", 32_kb, 0x94ee12f3u); break;
// case Name::MSXJapaneseBIOS: *this = Description(name, "MSX", "a Japanese MSX BIOS", "msx-japanese.rom", 32_kb, 0xee229390u); break;
// case Name::MSXAmericanBIOS: *this = Description(name, "MSX", "an American MSX BIOS", "msx-american.rom", 32_kb, 0u); break;
// case Name::MSXEuropeanBIOS: *this = Description(name, "MSX", "a European MSX BIOS", "msx-european.rom", 32_kb, 0u); break;
// case Name::MSXDOS: *this = Description(name, "MSX", "the MSX-DOS ROM", "disk.rom", 16_kb, 0x721f61dfu); break;
//
// case Name::MSX2GenericBIOS: *this = Description(name, "MSX", "a generic MSX2 BIOS", "msx2.rom", 32_kb, 0x6cdaf3a5u); break;
// case Name::MSX2Extension: *this = Description(name, "MSX", "the MSX2 extension ROM", "msx2ext.rom", 16_kb, 0x66237ecfu); break;
// case Name::MSXMusic: *this = Description(name, "MSX", "the MSX-MUSIC / FM-PAC ROM", "fmpac.rom", 64_kb, 0x0e84505du); break;
//
// case Name::Plus4KernelPALv3:
// *this = Description(name, "Plus4", "the C16+4 kernel, PAL-G revision 3", "kernal.318004-03.bin", 16_kb, 0x77bab934u);
// break;
// case Name::Plus4KernelPALv4:
// *this = Description(name, "Plus4", "the C16+4 kernel, PAL-G revision 4", "kernal.318004-04.bin", 16_kb, 0xbe54ed79u);
// break;
// case Name::Plus4KernelPALv5:
// *this = Description(name, "Plus4", "the C16+4 kernel, PAL-G revision 5", "kernal.318004-05.bin", 16_kb, 0x71c07bd4u);
// break;
// case Name::Plus4BASIC:
// *this = Description(name, "Plus4", "the C16+4 BASIC ROM", "basic.318006-01.bin", 16_kb, 0x74eaae87u);
// break;
//
// case Name::SinclairQLJS:
// *this = Description(name, "SinclairQL", "the Sinclair QL 'JS' ROM", "js.rom", 48_kb, 0x0f95aab5u);
// break;
};
return descriptions;
}
std::string Description::description(int flags) const {
@@ -314,11 +547,18 @@ std::string Description::description(int flags) const {
return output.str();
}
std::wstring Request::description(int description_flags, wchar_t bullet_point) {
std::wstring Request::description(const int description_flags, const wchar_t bullet_point) {
std::wstringstream output;
visit(
[&output, description_flags, bullet_point] (ROM::Request::LineItem item, ROM::Request::ListType type, int indentation_level, const ROM::Description *description, bool is_optional, size_t remaining) {
[&output, description_flags, bullet_point] (
const ROM::Request::LineItem item,
const ROM::Request::ListType type,
const int indentation_level,
const ROM::Description *const description,
const bool is_optional,
const size_t remaining
) {
if(indentation_level) {
output << std::endl;
for(int c = 0; c < indentation_level; c++) output << '\t';
@@ -370,277 +610,25 @@ std::wstring Request::description(int description_flags, wchar_t bullet_point) {
}
Description::Description(Name name) {
switch(name) {
default: assert(false); break;
std::optional<Description> Description::from_crc(const uint32_t crc32) {
const auto all = all_roms();
const auto rom = std::find_if(all.begin(), all.end(), [&](const Description &candidate) {
const auto found_crc = std::find(candidate.crc32s.begin(), candidate.crc32s.end(), crc32);
return found_crc != candidate.crc32s.end();
});
case Name::AMSDOS: *this = Description(name, "AmstradCPC", "the Amstrad Disk Operating System", "amsdos.rom", 16*1024, 0x1fe22ecdu); break;
case Name::CPC464Firmware: *this = Description(name, "AmstradCPC", "the CPC 464 firmware", "os464.rom", 16*1024, 0x815752dfu); break;
case Name::CPC464BASIC: *this = Description(name, "AmstradCPC", "the CPC 464 BASIC ROM", "basic464.rom", 16*1024, 0x7d9a3bacu); break;
case Name::CPC664Firmware: *this = Description(name, "AmstradCPC", "the CPC 664 firmware", "os664.rom", 16*1024, 0x3f5a6dc4u); break;
case Name::CPC664BASIC: *this = Description(name, "AmstradCPC", "the CPC 664 BASIC ROM", "basic664.rom", 16*1024, 0x32fee492u); break;
case Name::CPC6128Firmware: *this = Description(name, "AmstradCPC", "the CPC 6128 firmware", "os6128.rom", 16*1024, 0x0219bb74u); break;
case Name::CPC6128BASIC: *this = Description(name, "AmstradCPC", "the CPC 6128 BASIC ROM", "basic6128.rom", 16*1024, 0xca6af63du); break;
case Name::AmigaKickstart10:
*this = Description(name, "Amiga", "the Kickstart 1.0 ROM", "Kickstart-v1.0-1985-Commodore-A1000-NTSC.rom", 256*1024, 0x299790ffu);
break;
case Name::AmigaKickstart11:
*this = Description(name, "Amiga", "the Kickstart 1.1 ROM", "Kickstart-v1.1-rev31.34-1985-Commodore-A1000.NTSC.rom", 256*1024, 0xd060572au);
break;
case Name::AmigaKickstart12:
*this = Description(name, "Amiga", "the Kickstart 1.2 ROM", "Kickstart-v1.2-rev33.166-1986-Commodore-A1000.rom", 256*1024, 0x9ed783d0u);
break;
case Name::AmigaA500Kickstart13:
*this = Description(name, "Amiga", "the A500/A1000/A2000/CDTV Kickstart 1.3 ROM", "Kickstart-v1.3-rev34.5-1987-Commodore-A500-A1000-A2000-CDTV.rom", 256*1024, 0xc4f0f55fu);
break;
case Name::AmigaA3000Kickstart13:
*this = Description(name, "Amiga", "the A3000 Kickstart 1.3 ROM", "Kickstart-v1.3-rev34.5-1987-Commodore-A3000.rom", 256*1024, 0xe0f37258u);
break;
case Name::AmigaKickstart20:
*this = Description(name, "Amiga", "the Kickstart 2.0 ROM", "Kickstart-v2.0-rev36.143-1990-Commodore-A3000.rom", 512*1024, 0xb333d3c6u);
break;
case Name::AmigaA500PlusKickstart204:
*this = Description(name, "Amiga", "the A500+ Kickstart 2.04 ROM", "Kickstart-v2.04-rev37.175-1991-Commodore-A500plus.rom", 512*1024, 0xc3bdb240u);
break;
case Name::AmigaA600Kickstart205:
*this = Description(name, "Amiga", "the Kickstart 2.05 ROM", "Kickstart-v2.05-rev37.299-1991-Commodore-A600.rom", 512*1024, 0x83028fb5u);
break;
case Name::AmigaA500Kickstart31:
*this = Description(name, "Amiga", "the A500/A600/A2000 Kickstart 3.1 ROM", "Kickstart-v3.1-rev40.63-1993-Commodore-A500-A600-A2000.rom", 512*1024, 0xfc24ae0du);
break;
case Name::AmigaDiagROM121:
*this = Description(name, "Amiga", "DiagROM 1.2.1", "16bit.bin", 512*1024, 0xf2ac0a3b);
break;
case Name::AppleIIEnhancedE: *this = Description(name, "AppleII", "the Enhanced Apple IIe ROM", "apple2e.rom", 32*1024, 0x65989942u); break;
case Name::AppleIIe: *this = Description(name, "AppleII", "the Apple IIe ROM", "apple2eu.rom", 32*1024, 0xe12be18du); break;
case Name::AppleIIPlus: *this = Description(name, "AppleII", "the Apple II+ ROM", "apple2.rom", 12*1024, 0xf66f9c26u); break;
case Name::AppleIIOriginal: *this = Description(name, "AppleII", "the original Apple II ROM", "apple2o.rom", 12*1024, 0xba210588u); break;
case Name::AppleIICharacter: *this = Description(name, "AppleII", "the basic Apple II character ROM", "apple2-character.rom", 2*1024, 0x64f415c6u); break;
case Name::AppleIIeCharacter: *this = Description(name, "AppleII", "the Apple IIe character ROM", "apple2eu-character.rom", 4*1024, 0x816a86f1u); break;
case Name::AppleIIEnhancedECharacter:
*this = Description(name, "AppleII", "the Enhanced Apple IIe character ROM", "apple2e-character.rom", 4*1024, 0x2651014du);
break;
case Name::AppleIISCSICard:
*this = Description(name, "AppleII", "the Apple II SCSI card ROM", "scsi.rom", 16*1024, 0x5aff85d3u);
break;
case Name::AppleIIgsROM00: /* TODO */
case Name::AppleIIgsROM01: *this = Description(name, "AppleIIgs", "the Apple IIgs ROM01", "apple2gs.rom", 128*1024, 0x42f124b0u); break;
case Name::AppleIIgsROM03: *this = Description(name, "AppleIIgs", "the Apple IIgs ROM03", "apple2gs.rom2", 256*1024, 0xde7ddf29u); break;
case Name::AppleIIgsCharacter: *this = Description(name, "AppleIIgs", "the Apple IIgs character ROM", "apple2gs.chr", 4*1024, 0x91e53cd8u); break;
case AppleIIgsMicrocontrollerROM03:
*this = Description(name, "AppleIIgs", "the Apple IIgs ROM03 ADB microcontroller ROM", "341s0632-2", 4*1024, 0xe1c11fb0u);
break;
case Name::DiskIIBoot16Sector:
*this = Description(name, "DiskII", "the Disk II 16-sector boot ROM", "boot-16.rom", 256, 0xce7144f6u);
break;
case Name::DiskIIStateMachine16Sector:
*this = Description(name, "DiskII", "the Disk II 16-sector state machine ROM", "state-machine-16.rom", 256, std::initializer_list<uint32_t>{ 0x9796a238, 0xb72a2c70 } );
break;
case Name::DiskIIBoot13Sector:
*this = Description(name, "DiskII", "the Disk II 13-sector boot ROM", "boot-13.rom", 256, 0xd34eb2ffu);
break;
case Name::DiskIIStateMachine13Sector:
*this = Description(name, "DiskII", "the Disk II 13-sector state machine ROM", "state-machine-13.rom", 256, 0x62e22620u);
break;
case Name::EnterpriseEXOS10: {
const std::initializer_list<std::string> filenames = {"exos10.bin", "Exos (198x)(Enterprise).bin"};
*this = Description(name, "Enterprise", "the Enterprise EXOS ROM v1.0", filenames, 32 * 1024, 0x30b26387u);
} break;
case Name::EnterpriseEXOS20: {
const std::initializer_list<std::string> filenames = {"exos20.bin", "Expandible OS v2.0 (1984)(Intelligent Software).bin"};
*this = Description(name, "Enterprise", "the Enterprise EXOS ROM v2.0", filenames, 32 * 1024, 0xd421795fu);
} break;
case Name::EnterpriseEXOS21: {
const std::initializer_list<std::string> filenames = {"exos21.bin", "Expandible OS v2.1 (1985)(Intelligent Software).bin"};
*this = Description(name, "Enterprise", "the Enterprise EXOS ROM v2.1", filenames, 32 * 1024, 0x982a3b44u);
} break;
case Name::EnterpriseEXOS23: {
const std::initializer_list<std::string> filenames = {"exos23.bin", "Expandible OS v2.3 (1987)(Intelligent Software).bin"};
*this = Description(name, "Enterprise", "the Enterprise EXOS ROM v2.1", filenames, 64 * 1024, 0x24838410u);
} break;
case Name::EnterpriseBASIC10: {
const std::initializer_list<std::string> filenames = {"basic10.bin"};
*this = Description(name, "Enterprise", "the Enterprise BASIC ROM v1.0", filenames, 16 * 1024, 0xd62e4fb7u);
} break;
case Name::EnterpriseBASIC10Part1: {
const std::initializer_list<std::string> filenames = {"BASIC 1.0 - EPROM 1-2 (198x)(Enterprise).bin"};
*this = Description(name, "Enterprise", "the Enterprise BASIC ROM v1.0, Part 1", filenames, 8193, 0x37bf48e1u);
} break;
case Name::EnterpriseBASIC10Part2: {
const std::initializer_list<std::string> filenames = {"BASIC 1.0 - EPROM 2-2 (198x)(Enterprise).bin"};
*this = Description(name, "Enterprise", "the Enterprise BASIC ROM v1.0, Part 2", filenames, 8193, 0xc5298c79u);
} break;
case Name::EnterpriseBASIC11: {
const std::initializer_list<std::string> filenames = {"basic11.bin"};
*this = Description(name, "Enterprise", "the Enterprise BASIC ROM v1.1", filenames, 16 * 1024, 0x683cf455u);
} break;
case Name::EnterpriseBASIC11Suffixed: {
const std::initializer_list<std::string> filenames = {"BASIC 1.1 - EPROM 1.1 (198x)(Enterprise).bin"};
*this = Description(name, "Enterprise", "the Enterprise BASIC ROM v1.1, with trailing byte", filenames, 16385, 0xc96b7602u);
} break;
case Name::EnterpriseBASIC21: {
const std::initializer_list<std::string> filenames = {
"basic21.bin",
"BASIC Interpreter v2.1 (1985)(Intelligent Software).bin",
"BASIC Interpreter v2.1 (1985)(Intelligent Software)[a].bin"
};
const std::initializer_list<uint32_t> crcs = { 0x55f96251, 0x683cf455 };
*this = Description(name, "Enterprise", "the Enterprise BASIC ROM v2.1", filenames, 16 * 1024, crcs);
} break;
case Name::EnterpriseEPDOS: {
const std::initializer_list<std::string> filenames = {"epdos.bin", "EPDOS v1.7 (19xx)(Haluska, Laszlo).bin"};
*this = Description(name, "Enterprise", "the Enterprise EPDOS ROM", filenames, 32 * 1024, 0x201319ebu);
} break;
case Name::EnterpriseEXDOS: {
const std::initializer_list<std::string> filenames = {"exdos.bin", "EX-DOS EPROM (198x)(Enterprise).bin"};
*this = Description(name, "Enterprise", "the Enterprise EXDOS ROM", filenames, 16 * 1024, 0xe6daa0e9u);
} break;
case Name::Macintosh128k: *this = Description(name, "Macintosh", "the Macintosh 128k ROM", "mac128k.rom", 64*1024, 0x6d0c8a28u); break;
case Name::Macintosh512k: *this = Description(name, "Macintosh", "the Macintosh 512k ROM", "mac512k.rom", 64*1024, 0xcf759e0d); break;
case Name::MacintoshPlus: {
const std::initializer_list<uint32_t> crcs = { 0x4fa5b399, 0x7cacd18f, 0xb2102e8e };
*this = Description(name, "Macintosh", "the Macintosh Plus ROM", "macplus.rom", 128*1024, crcs);
} break;
case Name::AtariSTTOS100: *this = Description(name, "AtariST", "the UK TOS 1.00 ROM", "tos100.img", 192*1024, 0x1a586c64u); break;
case Name::AtariSTTOS104: *this = Description(name, "AtariST", "the UK TOS 1.04 ROM", "tos104.img", 192*1024, 0xa50d1d43u); break;
case Name::ColecoVisionBIOS:
*this = Description(name, "ColecoVision", "the ColecoVision BIOS", "coleco.rom", 8*1024, 0x3aa93ef3u);
break;
case Name::ZX80: *this = Description(name, "ZX8081", "the ZX80 BASIC ROM", "zx80.rom", 4 * 1024, 0x4c7fc597u); break;
case Name::ZX81: *this = Description(name, "ZX8081", "the ZX81 BASIC ROM", "zx81.rom", 8 * 1024, 0x4b1dd6ebu); break;
case Name::Spectrum48k: *this = Description(name, "ZXSpectrum", "the 48kb ROM", "48.rom", 16 * 1024, 0xddee531fu); break;
case Name::Spectrum128k: *this = Description(name, "ZXSpectrum", "the 128kb ROM", "128.rom", 32 * 1024, 0x2cbe8995u); break;
case Name::SpecrumPlus2: *this = Description(name, "ZXSpectrum", "the +2 ROM", "plus2.rom", 32 * 1024, 0xe7a517dcu); break;
case Name::SpectrumPlus3: {
const std::initializer_list<uint32_t> crcs = { 0x96e3c17a, 0xbe0d9ec4 };
*this = Description(name, "ZXSpectrum", "the +2a/+3 ROM", "plus3.rom", 64 * 1024, crcs);
} break;
case Name::AcornBASICII: *this = Description(name, "Electron", "the Acorn BASIC II ROM", "basic.rom", 16*1024, 0x79434781u); break;
case Name::PRESADFSSlot1: *this = Description(name, "Electron", "the E00 ADFS ROM, first slot", "ADFS-E00_1.rom", 16*1024, 0x51523993u); break;
case Name::PRESADFSSlot2: *this = Description(name, "Electron", "the E00 ADFS ROM, second slot", "ADFS-E00_2.rom", 16*1024, 0x8d17de0eu); break;
case Name::AcornADFS: *this = Description(name, "Electron", "the Acorn ADFS ROM", "adfs.rom", 16*1024, 0x3289bdc6u); break;
case Name::Acorn1770DFS: *this = Description(name, "Electron", "the 1770 DFS ROM", "DFS-1770-2.20.rom", 16*1024, 0xf3dc9bc5u); break;
case Name::PRESAdvancedPlus6:
*this = Description(name, "Electron", "the 8kb Advanced Plus 6 ROM", "AP6v133.rom", 8*1024, 0xe0013cfcu);
break;
case Name::AcornElectronMOS100:
*this = Description(name, "Electron", "the Electron MOS ROM v1.00", "os.rom", 16*1024, 0xbf63fb1fu);
break;
case Name::AcornArthur030:
*this = Description(name, "Archimedes", "Arthur v0.30", "ROM030", 512*1024, 0x5df8ed42u);
break;
case Name::AcornRISCOS200:
*this = Description(name, "Archimedes", "RISC OS v2.00", "ROM200", 512*1024, 0x89c4ad36u);
break;
case Name::AcornRISCOS311:
*this = Description(name, "Archimedes", "RISC OS v3.11", "ROM311", 2*1024*1024, 0x54c0c963u);
break;
case Name::AcornRISCOS319:
*this = Description(name, "Archimedes", "RISC OS v3.19", "ROM319", 2*1024*1024, 0x00c7a3d3u);
break;
case Name::MasterSystemJapaneseBIOS: *this = Description(name, "MasterSystem", "the Japanese Master System BIOS", "japanese-bios.sms", 8*1024, 0x48d44a13u); break;
case Name::MasterSystemWesternBIOS: *this = Description(name, "MasterSystem", "the European/US Master System BIOS", "bios.sms", 8*1024, 0x0072ed54u); break;
case Name::Commodore1540: *this = Description(name, "Commodore1540", "the 1540 ROM", "1540.bin", 16*1024, 0x718d42b1u); break;
case Name::Commodore1541: *this = Description(name, "Commodore1540", "the 1541 ROM", "1541.bin", 16*1024, 0xfb760019); break;
case Name::Vic20BASIC: *this = Description(name, "Vic20", "the VIC-20 BASIC ROM", "basic.bin", 8*1024, 0xdb4c43c1u); break;
case Name::Vic20EnglishCharacters: *this = Description(name, "Vic20", "the English-language VIC-20 character ROM", "characters-english.bin", 4*1024, 0x83e032a6u); break;
case Name::Vic20EnglishPALKernel: *this = Description(name, "Vic20", "the English-language PAL VIC-20 kernel ROM", "kernel-pal.bin", 8*1024, 0x4be07cb4u); break;
case Name::Vic20EnglishNTSCKernel: *this = Description(name, "Vic20", "the English-language NTSC VIC-20 kernel ROM", "kernel-ntsc.bin", 8*1024, 0xe5e7c174u); break;
case Name::Vic20DanishCharacters: *this = Description(name, "Vic20", "the Danish VIC-20 character ROM", "characters-danish.bin", 4*1024, 0x7fc11454u); break;
case Name::Vic20DanishKernel: *this = Description(name, "Vic20", "the Danish VIC-20 kernel ROM", "kernel-danish.bin", 8*1024, 0x02adaf16u); break;
case Name::Vic20JapaneseCharacters: *this = Description(name, "Vic20", "the Japanese VIC-20 character ROM", "characters-japanese.bin", 4*1024, 0xfcfd8a4bu); break;
case Name::Vic20JapaneseKernel: *this = Description(name, "Vic20", "the Japanese VIC-20 kernel ROM", "kernel-japanese.bin", 8*1024, 0x336900d7u); break;
case Name::Vic20SwedishCharacters: *this = Description(name, "Vic20", "the Swedish VIC-20 character ROM", "characters-swedish.bin", 4*1024, 0xd808551du); break;
case Name::Vic20SwedishKernel: *this = Description(name, "Vic20", "the Swedish VIC-20 kernel ROM", "kernel-swedish.bin", 8*1024, 0xb2a60662u); break;
case Name::OricColourROM: *this = Description(name, "Oric", "the Oric colour ROM", "colour.rom", 128, 0xd50fca65u); break;
case Name::OricBASIC10: *this = Description(name, "Oric", "Oric BASIC 1.0", "basic10.rom", 16*1024, 0xf18710b4u); break;
case Name::OricBASIC11: *this = Description(name, "Oric", "Oric BASIC 1.1", "basic11.rom", 16*1024, 0xc3a92befu); break;
case Name::OricPravetzBASIC: *this = Description(name, "Oric", "Pravetz BASIC", "pravetz.rom", 16*1024, 0x58079502u); break;
case Name::OricByteDrive500: *this = Description(name, "Oric", "the Oric Byte Drive 500 ROM", "bd500.rom", 8*1024, 0x61952e34u); break;
case Name::OricJasmin: *this = Description(name, "Oric", "the Oric Jasmin ROM", "jasmin.rom", 2*1024, 0x37220e89u); break;
case Name::OricMicrodisc: *this = Description(name, "Oric", "the Oric Microdisc ROM", "microdisc.rom", 8*1024, 0xa9664a9cu); break;
case Name::Oric8DOSBoot: *this = Description(name, "Oric", "the 8DOS boot ROM", "8dos.rom", 512, 0x49a74c06u); break;
case Name::PCCompatibleGLaBIOS:
*this = Description(name, "PCCompatible", "8088 GLaBIOS 0.2.5", "GLABIOS_0.2.5_8T.ROM", 8 * 1024, 0x9576944cu);
break;
case Name::PCCompatibleGLaTICK:
*this = Description(name, "PCCompatible", "AT GLaTICK 0.8.5", "GLaTICK_0.8.5_AT.ROM", 2 * 1024, 0x371ea3f1u);
break;
case Name::PCCompatiblePhoenix80286BIOS:
*this = Description(name, "PCCompatible", "Phoenix 80286 BIOS 3.05", "Phoenix 80286 ROM BIOS Version 3.05.bin", 32 * 1024, 0x8d0d318au);
break;
case Name::PCCompatibleIBMATBIOS:
*this = Description(name, "PCCompatible", "IBM PC AT BIOS v3", "at-bios.bin", 64 * 1024, 0x674426beu);
break;
case Name::PCCompatibleIBMATBIOSNov85U27:
*this = Description(name, "PCCompatible", "IBM PC AT BIOS; 15th Nov 1985; U27", "BIOS_5170_15NOV85_U27_61X9266_27256.BIN", 32 * 1024, 0x4995be7au);
break;
case Name::PCCompatibleIBMATBIOSNov85U47:
*this = Description(name, "PCCompatible", "IBM PC AT BIOS; 15th Nov 1985; U47", "BIOS_5170_15NOV85_U47_61X9265_27256.BIN", 32 * 1024, 0xc32713e4u);
break;
case Name::PCCompatibleCGAFont:
*this = Description(name, "PCCompatible", "IBM's CGA font", "CGA.F08", 8 * 256, 0xa362ffe6u);
break;
case Name::PCCompatibleMDAFont:
*this = Description(name, "PCCompatible", "IBM's MDA font", "EUMDA9.F14", 14 * 256, 0x7754882au);
break;
case Name::PCCompatibleEGABIOS:
*this = Description(name, "PCCompatible", "IBM's EGA BIOS", "ibm_6277356_ega_card_u44_27128.bin", 16 * 1024, 0x2f2fbc40u);
break;
case Name::PCCompatibleVGABIOS:
*this = Description(name, "PCCompatible", "IBM's VGA BIOS", "ibm_vga.bin", 32 * 1024, 0x03b3f90du);
break;
case Name::IBMBASIC110:
*this = Description(name, "PCCompatible", "IBM ROM BIOS 1.10", "ibm-basic-1.10.rom", 32 * 1024, 0xebacb791u);
break;
// TODO: CRCs below are incomplete, at best.
case Name::MSXGenericBIOS: *this = Description(name, "MSX", "a generix MSX BIOS", "msx.rom", 32*1024, 0x94ee12f3u); break;
case Name::MSXJapaneseBIOS: *this = Description(name, "MSX", "a Japanese MSX BIOS", "msx-japanese.rom", 32*1024, 0xee229390u); break;
case Name::MSXAmericanBIOS: *this = Description(name, "MSX", "an American MSX BIOS", "msx-american.rom", 32*1024, 0u); break;
case Name::MSXEuropeanBIOS: *this = Description(name, "MSX", "a European MSX BIOS", "msx-european.rom", 32*1024, 0u); break;
case Name::MSXDOS: *this = Description(name, "MSX", "the MSX-DOS ROM", "disk.rom", 16*1024, 0x721f61dfu); break;
case Name::MSX2GenericBIOS: *this = Description(name, "MSX", "a generic MSX2 BIOS", "msx2.rom", 32*1024, 0x6cdaf3a5u); break;
case Name::MSX2Extension: *this = Description(name, "MSX", "the MSX2 extension ROM", "msx2ext.rom", 16*1024, 0x66237ecfu); break;
case Name::MSXMusic: *this = Description(name, "MSX", "the MSX-MUSIC / FM-PAC ROM", "fmpac.rom", 64*1024, 0x0e84505du); break;
case Name::Plus4KernelPALv3:
*this = Description(name, "Plus4", "the C16+4 kernel, PAL-G revision 3", "kernal.318004-03.bin", 16*1024, 0x77bab934u);
break;
case Name::Plus4KernelPALv4:
*this = Description(name, "Plus4", "the C16+4 kernel, PAL-G revision 4", "kernal.318004-04.bin", 16*1024, 0xbe54ed79u);
break;
case Name::Plus4KernelPALv5:
*this = Description(name, "Plus4", "the C16+4 kernel, PAL-G revision 5", "kernal.318004-05.bin", 16*1024, 0x71c07bd4u);
break;
case Name::Plus4BASIC:
*this = Description(name, "Plus4", "the C16+4 BASIC ROM", "basic.318006-01.bin", 16*1024, 0x74eaae87u);
break;
case Name::SinclairQLJS:
*this = Description(name, "SinclairQL", "the Sinclair QL 'JS' ROM", "js.rom", 48*1024, 0x0f95aab5u);
break;
if(rom != all.end()) {
return *rom;
}
return std::nullopt;
}
Description::Description(const Name name) {
const auto all = all_roms();
const auto rom = std::find_if(all.begin(), all.end(), [&](const Description &candidate) {
return candidate.name == name;
});
if(rom != all.end()) {
*this = *rom;
}
}
+17 -2
View File
@@ -30,6 +30,7 @@ enum Name {
AcornADFS,
PRESAdvancedPlus6,
Acorn1770DFS,
AcornIDEADFS103,
// Acorn Archimedes.
AcornArthur030,
@@ -223,8 +224,20 @@ struct Description {
private:
template <typename FileNameT, typename CRC32T> Description(
Name name, std::string machine_name, std::string descriptive_name, FileNameT file_names, size_t size, CRC32T crc32s = uint32_t(0)
) : name{name}, machine_name{machine_name}, descriptive_name{descriptive_name}, file_names{file_names}, size{size}, crc32s{crc32s} {
const Name name,
const char *machine_name,
const char *descriptive_name,
const FileNameT file_names,
const size_t size,
const CRC32T crc32s = uint32_t(0)
) :
name{name},
machine_name{machine_name},
descriptive_name{descriptive_name},
file_names{file_names},
size{size},
crc32s{crc32s}
{
// Slightly lazy: deal with the case where the constructor wasn't provided with any
// CRCs by spotting that the set has exactly one member, which has value 0. The alternative
// would be to provide a partial specialisation that never put anything into the set.
@@ -232,6 +245,8 @@ private:
this->crc32s.clear();
}
}
static const std::vector<Description> &all_roms();
};
/// @returns a vector of all possible instances of ROM::Description — i.e. descriptions of every ROM
+2 -1
View File
@@ -8,7 +8,8 @@ DFS-1770-2.20.rom — used only if the user opens a DFS disk image
ADFS-E00_1.rom — used only if the user opens an ADFS disk image
ADFS-E00_2.rom
AP6v133.rom — used only if the user opens a disk image that makes use of any of the commands given below.
adfs.rom - used only if the user opens a hard disk image
adfs.rom used only if the user opens a hard disk image or requests a SCSI interface
ELK103.rom — used only if the user requests an IDE interface
Possibly to be desired in the future:
* os300.rom