openMSX
WD2793BasedFDC.cc
Go to the documentation of this file.
1 #include "WD2793BasedFDC.hh"
2 #include "XMLElement.hh"
3 #include "serialize.hh"
4 
5 namespace openmsx {
6 
7 WD2793BasedFDC::WD2793BasedFDC(const DeviceConfig& config, const std::string& romId,
8  bool needROM)
9  : MSXFDC(config, romId, needROM)
10  , multiplexer(reinterpret_cast<DiskDrive**>(drives))
11  , controller(
12  getScheduler(), multiplexer, getCliComm(), getCurrentTime(),
13  config.getXML()->getName() == "WD1770")
14 {
15 }
16 
17 void WD2793BasedFDC::reset(EmuTime::param time)
18 {
19  controller.reset(time);
20 }
21 
22 template<typename Archive>
23 void WD2793BasedFDC::serialize(Archive& ar, unsigned /*version*/)
24 {
25  ar.template serializeBase<MSXFDC>(*this);
26  ar.serialize("multiplexer", multiplexer,
27  "wd2793", controller);
28 }
30 
31 } // namespace openmsx
void reset(EmuTime::param time) override
This method is called on reset.
WD2793BasedFDC(const DeviceConfig &config, const std::string &romId={}, bool needROM=true)
void serialize(Archive &ar, unsigned version)
DriveMultiplexer multiplexer
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
void reset(EmuTime::param time)
Definition: WD2793.cc:71
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)
Definition: serialize.hh:981
string getName(KeyCode keyCode)
Translate key code to key name.
Definition: Keys.cc:589
This (abstract) class defines the DiskDrive interface.
Definition: DiskDrive.hh:12