openMSX
Public Member Functions | Static Public Attributes | List of all members
openmsx::DiskDrive Class Referenceabstract

This (abstract) class defines the DiskDrive interface. More...

#include <DiskDrive.hh>

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

Public Member Functions

virtual ~DiskDrive ()
 
virtual bool isDiskInserted () const =0
 Is drive ready? More...
 
virtual bool isWriteProtected () const =0
 Is disk write protected? More...
 
virtual bool isDoubleSided () const =0
 Is disk double sided? More...
 
virtual bool isTrack00 () const =0
 Head above track 0. More...
 
virtual void setSide (bool side)=0
 Side select. More...
 
virtual void step (bool direction, EmuTime::param time)=0
 Step head. More...
 
virtual void setMotor (bool status, EmuTime::param time)=0
 Set motor on/off. More...
 
virtual bool indexPulse (EmuTime::param time)=0
 Gets the state of the index pulse. More...
 
virtual EmuTime getTimeTillIndexPulse (EmuTime::param time, int count=1)=0
 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. More...
 
virtual void setHeadLoaded (bool status, EmuTime::param time)=0
 Set head loaded status. More...
 
virtual bool headLoaded (EmuTime::param time)=0
 Is head loaded? More...
 
virtual void writeTrack (const RawTrack &track)=0
 
virtual void readTrack (RawTrack &track)=0
 
virtual EmuTime getNextSector (EmuTime::param time, RawTrack &track, RawTrack::Sector &sector)=0
 
virtual bool diskChanged ()=0
 Is disk changed? More...
 
virtual bool peekDiskChanged () const =0
 
virtual bool isDummyDrive () const =0
 Is there a dummy (unconncted) drive? More...
 

Static Public Attributes

static const unsigned ROTATIONS_PER_SECOND = 5
 

Detailed Description

This (abstract) class defines the DiskDrive interface.

Definition at line 13 of file DiskDrive.hh.

Constructor & Destructor Documentation

openmsx::DiskDrive::~DiskDrive ( )
virtual

Definition at line 8 of file DiskDrive.cc.

Member Function Documentation

virtual bool openmsx::DiskDrive::diskChanged ( )
pure virtual
virtual EmuTime openmsx::DiskDrive::getNextSector ( EmuTime::param  time,
RawTrack track,
RawTrack::Sector sector 
)
pure virtual
virtual EmuTime openmsx::DiskDrive::getTimeTillIndexPulse ( EmuTime::param  time,
int  count = 1 
)
pure virtual

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.

Implemented in openmsx::DummyDrive, openmsx::DriveMultiplexer, and openmsx::RealDrive.

Referenced by openmsx::DriveMultiplexer::getTimeTillIndexPulse().

virtual bool openmsx::DiskDrive::headLoaded ( EmuTime::param  time)
pure virtual
virtual bool openmsx::DiskDrive::indexPulse ( EmuTime::param  time)
pure virtual

Gets the state of the index pulse.

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

Implemented in openmsx::DummyDrive, openmsx::DriveMultiplexer, and openmsx::RealDrive.

Referenced by openmsx::WD2793::getStatusReg(), and openmsx::DriveMultiplexer::indexPulse().

virtual bool openmsx::DiskDrive::isDiskInserted ( ) const
pure virtual
virtual bool openmsx::DiskDrive::isDoubleSided ( ) const
pure virtual
virtual bool openmsx::DiskDrive::isDummyDrive ( ) const
pure virtual

Is there a dummy (unconncted) drive?

Implemented in openmsx::DummyDrive, openmsx::DriveMultiplexer, and openmsx::RealDrive.

Referenced by openmsx::DriveMultiplexer::isDummyDrive().

virtual bool openmsx::DiskDrive::isTrack00 ( ) const
pure virtual
virtual bool openmsx::DiskDrive::isWriteProtected ( ) const
pure virtual
virtual bool openmsx::DiskDrive::peekDiskChanged ( ) const
pure virtual
virtual void openmsx::DiskDrive::readTrack ( RawTrack track)
pure virtual
virtual void openmsx::DiskDrive::setHeadLoaded ( bool  status,
EmuTime::param  time 
)
pure virtual

Set head loaded status.

Parameters
statusfalse = not loaded, true = loaded.
timeThe moment in emulated time this action takes place.

Implemented in openmsx::DummyDrive, openmsx::DriveMultiplexer, and openmsx::RealDrive.

Referenced by openmsx::DriveMultiplexer::setHeadLoaded().

virtual void openmsx::DiskDrive::setMotor ( bool  status,
EmuTime::param  time 
)
pure virtual

Set motor on/off.

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

Implemented in openmsx::DummyDrive, openmsx::DriveMultiplexer, and openmsx::RealDrive.

Referenced by openmsx::TC8566AF::reset(), openmsx::DriveMultiplexer::selectDrive(), openmsx::DriveMultiplexer::setMotor(), and openmsx::TC8566AF::writeReg().

virtual void openmsx::DiskDrive::setSide ( bool  side)
pure virtual

Side select.

Parameters
sidefalse = side 0, true = side 1.

Implemented in openmsx::DummyDrive, openmsx::DriveMultiplexer, and openmsx::RealDrive.

Referenced by openmsx::DriveMultiplexer::selectDrive(), and openmsx::DriveMultiplexer::setSide().

virtual void openmsx::DiskDrive::step ( bool  direction,
EmuTime::param  time 
)
pure virtual

Step head.

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

Implemented in openmsx::DummyDrive, openmsx::DriveMultiplexer, and openmsx::RealDrive.

Referenced by openmsx::DriveMultiplexer::step().

virtual void openmsx::DiskDrive::writeTrack ( const RawTrack track)
pure virtual

Member Data Documentation

const unsigned openmsx::DiskDrive::ROTATIONS_PER_SECOND = 5
static

Definition at line 16 of file DiskDrive.hh.


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