66 #if COMPONENT_LASERDISC
70 using std::unique_ptr;
74 static unique_ptr<MSXDevice> createWD2793BasedFDC(
const DeviceConfig& conf)
76 const XMLElement* styleEl = conf.findChild(
"connectionstyle");
79 conf.getCliComm().printWarning(
80 "WD2793 as FDC type without a connectionstyle is "
81 "deprecated, please update your config file to use "
82 "WD2793 with connectionstyle Philips!");
85 type = styleEl->getData();
87 if ((type ==
"Philips") || (type ==
"Sony")) {
88 return make_unique<PhilipsFDC>(conf);
89 }
else if (type ==
"Microsol") {
90 return make_unique<MicrosolFDC>(conf);
91 }
else if (type ==
"AVT") {
92 return make_unique<AVTFDC>(conf);
93 }
else if (type ==
"National") {
94 return make_unique<NationalFDC>(conf);
95 }
else if (type ==
"Sanyo") {
96 return make_unique<SanyoFDC>(conf);
97 }
else if (type ==
"Victor") {
98 return make_unique<VictorFDC>(conf);
100 throw MSXException(
"Unknown WD2793 FDC connection style " + type);
105 unique_ptr<MSXDevice> result;
108 result = make_unique<MSXPPI>(conf);
109 }
else if (type ==
"RAM") {
110 result = make_unique<MSXRam>(conf);
111 }
else if (type ==
"VDP") {
112 result = make_unique<VDP>(conf);
113 }
else if (type ==
"E6Timer") {
114 result = make_unique<MSXE6Timer>(conf);
115 }
else if (type ==
"ResetStatusRegister" || type ==
"F4Device") {
116 result = make_unique<MSXResetStatusRegister>(conf);
117 }
else if (type ==
"TurboRPause") {
118 result = make_unique<MSXTurboRPause>(conf);
119 }
else if (type ==
"TurboRPCM") {
120 result = make_unique<MSXTurboRPCM>(conf);
121 }
else if (type ==
"S1985") {
122 result = make_unique<MSXS1985>(conf);
123 }
else if (type ==
"S1990") {
124 result = make_unique<MSXS1990>(conf);
125 }
else if (type ==
"PSG") {
126 result = make_unique<MSXPSG>(conf);
127 }
else if (type ==
"MSX-MUSIC") {
128 result = make_unique<MSXMusic>(conf);
129 }
else if (type ==
"FMPAC") {
130 result = make_unique<MSXFmPac>(conf);
131 }
else if (type ==
"MSX-AUDIO") {
132 result = make_unique<MSXAudio>(conf);
133 }
else if (type ==
"MusicModuleMIDI") {
134 result = make_unique<MC6850>(conf);
135 }
else if (type ==
"YamahaSFG") {
136 result = make_unique<MSXYamahaSFG>(conf);
137 }
else if (type ==
"MoonSound") {
138 result = make_unique<MSXMoonSound>(conf);
139 }
else if (type ==
"OPL3Cartridge") {
140 result = make_unique<MSXOPL3Cartridge>(conf);
141 }
else if (type ==
"Kanji") {
142 result = make_unique<MSXKanji>(conf);
143 }
else if (type ==
"Bunsetsu") {
144 result = make_unique<MSXBunsetsu>(conf);
145 }
else if (type ==
"MemoryMapper") {
146 result = make_unique<MSXMemoryMapper>(conf);
147 }
else if (type ==
"PanasonicRAM") {
148 result = make_unique<PanasonicRam>(conf);
149 }
else if (type ==
"RTC") {
150 result = make_unique<MSXRTC>(conf);
151 }
else if (type ==
"PasswordCart") {
152 result = make_unique<PasswordCart>(conf);
153 }
else if (type ==
"ROM") {
155 }
else if (type ==
"PrinterPort") {
156 result = make_unique<MSXPrinterPort>(conf);
157 }
else if (type ==
"SCCplus") {
158 result = make_unique<MSXSCCPlusCart>(conf);
159 }
else if ((type ==
"WD2793") || (type ==
"WD1770")) {
160 result = createWD2793BasedFDC(conf);
161 }
else if (type ==
"Microsol") {
163 "Microsol as FDC type is deprecated, please update "
164 "your config file to use WD2793 with connectionstyle "
166 result = make_unique<MicrosolFDC>(conf);
167 }
else if (type ==
"MB8877A") {
169 "MB8877A as FDC type is deprecated, please update your "
170 "config file to use WD2793 with connectionstyle National!");
171 result = make_unique<NationalFDC>(conf);
172 }
else if (type ==
"TC8566AF") {
173 result = make_unique<TurboRFDC>(conf);
174 }
else if (type ==
"SunriseIDE") {
175 result = make_unique<SunriseIDE>(conf);
176 }
else if (type ==
"GoudaSCSI") {
177 result = make_unique<GoudaSCSI>(conf);
178 }
else if (type ==
"MegaSCSI") {
179 result = make_unique<MegaSCSI>(conf);
180 }
else if (type ==
"ESERAM") {
181 result = make_unique<ESE_RAM>(conf);
182 }
else if (type ==
"WaveSCSI") {
183 result = make_unique<ESE_SCC>(conf,
true);
184 }
else if (type ==
"ESESCC") {
185 result = make_unique<ESE_SCC>(conf,
false);
186 }
else if (type ==
"Matsushita") {
187 result = make_unique<MSXMatsushita>(conf);
188 }
else if (type ==
"VictorHC9xSystemControl") {
189 result = make_unique<MSXVictorHC9xSystemControl>(conf);
190 }
else if (type ==
"CielTurbo") {
191 result = make_unique<MSXCielTurbo>(conf);
192 }
else if (type ==
"Kanji12") {
193 result = make_unique<MSXKanji12>(conf);
194 }
else if (type ==
"MSX-MIDI") {
195 result = make_unique<MSXMidi>(conf);
196 }
else if (type ==
"MSX-RS232") {
197 result = make_unique<MSXRS232>(conf);
198 }
else if (type ==
"MegaRam") {
199 result = make_unique<MSXMegaRam>(conf);
200 }
else if (type ==
"PAC") {
201 result = make_unique<MSXPac>(conf);
202 }
else if (type ==
"HBI55") {
203 result = make_unique<MSXHBI55>(conf);
204 }
else if (type ==
"DebugDevice") {
205 result = make_unique<DebugDevice>(conf);
206 }
else if (type ==
"V9990") {
207 result = make_unique<V9990>(conf);
208 }
else if (type ==
"Video9000") {
209 result = make_unique<Video9000>(conf);
210 }
else if (type ==
"ADVram") {
211 result = make_unique<ADVram>(conf);
212 }
else if (type ==
"PioneerLDControl") {
213 #if COMPONENT_LASERDISC
214 result = make_unique<PioneerLDControl>(conf);
216 throw MSXException(
"Laserdisc component not compiled in");
218 }
else if (type ==
"Nowind") {
219 result = make_unique<NowindInterface>(conf);
220 }
else if (type ==
"Mirror") {
221 result = make_unique<MSXMirrorDevice>(conf);
224 "\" specified in configuration");
232 static XMLElement createConfig(
const std::string& name,
const std::string&
id)
235 config.addAttribute(
"id",
id);
242 static XMLElement xml(createConfig(
"Dummy",
""));
243 return make_unique<DummyDevice>(
DeviceConfig(hwConf, xml));
249 static XMLElement xml(createConfig(
"DeviceSwitch",
"DeviceSwitch"));
250 return make_unique<MSXDeviceSwitch>(
DeviceConfig(hwConf, xml));
256 static XMLElement xml(createConfig(
"MapperIO",
"MapperIO"));
257 return make_unique<MSXMapperIO>(
DeviceConfig(hwConf, xml));
263 static XMLElement xml(createConfig(
"VDPIODelay",
"VDPIODelay"));
264 return make_unique<VDPIODelay>(
DeviceConfig(hwConf, xml), cpuInterface);