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

#include <WD2793.hh>

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

Public Types

enum  FSMState {
  FSM_NONE, FSM_SEEK, FSM_TYPE2_LOADED, FSM_TYPE2_NOT_FOUND,
  FSM_TYPE2_ROTATED, FSM_CHECK_WRITE, FSM_PRE_WRITE_SECTOR, FSM_WRITE_SECTOR,
  FSM_POST_WRITE_SECTOR, FSM_TYPE3_LOADED, FSM_TYPE3_ROTATED, FSM_WRITE_TRACK,
  FSM_READ_TRACK, FSM_IDX_IRQ
}
 

Public Member Functions

 WD2793 (Scheduler &scheduler, DiskDrive &drive, CliComm &cliComm, EmuTime::param time, bool isWD1770)
 This class has emulation for WD1770, WD1793, WD2793. More...
 
void reset (EmuTime::param time)
 
byte getStatusReg (EmuTime::param time)
 
byte getTrackReg (EmuTime::param time)
 
byte getSectorReg (EmuTime::param time)
 
byte getDataReg (EmuTime::param time)
 
byte peekStatusReg (EmuTime::param time) const
 
byte peekTrackReg (EmuTime::param time) const
 
byte peekSectorReg (EmuTime::param time) const
 
byte peekDataReg (EmuTime::param time) const
 
void setCommandReg (byte value, EmuTime::param time)
 
void setTrackReg (byte value, EmuTime::param time)
 
void setSectorReg (byte value, EmuTime::param time)
 
void setDataReg (byte value, EmuTime::param time)
 
bool getIRQ (EmuTime::param time)
 
bool getDTRQ (EmuTime::param time)
 
bool peekIRQ (EmuTime::param time) const
 
bool peekDTRQ (EmuTime::param time) const
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 
- Public Member Functions inherited from openmsx::Schedulable
 Schedulable (const Schedulable &)=delete
 
Schedulableoperator= (const Schedulable &)=delete
 
virtual void schedulerDeleted ()
 Just before the the Scheduler is deleted, it calls this method of all the Schedulables that are still registered. More...
 
SchedulergetScheduler () const
 
EmuTime::param getCurrentTime () const
 Convenience method: This is the same as getScheduler().getCurrentTime(). More...
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 

Additional Inherited Members

- Static Public Member Functions inherited from openmsx::Schedulable
template<typename Archive >
static std::vector< SyncPointBWserializeBW (Archive &ar)
 
template<typename Archive >
static void restoreOld (Archive &ar, std::vector< Schedulable *> schedulables)
 
- Protected Member Functions inherited from openmsx::Schedulable
 Schedulable (Scheduler &scheduler)
 
 ~Schedulable ()
 
void setSyncPoint (EmuTime::param timestamp)
 
bool removeSyncPoint ()
 
void removeSyncPoints ()
 
bool pendingSyncPoint () const
 
bool pendingSyncPoint (EmuTime &result) const
 

Detailed Description

Definition at line 16 of file WD2793.hh.

Member Enumeration Documentation

◆ FSMState

Enumerator
FSM_NONE 
FSM_SEEK 
FSM_TYPE2_LOADED 
FSM_TYPE2_NOT_FOUND 
FSM_TYPE2_ROTATED 
FSM_CHECK_WRITE 
FSM_PRE_WRITE_SECTOR 
FSM_WRITE_SECTOR 
FSM_POST_WRITE_SECTOR 
FSM_TYPE3_LOADED 
FSM_TYPE3_ROTATED 
FSM_WRITE_TRACK 
FSM_READ_TRACK 
FSM_IDX_IRQ 

Definition at line 49 of file WD2793.hh.

Constructor & Destructor Documentation

◆ WD2793()

openmsx::WD2793::WD2793 ( Scheduler scheduler_,
DiskDrive drive_,
CliComm cliComm_,
EmuTime::param  time,
bool  isWD1770_ 
)

This class has emulation for WD1770, WD1793, WD2793.

Though at the moment the only emulated difference between WD1770 and WD{12}793 is that WD1770 has no ready input signal. (E.g. we don't emulate the WD1770 motor out signal yet).

Definition at line 47 of file WD2793.cc.

References reset(), and openmsx::RawTrack::STANDARD_SIZE.

Member Function Documentation

◆ getDataReg()

byte openmsx::WD2793::getDataReg ( EmuTime::param  time)

◆ getDTRQ()

bool openmsx::WD2793::getDTRQ ( EmuTime::param  time)

◆ getIRQ()

bool openmsx::WD2793::getIRQ ( EmuTime::param  time)

◆ getSectorReg()

byte openmsx::WD2793::getSectorReg ( EmuTime::param  time)

◆ getStatusReg()

byte openmsx::WD2793::getStatusReg ( EmuTime::param  time)

◆ getTrackReg()

byte openmsx::WD2793::getTrackReg ( EmuTime::param  time)

◆ peekDataReg()

byte openmsx::WD2793::peekDataReg ( EmuTime::param  time) const

Definition at line 324 of file WD2793.cc.

References openmsx::A0_FLAG, openmsx::RawTrack::Sector::addrCrcErr, openmsx::RawTrack::Sector::addrIdx, openmsx::DiskDrive::applyWd2793ReadTrackQuirk(), openmsx::BUSY, openmsx::CRC_ERROR, openmsx::RawTrack::Sector::dataIdx, openmsx::RawTrack::Sector::deleted, openmsx::DiskDrive::flushTrack(), FSM_CHECK_WRITE, FSM_IDX_IRQ, FSM_NONE, FSM_POST_WRITE_SECTOR, FSM_PRE_WRITE_SECTOR, FSM_READ_TRACK, FSM_SEEK, FSM_TYPE2_LOADED, FSM_TYPE2_NOT_FOUND, FSM_TYPE2_ROTATED, FSM_TYPE3_LOADED, FSM_TYPE3_ROTATED, FSM_WRITE_SECTOR, FSM_WRITE_TRACK, openmsx::DiskDrive::getNextSector(), openmsx::DiskDrive::getTimeTillIndexPulse(), openmsx::DiskDrive::getTrackLength(), openmsx::CRC16::getValue(), openmsx::CRC16::init(), openmsx::DiskDrive::invalidateWd2793ReadTrackQuirk(), openmsx::DiskDrive::isTrack00(), openmsx::DiskDrive::isWriteProtected(), openmsx::LOST_DATA, openmsx::EmuDuration::msec(), openmsx::NOT_READY, peekDTRQ(), openmsx::Schedulable::pendingSyncPoint(), openmsx::DiskDrive::readTrackByte(), openmsx::RECORD_NOT_FOUND, openmsx::RECORD_TYPE, openmsx::DynamicClock::reset(), openmsx::RawTrack::Sector::sector, openmsx::SERIALIZE_ENUM(), openmsx::Schedulable::setSyncPoint(), openmsx::RawTrack::Sector::sizeCode, openmsx::DiskDrive::step(), openmsx::RawTrack::Sector::track, UNREACHABLE, openmsx::CRC16::update(), openmsx::WRITE_PROTECTED, and openmsx::DiskDrive::writeTrackByte().

Referenced by openmsx::AVTFDC::peekIO(), openmsx::MicrosolFDC::peekIO(), openmsx::SVIFDC::peekIO(), openmsx::ToshibaFDC::peekMem(), openmsx::SanyoFDC::peekMem(), openmsx::NationalFDC::peekMem(), openmsx::VictorFDC::peekMem(), openmsx::PhilipsFDC::peekMem(), and openmsx::SpectravideoFDC::peekMem().

◆ peekDTRQ()

bool openmsx::WD2793::peekDTRQ ( EmuTime::param  time) const

◆ peekIRQ()

bool openmsx::WD2793::peekIRQ ( EmuTime::param  time) const

◆ peekSectorReg()

byte openmsx::WD2793::peekSectorReg ( EmuTime::param  time) const

◆ peekStatusReg()

byte openmsx::WD2793::peekStatusReg ( EmuTime::param  time) const

◆ peekTrackReg()

byte openmsx::WD2793::peekTrackReg ( EmuTime::param  time) const

◆ reset()

void openmsx::WD2793::reset ( EmuTime::param  time)

◆ serialize()

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

◆ setCommandReg()

void openmsx::WD2793::setCommandReg ( byte  value,
EmuTime::param  time 
)

◆ setDataReg()

void openmsx::WD2793::setDataReg ( byte  value,
EmuTime::param  time 
)

◆ setSectorReg()

void openmsx::WD2793::setSectorReg ( byte  value,
EmuTime::param  time 
)

◆ setTrackReg()

void openmsx::WD2793::setTrackReg ( byte  value,
EmuTime::param  time 
)

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