openMSX
Public Member Functions | List of all members
openmsx::CassettePort Class Referencefinal

#include <CassettePort.hh>

Inheritance diagram for openmsx::CassettePort:
Inheritance graph
[legend]
Collaboration diagram for openmsx::CassettePort:
Collaboration graph
[legend]

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)
 
- Public Member Functions inherited from openmsx::CassettePortInterface
virtual ~CassettePortInterface ()=default
 
- Public Member Functions inherited from openmsx::Connector
 Connector (const Connector &)=delete
 
Connectoroperator= (const Connector &)=delete
 
const std::string & getName () const
 Name that identifies this connector. More...
 
virtual void plug (Pluggable &device, EmuTime::param time)
 This plugs a Pluggable in this Connector. More...
 
PluggablegetPlugged () const
 Returns the Pluggable currently plugged in. More...
 
PluggingControllergetPluggingController () const
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::Connector
 Connector (PluggingController &pluggingController, std::string name, std::unique_ptr< Pluggable > dummy)
 Creates a new Connector. More...
 
 ~Connector ()
 

Detailed Description

Definition at line 63 of file CassettePort.hh.

Constructor & Destructor Documentation

◆ CassettePort()

openmsx::CassettePort::CassettePort ( const HardwareConfig hwConf)
explicit

◆ ~CassettePort()

openmsx::CassettePort::~CassettePort ( )
override

Definition at line 63 of file CassettePort.cc.

References openmsx::MSXMotherBoard::getCurrentTime(), and unplug().

Member Function Documentation

◆ cassetteIn()

bool openmsx::CassettePort::cassetteIn ( EmuTime::param  time)
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 88 of file CassettePort.cc.

References openmsx::CassetteDevice::readSample(), and openmsx::LaserdiscPlayer::readSample().

◆ cassetteOut()

void openmsx::CassettePort::cassetteOut ( bool  output,
EmuTime::param  time 
)
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 76 of file CassettePort.cc.

References openmsx::CassetteDevice::setSignal().

◆ getClass()

std::string_view openmsx::CassettePort::getClass ( ) const
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 123 of file CassettePort.cc.

◆ getDescription()

std::string_view openmsx::CassettePort::getDescription ( ) const
overridevirtual

Get a description for this connector.

Implements openmsx::Connector.

Definition at line 118 of file CassettePort.cc.

◆ lastOut()

bool openmsx::CassettePort::lastOut ( ) const
overridevirtual

last bit written to CasOut.

for use in Pluggable::plugHelper()

Implements openmsx::CassettePortInterface.

Definition at line 83 of file CassettePort.cc.

◆ serialize()

template<typename Archive >
void openmsx::CassettePort::serialize ( Archive &  ar,
unsigned  version 
)

Definition at line 134 of file CassettePort.cc.

◆ setLaserdiscPlayer()

void openmsx::CassettePort::setLaserdiscPlayer ( LaserdiscPlayer laserdisc)
overridevirtual

Set the Laserdisc Player; when the motor control is off, sound is read from the laserdisc.

Implements openmsx::CassettePortInterface.

Definition at line 107 of file CassettePort.cc.

◆ setMotor()

void openmsx::CassettePort::setMotor ( bool  status,
EmuTime::param  time 
)
overridevirtual

Sets the cassette motor relay false = off true = on.

Implements openmsx::CassettePortInterface.

Definition at line 69 of file CassettePort.cc.

References openmsx::CassetteDevice::setMotor().

◆ unplug()

void openmsx::CassettePort::unplug ( EmuTime::param  time)
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 113 of file CassettePort.cc.

References openmsx::Connector::unplug().

Referenced by ~CassettePort().


The documentation for this class was generated from the following files: