|
openMSX
|
#include <RawTrack.hh>
Classes | |
| struct | Sector |
Public Member Functions | |
| RawTrack () | |
| void | clear (unsigned size) |
| Clear track data. | |
| unsigned | getLength () const |
| Get track length. | |
| void | addIdam (unsigned idx) |
| byte | read (int idx) const |
| void | write (int idx, byte val) |
| int | wrapIndex (int idx) const |
| byte * | getRawBuffer () |
| const byte * | getRawBuffer () const |
| const std::vector< unsigned > & | getIdamBuffer () const |
| std::vector< Sector > | decodeAll () const |
| Get info on all sectors in this track. | |
| bool | decodeNextSector (unsigned startIdx, Sector §or) const |
| Get the next sector (starting from a certain index). | |
| bool | decodeSector (byte sectorNum, Sector §or) const |
| Get a sector with a specific number. | |
| void | readBlock (int idx, unsigned size, byte *destination) const |
| Like memcpy() but copy from/to circular buffer. | |
| void | writeBlock (int idx, unsigned size, const byte *source) |
| word | calcCrc (int idx, int length) const |
| Convenience method to calculate CRC for part of this track. | |
| void | updateCrc (CRC16 &crc, int idx, int size) const |
| template<typename Archive > | |
| void | serialize (Archive &ar, unsigned version) |
Static Public Attributes | |
| static const unsigned | STANDARD_SIZE = 6250 |
Definition at line 62 of file RawTrack.hh.
| openmsx::RawTrack::RawTrack | ( | ) |
Definition at line 24 of file RawTrack.cc.
References clear(), and STANDARD_SIZE.
| void openmsx::RawTrack::addIdam | ( | unsigned | idx | ) |
Definition at line 35 of file RawTrack.cc.
Referenced by openmsx::DMKDiskImage::readTrack(), and openmsx::WD2793::setDataReg().
| word openmsx::RawTrack::calcCrc | ( | int | idx, |
| int | length | ||
| ) | const |
Convenience method to calculate CRC for part of this track.
Definition at line 173 of file RawTrack.cc.
References openmsx::CRC16::getValue(), and updateCrc().
| void openmsx::RawTrack::clear | ( | unsigned | size | ) |
Clear track data.
Also sets the track length.
Definition at line 29 of file RawTrack.cc.
Referenced by RawTrack(), and openmsx::DMKDiskImage::readTrack().
| vector< RawTrack::Sector > openmsx::RawTrack::decodeAll | ( | ) | const |
Get info on all sectors in this track.
Definition at line 102 of file RawTrack.cc.
| bool openmsx::RawTrack::decodeNextSector | ( | unsigned | startIdx, |
| Sector & | sector | ||
| ) | const |
Get the next sector (starting from a certain index).
Definition at line 125 of file RawTrack.cc.
Referenced by openmsx::RealDrive::getNextSector().
Get a sector with a specific number.
Note that if a sector with the same number occurs multiple times, this method will always return the same (the first) sector. So don't use it in the implementation of FDC / DiskDrive code.
Definition at line 136 of file RawTrack.cc.
References openmsx::RawTrack::Sector::sector.
Referenced by openmsx::DMKDiskImage::readSectorImpl(), and openmsx::DMKDiskImage::writeSectorImpl().
|
inline |
Definition at line 114 of file RawTrack.hh.
Referenced by openmsx::DMKDiskImage::writeTrackImpl().
|
inline |
Get track length.
Definition at line 96 of file RawTrack.hh.
Referenced by openmsx::RealDrive::getNextSector(), and openmsx::DMKDiskImage::writeTrackImpl().
|
inline |
Definition at line 112 of file RawTrack.hh.
Referenced by openmsx::DMKDiskImage::readTrack(), and openmsx::DMKDiskImage::writeTrackImpl().
|
inline |
Definition at line 113 of file RawTrack.hh.
|
inline |
Definition at line 103 of file RawTrack.hh.
References wrapIndex().
Referenced by openmsx::WD2793::getDataReg(), openmsx::WD2793::peekDataReg(), and readBlock().
| void openmsx::RawTrack::readBlock | ( | int | idx, |
| unsigned | size, | ||
| byte * | destination | ||
| ) | const |
Like memcpy() but copy from/to circular buffer.
Definition at line 147 of file RawTrack.cc.
References read(), and utf8::unchecked::size().
Referenced by openmsx::DMKDiskImage::readSectorImpl().
| void openmsx::RawTrack::serialize | ( | Archive & | ar, |
| unsigned | version | ||
| ) |
Definition at line 183 of file RawTrack.cc.
| void openmsx::RawTrack::updateCrc | ( | CRC16 & | crc, |
| int | idx, | ||
| int | size | ||
| ) | const |
Definition at line 160 of file RawTrack.cc.
References utf8::unchecked::size(), openmsx::CRC16::update(), and wrapIndex().
Referenced by calcCrc().
|
inline |
Definition at line 105 of file RawTrack.hh.
Referenced by read(), updateCrc(), and write().
|
inline |
Definition at line 104 of file RawTrack.hh.
References wrapIndex().
Referenced by openmsx::WD2793::setDataReg(), and writeBlock().
| void openmsx::RawTrack::writeBlock | ( | int | idx, |
| unsigned | size, | ||
| const byte * | source | ||
| ) |
Definition at line 153 of file RawTrack.cc.
References utf8::unchecked::size(), and write().
Referenced by openmsx::DMKDiskImage::writeSectorImpl().
|
static |
Definition at line 71 of file RawTrack.hh.
Referenced by RawTrack().
1.8.1.2