openMSX
Public Member Functions | Protected Member Functions | List of all members
openmsx::AY8910Periphery Class Reference

Models the general purpose I/O ports of the AY8910. More...

#include <AY8910Periphery.hh>

Inheritance diagram for openmsx::AY8910Periphery:
Inheritance graph
[legend]

Public Member Functions

virtual byte readA (EmuTime::param time)
 Reads the state of the peripheral on port A.
 
virtual byte readB (EmuTime::param time)
 Similar to readA, but reads port B.
 
virtual void writeA (byte value, EmuTime::param time)
 Writes to the peripheral on port A.
 
virtual void writeB (byte value, EmuTime::param time)
 Similar to writeA, but writes port B.
 

Protected Member Functions

 AY8910Periphery ()=default
 
 ~AY8910Periphery ()=default
 

Detailed Description

Models the general purpose I/O ports of the AY8910.

The default implementation handles an empty periphery: nothing is connected to the I/O ports. This class can be overridden to connect peripherals.

Definition at line 14 of file AY8910Periphery.hh.

Constructor & Destructor Documentation

◆ AY8910Periphery()

openmsx::AY8910Periphery::AY8910Periphery ( )
protecteddefault

◆ ~AY8910Periphery()

openmsx::AY8910Periphery::~AY8910Periphery ( )
protecteddefault

Member Function Documentation

◆ readA()

byte openmsx::AY8910Periphery::readA ( EmuTime::param  time)
virtual

Reads the state of the peripheral on port A.

Since the AY8910 doesn't have control lines for the I/O ports, a peripheral is not aware that it is read, which means that "peek" and "read" are equivalent.

Parameters
timeThe moment in time the peripheral's state is read. On subsequent calls, the time will always be increasing.
Returns
the value read; unconnected bits should be 1

Reimplemented in openmsx::DummyAY8910Periphery.

Definition at line 5 of file AY8910Periphery.cc.

Referenced by openmsx::AY8910::peekRegister(), and openmsx::AY8910::readRegister().

◆ readB()

byte openmsx::AY8910Periphery::readB ( EmuTime::param  time)
virtual

Similar to readA, but reads port B.

Reimplemented in openmsx::DummyAY8910Periphery.

Definition at line 10 of file AY8910Periphery.cc.

Referenced by openmsx::AY8910::peekRegister(), and openmsx::AY8910::readRegister().

◆ writeA()

void openmsx::AY8910Periphery::writeA ( byte  value,
EmuTime::param  time 
)
virtual

Writes to the peripheral on port A.

Parameters
valueThe value to write.
timeThe moment in time the value is written. On subsequent calls, the time will always be increasing.

Reimplemented in openmsx::DummyAY8910Periphery.

Definition at line 15 of file AY8910Periphery.cc.

◆ writeB()

void openmsx::AY8910Periphery::writeB ( byte  value,
EmuTime::param  time 
)
virtual

Similar to writeA, but writes port B.

Reimplemented in openmsx::DummyAY8910Periphery.

Definition at line 20 of file AY8910Periphery.cc.


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