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

This class implements a real drive, single or double sided. More...

#include <RealDrive.hh>

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

Public Member Functions

 RealDrive (MSXMotherBoard &motherBoard, EmuDuration::param motorTimeout, bool signalsNeedMotorOn, bool doubleSided)
virtual ~RealDrive ()
virtual bool isDiskInserted () const
virtual bool isWriteProtected () const
virtual bool isDoubleSided () const
virtual bool isTrack00 () const
virtual void setSide (bool side)
virtual void step (bool direction, EmuTime::param time)
virtual void setMotor (bool status, EmuTime::param time)
virtual bool indexPulse (EmuTime::param time)
virtual EmuTime getTimeTillIndexPulse (EmuTime::param time, int count)
virtual void setHeadLoaded (bool status, EmuTime::param time)
virtual bool headLoaded (EmuTime::param time)
virtual void writeTrack (const RawTrack &track)
virtual void readTrack (RawTrack &track)
virtual EmuTime getNextSector (EmuTime::param time, RawTrack &track, RawTrack::Sector &sector)
virtual bool diskChanged ()
virtual bool peekDiskChanged () const
virtual bool isDummyDrive () const
template<typename Archive >
void serialize (Archive &ar, unsigned version)
- Public Member Functions inherited from openmsx::DiskDrive
virtual ~DiskDrive ()
virtual bool isDiskInserted () const =0
 Is drive ready?
virtual bool isWriteProtected () const =0
 Is disk write protected?
virtual bool isDoubleSided () const =0
 Is disk double sided?
virtual bool isTrack00 () const =0
 Head above track 0.
virtual void setSide (bool side)=0
 Side select.
virtual void step (bool direction, EmuTime::param time)=0
 Step head.
virtual void setMotor (bool status, EmuTime::param time)=0
 Set motor on/off.
virtual bool indexPulse (EmuTime::param time)=0
 Gets the state of the index pulse.
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.
virtual void setHeadLoaded (bool status, EmuTime::param time)=0
 Set head loaded status.
virtual bool headLoaded (EmuTime::param time)=0
 Is head loaded?
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?
virtual bool peekDiskChanged () const =0
virtual bool isDummyDrive () const =0
 Is there a dummy (unconncted) drive?
- Public Member Functions inherited from openmsx::Schedulable
virtual void executeUntil (EmuTime::param time, int userData)=0
 When the previously registered syncPoint is reached, this method gets called.
virtual void schedulerDeleted ()
 Just before the the Scheduler is deleted, it calls this method of all the Schedulables that are still registered.
SchedulergetScheduler () const
EmuTime::param getCurrentTime () const
 Convenience method: This is the same as getScheduler().getCurrentTime().
template<typename Archive >
void serialize (Archive &ar, unsigned version)

Additional Inherited Members

- Static Public Attributes inherited from openmsx::DiskDrive
static const unsigned ROTATIONS_PER_SECOND = 5
- Protected Member Functions inherited from openmsx::Schedulable
 Schedulable (Scheduler &scheduler)
virtual ~Schedulable ()
void setSyncPoint (EmuTime::param timestamp, int userData=0)
bool removeSyncPoint (int userData=0)
void removeSyncPoints ()
bool pendingSyncPoint (int userData=0) const

Detailed Description

This class implements a real drive, single or double sided.

Definition at line 18 of file RealDrive.hh.

Constructor & Destructor Documentation

openmsx::RealDrive::RealDrive ( MSXMotherBoard motherBoard,
EmuDuration::param  motorTimeout,
bool  signalsNeedMotorOn,
bool  doubleSided 
)
openmsx::RealDrive::~RealDrive ( )
virtual

Member Function Documentation

bool openmsx::RealDrive::diskChanged ( )
virtual

Definition at line 329 of file RealDrive.cc.

EmuTime openmsx::RealDrive::getNextSector ( EmuTime::param  time,
RawTrack track,
RawTrack::Sector sector 
)
virtual
EmuTime openmsx::RealDrive::getTimeTillIndexPulse ( EmuTime::param  time,
int  count 
)
virtual
bool openmsx::RealDrive::headLoaded ( EmuTime::param  time)
virtual
bool openmsx::RealDrive::indexPulse ( EmuTime::param  time)
virtual

Definition at line 262 of file RealDrive.cc.

References isDiskInserted().

bool openmsx::RealDrive::isDiskInserted ( ) const
virtual

Definition at line 93 of file RealDrive.cc.

Referenced by getTimeTillIndexPulse(), and indexPulse().

bool openmsx::RealDrive::isDoubleSided ( ) const
virtual

Definition at line 120 of file RealDrive.cc.

bool openmsx::RealDrive::isDummyDrive ( ) const
virtual

Definition at line 339 of file RealDrive.cc.

bool openmsx::RealDrive::isTrack00 ( ) const
virtual

Definition at line 151 of file RealDrive.cc.

bool openmsx::RealDrive::isWriteProtected ( ) const
virtual

Definition at line 112 of file RealDrive.cc.

bool openmsx::RealDrive::peekDiskChanged ( ) const
virtual

Definition at line 334 of file RealDrive.cc.

void openmsx::RealDrive::readTrack ( RawTrack track)
virtual

Definition at line 303 of file RealDrive.cc.

template<typename Archive >
void openmsx::RealDrive::serialize ( Archive &  ar,
unsigned  version 
)
void openmsx::RealDrive::setHeadLoaded ( bool  status,
EmuTime::param  time 
)
virtual

Definition at line 284 of file RealDrive.cc.

References openmsx::Clock< FREQ_NUM, FREQ_DENOM >::advance().

void openmsx::RealDrive::setMotor ( bool  status,
EmuTime::param  time 
)
virtual
void openmsx::RealDrive::setSide ( bool  side)
virtual

Definition at line 126 of file RealDrive.cc.

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

Definition at line 131 of file RealDrive.cc.

References PRT_DEBUG.

void openmsx::RealDrive::writeTrack ( const RawTrack track)
virtual

Definition at line 298 of file RealDrive.cc.


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