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

This class implements a not connected disk drive. More...

#include <DiskDrive.hh>

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

Public Member Functions

bool isDiskInserted () const override
 Is drive ready?
 
bool isWriteProtected () const override
 Is disk write protected?
 
bool isDoubleSided () override
 Is disk double sided?
 
bool isTrack00 () const override
 Head above track 0.
 
void setSide (bool side) override
 Side select.
 
bool getSide () const override
 
void step (bool direction, EmuTime::param time) override
 Step head.
 
void setMotor (bool status, EmuTime::param time) override
 Set motor on/off.
 
bool getMotor () const override
 Returns the previously set motor status.
 
bool indexPulse (EmuTime::param time) override
 Gets the state of the index pulse.
 
EmuTime getTimeTillIndexPulse (EmuTime::param time, int count) override
 Return the time till the start of the next index pulse When there is no disk in the drive or when the disk is not spinning, this function returns the current time.
 
unsigned getTrackLength () override
 
void writeTrackByte (int idx, uint8_t val, bool addIdam) override
 
uint8_t readTrackByte (int idx) override
 
EmuTime getNextSector (EmuTime::param time, RawTrack::Sector &sector) override
 
void flushTrack () override
 
bool diskChanged () override
 Is disk changed?
 
bool peekDiskChanged () const override
 
bool isDummyDrive () const override
 Is there a dummy (unconnected) drive?
 
void applyWd2793ReadTrackQuirk () override
 See RawTrack::applyWd2793ReadTrackQuirk()
 
void invalidateWd2793ReadTrackQuirk () override
 
- Public Member Functions inherited from openmsx::DiskDrive
virtual ~DiskDrive ()=default
 

Additional Inherited Members

- Public Types inherited from openmsx::DiskDrive
enum class  TrackMode { NORMAL , YAMAHA_FD_03 }
 
- Static Public Attributes inherited from openmsx::DiskDrive
static constexpr unsigned ROTATIONS_PER_SECOND = 5
 

Detailed Description

This class implements a not connected disk drive.

Definition at line 105 of file DiskDrive.hh.

Member Function Documentation

◆ applyWd2793ReadTrackQuirk()

void openmsx::DummyDrive::applyWd2793ReadTrackQuirk ( )
overridevirtual

See RawTrack::applyWd2793ReadTrackQuirk()

Implements openmsx::DiskDrive.

Definition at line 103 of file DiskDrive.cc.

◆ diskChanged()

bool openmsx::DummyDrive::diskChanged ( )
overridevirtual

Is disk changed?

Implements openmsx::DiskDrive.

Definition at line 88 of file DiskDrive.cc.

◆ flushTrack()

void openmsx::DummyDrive::flushTrack ( )
overridevirtual

Implements openmsx::DiskDrive.

Definition at line 83 of file DiskDrive.cc.

◆ getMotor()

bool openmsx::DummyDrive::getMotor ( ) const
overridevirtual

Returns the previously set motor status.

Implements openmsx::DiskDrive.

Definition at line 48 of file DiskDrive.cc.

◆ getNextSector()

EmuTime openmsx::DummyDrive::getNextSector ( EmuTime::param  time,
RawTrack::Sector sector 
)
overridevirtual

Implements openmsx::DiskDrive.

Definition at line 78 of file DiskDrive.cc.

◆ getSide()

bool openmsx::DummyDrive::getSide ( ) const
overridevirtual

Implements openmsx::DiskDrive.

Definition at line 33 of file DiskDrive.cc.

◆ getTimeTillIndexPulse()

EmuTime openmsx::DummyDrive::getTimeTillIndexPulse ( EmuTime::param  time,
int  count 
)
overridevirtual

Return the time till the start of the next index pulse When there is no disk in the drive or when the disk is not spinning, this function returns the current time.

Parameters
timeThe current time
countNumber of required index pulses.

Implements openmsx::DiskDrive.

Definition at line 58 of file DiskDrive.cc.

◆ getTrackLength()

unsigned openmsx::DummyDrive::getTrackLength ( )
overridevirtual

Implements openmsx::DiskDrive.

Definition at line 63 of file DiskDrive.cc.

References openmsx::RawTrack::STANDARD_SIZE.

◆ indexPulse()

bool openmsx::DummyDrive::indexPulse ( EmuTime::param  time)
overridevirtual

Gets the state of the index pulse.

Parameters
timeThe moment in emulated time to get the pulse state for.

Implements openmsx::DiskDrive.

Definition at line 53 of file DiskDrive.cc.

◆ invalidateWd2793ReadTrackQuirk()

void openmsx::DummyDrive::invalidateWd2793ReadTrackQuirk ( )
overridevirtual

Implements openmsx::DiskDrive.

Definition at line 108 of file DiskDrive.cc.

◆ isDiskInserted()

bool openmsx::DummyDrive::isDiskInserted ( ) const
overridevirtual

Is drive ready?

Implements openmsx::DiskDrive.

Definition at line 8 of file DiskDrive.cc.

◆ isDoubleSided()

bool openmsx::DummyDrive::isDoubleSided ( )
overridevirtual

Is disk double sided?

Implements openmsx::DiskDrive.

Definition at line 18 of file DiskDrive.cc.

◆ isDummyDrive()

bool openmsx::DummyDrive::isDummyDrive ( ) const
overridevirtual

Is there a dummy (unconnected) drive?

Implements openmsx::DiskDrive.

Definition at line 98 of file DiskDrive.cc.

◆ isTrack00()

bool openmsx::DummyDrive::isTrack00 ( ) const
overridevirtual

Head above track 0.

Implements openmsx::DiskDrive.

Definition at line 23 of file DiskDrive.cc.

◆ isWriteProtected()

bool openmsx::DummyDrive::isWriteProtected ( ) const
overridevirtual

Is disk write protected?

Implements openmsx::DiskDrive.

Definition at line 13 of file DiskDrive.cc.

◆ peekDiskChanged()

bool openmsx::DummyDrive::peekDiskChanged ( ) const
overridevirtual

Implements openmsx::DiskDrive.

Definition at line 93 of file DiskDrive.cc.

◆ readTrackByte()

uint8_t openmsx::DummyDrive::readTrackByte ( int  idx)
overridevirtual

Implements openmsx::DiskDrive.

Definition at line 73 of file DiskDrive.cc.

◆ setMotor()

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

Set motor on/off.

Parameters
statusfalse = off, true = on.
timeThe moment in emulated time this action takes place.

Implements openmsx::DiskDrive.

Definition at line 43 of file DiskDrive.cc.

◆ setSide()

void openmsx::DummyDrive::setSide ( bool  side)
overridevirtual

Side select.

Parameters
sidefalse = side 0, true = side 1.

Implements openmsx::DiskDrive.

Definition at line 28 of file DiskDrive.cc.

◆ step()

void openmsx::DummyDrive::step ( bool  direction,
EmuTime::param  time 
)
overridevirtual

Step head.

Parameters
directionfalse = out, true = in.
timeThe moment in emulated time this action takes place.

Implements openmsx::DiskDrive.

Definition at line 38 of file DiskDrive.cc.

◆ writeTrackByte()

void openmsx::DummyDrive::writeTrackByte ( int  idx,
uint8_t  val,
bool  addIdam 
)
overridevirtual

Implements openmsx::DiskDrive.

Definition at line 68 of file DiskDrive.cc.


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