openMSX
|
#include <CassettePort.hh>
Public Member Functions | |
CassettePort (const HardwareConfig &hwConf) | |
~CassettePort () override | |
void | setMotor (bool status, EmuTime::param time) override |
Sets the cassette motor relay false = off true = on. More... | |
void | cassetteOut (bool output, EmuTime::param time) override |
Writes one bit to the cassette port. More... | |
bool | cassetteIn (EmuTime::param time) override |
Reads one bit from the cassette port. More... | |
void | setLaserdiscPlayer (LaserdiscPlayer *laserdisc) override |
Set the Laserdisc Player; when the motor control is off, sound is read from the laserdisc. More... | |
bool | lastOut () const override |
last bit written to CasOut. More... | |
std::string_view | getDescription () const override |
Get a description for this connector. More... | |
std::string_view | getClass () const override |
A Connector belong to a certain class. More... | |
void | unplug (EmuTime::param time) override |
This unplugs the currently inserted Pluggable from this Connector. More... | |
template<typename Archive > | |
void | serialize (Archive &ar, unsigned version) |
![]() | |
virtual | ~CassettePortInterface ()=default |
virtual void | setMotor (bool status, EmuTime::param time)=0 |
Sets the cassette motor relay false = off true = on. More... | |
virtual void | cassetteOut (bool output, EmuTime::param time)=0 |
Writes one bit to the cassette port. More... | |
virtual bool | lastOut () const =0 |
last bit written to CasOut. More... | |
virtual bool | cassetteIn (EmuTime::param time)=0 |
Reads one bit from the cassette port. More... | |
virtual void | setLaserdiscPlayer (LaserdiscPlayer *laserdisc)=0 |
Set the Laserdisc Player; when the motor control is off, sound is read from the laserdisc. More... | |
![]() | |
Connector (const Connector &)=delete | |
Connector & | operator= (const Connector &)=delete |
const std::string & | getName () const |
Name that identifies this connector. More... | |
virtual std::string_view | getDescription () const =0 |
Get a description for this connector. More... | |
virtual std::string_view | getClass () const =0 |
A Connector belong to a certain class. More... | |
virtual void | plug (Pluggable &device, EmuTime::param time) |
This plugs a Pluggable in this Connector. More... | |
virtual void | unplug (EmuTime::param time) |
This unplugs the currently inserted Pluggable from this Connector. More... | |
Pluggable & | getPlugged () const |
Returns the Pluggable currently plugged in. More... | |
PluggingController & | getPluggingController () const |
template<typename Archive > | |
void | serialize (Archive &ar, unsigned version) |
Additional Inherited Members | |
![]() | |
Connector (PluggingController &pluggingController, std::string name, std::unique_ptr< Pluggable > dummy) | |
Creates a new Connector. More... | |
~Connector () | |
Definition at line 63 of file CassettePort.hh.
|
explicit |
Definition at line 46 of file CassettePort.cc.
References openmsx::Connector::getPluggingController(), and openmsx::PluggingController::registerPluggable().
|
override |
Definition at line 56 of file CassettePort.cc.
References openmsx::MSXMotherBoard::getCurrentTime(), and unplug().
|
overridevirtual |
Reads one bit from the cassette port.
From the RedBook: The cassette input is used to read the signal from the cassette EAR output. This is passed through a comparator to clean the edges and to convert to digital levels, but is otherwise unprocessed.
Implements openmsx::CassettePortInterface.
Definition at line 81 of file CassettePort.cc.
References openmsx::LaserdiscPlayer::readSample(), and openmsx::CassetteDevice::readSample().
|
overridevirtual |
Writes one bit to the cassette port.
From the RedBook: The CasOut bit is filtered and attenuated before being taken to the cassette DIN socket as the MIC signal. All cassette tone generation is performed in software.
Implements openmsx::CassettePortInterface.
Definition at line 69 of file CassettePort.cc.
References openmsx::CassetteDevice::setSignal().
|
overridevirtual |
A Connector belong to a certain class.
Only Pluggables of this class can be plugged in this Connector.
Implements openmsx::Connector.
Definition at line 114 of file CassettePort.cc.
|
overridevirtual |
Get a description for this connector.
Implements openmsx::Connector.
Definition at line 109 of file CassettePort.cc.
|
overridevirtual |
last bit written to CasOut.
for use in Pluggable::plugHelper()
Implements openmsx::CassettePortInterface.
Definition at line 76 of file CassettePort.cc.
void openmsx::CassettePort::serialize | ( | Archive & | ar, |
unsigned | version | ||
) |
Definition at line 125 of file CassettePort.cc.
|
overridevirtual |
Set the Laserdisc Player; when the motor control is off, sound is read from the laserdisc.
Implements openmsx::CassettePortInterface.
Definition at line 98 of file CassettePort.cc.
|
overridevirtual |
Sets the cassette motor relay false = off true = on.
Implements openmsx::CassettePortInterface.
Definition at line 62 of file CassettePort.cc.
References openmsx::CassetteDevice::setMotor().
|
overridevirtual |
This unplugs the currently inserted Pluggable from this Connector.
It is replaced by the dummy Pluggable provided by the concrete Connector subclass.
Reimplemented from openmsx::Connector.
Definition at line 104 of file CassettePort.cc.
References openmsx::Connector::unplug().
Referenced by ~CassettePort().