openMSX
WD2793BasedFDC.cc
Go to the documentation of this file.
1#include "WD2793BasedFDC.hh"
2#include "XMLElement.hh"
3#include "serialize.hh"
4
5namespace openmsx {
6
7WD2793BasedFDC::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
17void WD2793BasedFDC::reset(EmuTime::param time)
18{
19 controller.reset(time);
20}
21
22template<typename Archive>
23void 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
This (abstract) class defines the DiskDrive interface.
Definition: DiskDrive.hh:13
void serialize(Archive &ar, unsigned version)
void reset(EmuTime::param time) override
This method is called on reset.
DriveMultiplexer multiplexer
WD2793BasedFDC(const DeviceConfig &config, const std::string &romId={}, bool needROM=true, DiskDrive::TrackMode mode=DiskDrive::TrackMode::NORMAL)
void reset(EmuTime::param time)
Definition: WD2793.cc:69
std::string getName(KeyCode keyCode)
Translate key code to key name.
Definition: Keys.cc:727
This file implemented 3 utility functions:
Definition: Autofire.cc:9
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)
Definition: serialize.hh:1009