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.
 
void cassetteOut (bool output, EmuTime::param time) override
 Writes one bit to the cassette port.
 
bool cassetteIn (EmuTime::param time) override
 Reads one bit from the cassette port.
 
bool lastOut () const override
 last bit written to CasOut.
 
std::string_view getDescription () const override
 Get a description for this connector.
 
std::string_view getClass () const override
 A Connector belong to a certain class.
 
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
 
 Connector (Connector &&)=delete
 
Connectoroperator= (const Connector &)=delete
 
Connectoroperator= (Connector &&)=delete
 
const std::string & getName () const
 Name that identifies this connector.
 
virtual void plug (Pluggable &device, EmuTime::param time)
 This plugs a Pluggable in this Connector.
 
virtual void unplug (EmuTime::param time)
 This unplugs the currently inserted Pluggable from this Connector.
 
PluggablegetPlugged () const
 Returns the Pluggable currently plugged in.
 
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.
 
 ~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

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 81 of file CassettePort.cc.

References openmsx::CassetteDevice::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 69 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 109 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 104 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 76 of file CassettePort.cc.

◆ serialize()

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

Definition at line 120 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 62 of file CassettePort.cc.

References openmsx::CassetteDevice::setMotor().


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