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, DiskDrive::TrackMode trackMode)
9  : MSXFDC(config, romId, needROM, trackMode)
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
openmsx::WD2793BasedFDC::multiplexer
DriveMultiplexer multiplexer
Definition: WD2793BasedFDC.hh:25
serialize.hh
openmsx::DiskDrive
This (abstract) class defines the DiskDrive interface.
Definition: DiskDrive.hh:13
openmsx::WD2793BasedFDC::controller
WD2793 controller
Definition: WD2793BasedFDC.hh:26
openmsx::DeviceConfig
Definition: DeviceConfig.hh:20
XMLElement.hh
openmsx::WD2793BasedFDC
Definition: WD2793BasedFDC.hh:12
openmsx::WD2793BasedFDC::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: WD2793BasedFDC.cc:17
openmsx::MSXFDC
Definition: MSXFDC.hh:14
openmsx::Keys::getName
string getName(KeyCode keyCode)
Translate key code to key name.
Definition: Keys.cc:740
INSTANTIATE_SERIALIZE_METHODS
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)
Definition: serialize.hh:981
openmsx::WD2793BasedFDC::WD2793BasedFDC
WD2793BasedFDC(const DeviceConfig &config, const std::string &romId={}, bool needROM=true, DiskDrive::TrackMode mode=DiskDrive::TrackMode::NORMAL)
Definition: WD2793BasedFDC.cc:7
openmsx::WD2793BasedFDC::serialize
void serialize(Archive &ar, unsigned version)
Definition: WD2793BasedFDC.cc:23
WD2793BasedFDC.hh
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::WD2793::reset
void reset(EmuTime::param time)
Definition: WD2793.cc:71
openmsx::DiskDrive::TrackMode
TrackMode
Definition: DiskDrive.hh:15