23 static inline bool isAlias(
RomType type)
29 static bool isInit =
false;
30 typedef map<string_ref, RomType, StringOp::caseless>
RomTypeMap;
38 romTypeMap[name] = type;
39 romTypeInfoMap[type] = std::make_pair(description, blocksize);
43 romTypeMap[name] = makeAlias(type);
56 init(
ROM_KONAMI,
"Konami", 0x2000,
"Konami MegaROM");
58 init(
ROM_KBDMASTER,
"KeyboardMaster", 0x4000,
"Konami Keyboard Master with VLM5030");
59 init(
ROM_ASCII8,
"ASCII8", 0x2000,
"ASCII 8kB");
68 init(
ROM_ASCII16_2,
"ASCII16SRAM2", 0x4000,
"ASCII 16kB with 2kB SRAM");
69 init(
ROM_ASCII8_8,
"ASCII8SRAM8", 0x2000,
"ASCII 8kB with 8kB SRAM");
70 init(
ROM_KOEI_8,
"KoeiSRAM8", 0x2000,
"Koei with 8kB SRAM");
71 init(
ROM_KOEI_32,
"KoeiSRAM32", 0x2000,
"Koei with 32kB SRAM");
76 init(
ROM_PLAYBALL,
"PlayBall", 0x4000,
"Sony's PlayBall");
78 init(
ROM_HOLY_QURAN,
"AlQuranDecoded", 0x2000,
"Holy Qu'ran (pre-decrypted)");
85 init(
ROM_MANBOW2_2,
"Manbow2_2", 0x2000,
"Manbow2 - Second Release");
89 init(
ROM_ARC,
"Arc", 0x4000,
"Parallax' ARC");
90 init(
ROM_DOOLY,
"Dooly", 0x4000,
"Baby Dinosaur Dooly");
91 init(
ROM_MSXTRA,
"MSXtra", 0x0000,
"PTC MSXtra");
92 init(
ROM_MULTIROM,
"MultiRom", 0x0000,
"MultiRom Collection");
96 init(
ROM_PANASONIC,
"Panasonic", 0x2000,
"Panasonic internal mapper");
97 init(
ROM_NATIONAL,
"National", 0x4000,
"National internal mapper");
98 init(
ROM_FSA1FM1,
"FSA1FM1", 0x0000,
"Panasonic FS-A1FM internal mapper 1");
99 init(
ROM_FSA1FM2,
"FSA1FM2", 0x2000,
"Panasonic FS-A1FM internal mapper 2");
100 init(
ROM_DRAM,
"DRAM", 0x2000,
"MSXturboR DRAM");
103 init(
ROM_MIRRORED,
"Mirrored", 0x2000,
"Plain rom, mirrored (any size)");
104 init(
ROM_MIRRORED0000,
"Mirrored0000",0x2000,
"Plain rom, mirrored start at 0x0000");
105 init(
ROM_MIRRORED4000,
"Mirrored4000",0x2000,
"Plain rom, mirrored start at 0x4000");
106 init(
ROM_MIRRORED8000,
"Mirrored8000",0x2000,
"Plain rom, mirrored start at 0x8000");
107 init(
ROM_MIRROREDC000,
"MirroredC000",0x2000,
"Plain rom, mirrored start at 0xC000");
108 init(
ROM_NORMAL,
"Normal", 0x2000,
"Plain rom (any size)");
109 init(
ROM_NORMAL0000,
"Normal0000", 0x2000,
"Plain rom start at 0x0000");
110 init(
ROM_NORMAL4000,
"Normal4000", 0x2000,
"Plain rom start at 0x4000");
111 init(
ROM_NORMAL8000,
"Normal8000", 0x2000,
"Plain rom start at 0x8000");
112 init(
ROM_NORMALC000,
"NormalC000", 0x2000,
"Plain rom start at 0xC000");
113 init(
ROM_PAGE0,
"Page0", 0x2000,
"Plain 16kB page 0");
114 init(
ROM_PAGE1,
"Page1", 0x2000,
"Plain 16kB page 1");
115 init(
ROM_PAGE2,
"Page2", 0x2000,
"Plain 16kB page 2 (BASIC)");
116 init(
ROM_PAGE3,
"Page3", 0x2000,
"Plain 16kB page 3");
117 init(
ROM_PAGE01,
"Page01", 0x2000,
"Plain 32kB page 0-1");
118 init(
ROM_PAGE12,
"Page12", 0x2000,
"Plain 32kB page 1-2");
119 init(
ROM_PAGE23,
"Page23", 0x2000,
"Plain 32kB page 2-3");
120 init(
ROM_PAGE012,
"Page012", 0x2000,
"Plain 48kB page 0-2");
121 init(
ROM_PAGE123,
"Page123", 0x2000,
"Plain 48kB page 1-3");
158 return romTypeInfoMap;
166 : title (ntitle .str())
167 , year (nyear .str())
168 , company (ncompany .str())
169 , country (ncountry .str())
170 , origType(norigType.str())
171 , remark (nremark .str())
173 , genMSXid(ngenMSXid)
174 , original(noriginal)
180 auto& romTypeMap = getRomTypeMap();
181 auto it = romTypeMap.find(name);
182 if (it == romTypeMap.end()) {
185 return removeAlias(it->second);
190 assert(!isAlias(type));
191 for (
auto& p : getRomTypeMap()) {
192 if (p.second == type) {
201 vector<string> result;
202 for (
auto& p : getRomTypeMap()) {
203 if (!isAlias(p.second)) {
204 result.push_back(p.first.str());
212 auto& m = getRomTypeInfoMap();
213 auto it = m.find(type);
214 assert(it != m.end());
215 return it->second.first;
220 auto& m = getRomTypeInfoMap();
221 auto it = m.find(type);
222 assert(it != m.end());
223 return it->second.second;