openMSX
|
#include <HD.hh>
Public Types | |
using | HDInUse = std::bitset< MAX_HD > |
Public Member Functions | |
HD (const DeviceConfig &config) | |
~HD () override | |
const std::string & | getName () const |
const Filename & | getImageName () const |
void | switchImage (const Filename &filename) |
std::string | getTigerTreeHash () |
void | getMediaInfo (TclObject &result) override |
This method gets called when information is required on the media inserted in the media slot of the provider. | |
template<typename Archive > | |
void | serialize (Archive &ar, unsigned version) |
MSXMotherBoard & | getMotherBoard () const |
Public Member Functions inherited from openmsx::SectorAccessibleDisk | |
void | readSector (size_t sector, SectorBuffer &buf) const |
void | writeSector (size_t sector, const SectorBuffer &buf) |
void | readSectors (std::span< SectorBuffer > buffers, size_t startSector) const |
void | writeSectors (std::span< const SectorBuffer > buffers, size_t startSector) |
size_t | getNbSectors () const |
bool | isWriteProtected () const |
void | forceWriteProtect () |
virtual bool | isDummyDisk () const |
void | applyPatch (Filename patchFile) |
std::vector< Filename > | getPatches () const |
bool | hasPatches () const |
Sha1Sum | getSha1Sum (FilePool &filePool) |
Calculate SHA1 of the content of this disk. | |
virtual void | readSectorImpl (size_t sector, SectorBuffer &buf) |
Public Member Functions inherited from openmsx::DiskContainer | |
DiskContainer ()=default | |
DiskContainer (const DiskContainer &)=delete | |
DiskContainer (DiskContainer &&)=delete | |
DiskContainer & | operator= (const DiskContainer &)=delete |
DiskContainer & | operator= (DiskContainer &&)=delete |
virtual | ~DiskContainer ()=default |
bool | isRomDisk () const |
template<typename Archive > | |
void | serialize (Archive &, unsigned) |
Public Member Functions inherited from openmsx::MediaInfoProvider | |
MediaInfoProvider (const MediaInfoProvider &)=delete | |
MediaInfoProvider (MediaInfoProvider &&)=delete | |
MediaInfoProvider & | operator= (const MediaInfoProvider &)=delete |
MediaInfoProvider & | operator= (MediaInfoProvider &&)=delete |
Static Public Member Functions | |
static std::shared_ptr< HDInUse > | getDrivesInUse (MSXMotherBoard &motherBoard) |
Static Public Attributes | |
static constexpr unsigned | MAX_HD = 26 |
Static Public Attributes inherited from openmsx::SectorAccessibleDisk | |
static constexpr size_t | SECTOR_SIZE = sizeof(SectorBuffer) |
Additional Inherited Members | |
Protected Member Functions inherited from openmsx::SectorAccessibleDisk | |
SectorAccessibleDisk () | |
~SectorAccessibleDisk () | |
void | setPeekMode (bool peek) |
bool | isPeekMode () const |
virtual void | checkCaches () |
virtual void | flushCaches () |
Protected Member Functions inherited from openmsx::TTData | |
~TTData ()=default | |
Protected Member Functions inherited from openmsx::MediaInfoProvider | |
MediaInfoProvider ()=default | |
~MediaInfoProvider ()=default | |
using openmsx::HD::HDInUse = std::bitset<MAX_HD> |
|
explicit |
Definition at line 29 of file HD.cc.
References openmsx::File::CREATE, openmsx::DeviceConfig::getChildData(), openmsx::DeviceConfig::getChildDataAsInt(), openmsx::MSXMotherBoard::getCommandController(), getDrivesInUse(), openmsx::DeviceConfig::getFileContext(), openmsx::Reactor::getGlobalSettings(), openmsx::HDImageCLI::getImageForId(), openmsx::MSXMotherBoard::getMSXCliComm(), openmsx::GlobalSettings::getPowerSetting(), openmsx::MSXMotherBoard::getReactor(), openmsx::Filename::getResolved(), openmsx::MSXMotherBoard::getScheduler(), openmsx::File::getSize(), openmsx::MSXMotherBoard::getStateChangeDistributor(), openmsx::CliComm::HARDWARE, id, MAX_HD, openmsx::File::NORMAL, openmsx::MSXMotherBoard::registerMediaInfo(), openmsx::FileContext::resolveCreate(), openmsx::File::truncate(), openmsx::MSXCliComm::update(), and openmsx::userFileContext().
|
override |
Definition at line 80 of file HD.cc.
References openmsx::MSXMotherBoard::getMSXCliComm(), openmsx::CliComm::HARDWARE, id, openmsx::MSXMotherBoard::unregisterMediaInfo(), and openmsx::MSXCliComm::update().
|
static |
Definition at line 24 of file HD.cc.
References openmsx::MSXMotherBoard::getSharedStuff().
Referenced by HD().
|
inline |
Definition at line 33 of file HD.hh.
Referenced by openmsx::HDCommand::execute(), and getMediaInfo().
|
overridevirtual |
This method gets called when information is required on the media inserted in the media slot of the provider.
The provider must attach the info as a dictionary to the given TclObject.
Implements openmsx::MediaInfoProvider.
Definition at line 90 of file HD.cc.
References openmsx::TclObject::addDictKeyValues(), getImageName(), and openmsx::SectorAccessibleDisk::isWriteProtected().
|
inline |
|
inline |
Definition at line 32 of file HD.hh.
Referenced by openmsx::HDCommand::execute(), openmsx::HDCommand::help(), and switchImage().
std::string openmsx::HD::getTigerTreeHash | ( | ) |
Definition at line 158 of file HD.cc.
References openmsx::Timer::getTime(), and t.
Referenced by serialize().
void openmsx::HD::serialize | ( | Archive & | ar, |
unsigned | version | ||
) |
Definition at line 221 of file HD.cc.
References openmsx::File::close(), openmsx::Filename::empty(), openmsx::Sha1Sum::empty(), openmsx::SectorAccessibleDisk::forceWriteProtect(), openmsx::Reactor::getFilePool(), openmsx::MSXMotherBoard::getMSXCliComm(), openmsx::MSXMotherBoard::getReactor(), openmsx::Filename::getResolved(), openmsx::SectorAccessibleDisk::getSha1Sum(), getTigerTreeHash(), openmsx::File::is_open(), openmsx::CliComm::printWarning(), switchImage(), openmsx::Sha1Sum::toString(), and openmsx::Filename::updateAfterLoadState().
void openmsx::HD::switchImage | ( | const Filename & | filename | ) |
Definition at line 96 of file HD.cc.
References openmsx::MSXMotherBoard::getMSXCliComm(), getName(), openmsx::Filename::getResolved(), openmsx::File::getSize(), openmsx::CliComm::MEDIA, and openmsx::MSXCliComm::update().
Referenced by openmsx::HDCommand::execute(), and serialize().
|
staticconstexpr |