9 : name(
std::move(name_))
38 if ((track == 0) && (side == 0)) {
44 return sectorsPerTrack * (side + nbSides * track) + (sector - 1);
51 auto sector = narrow<uint8_t>(log + 1);
52 return {track, side, sector};
57 auto track = narrow<uint8_t>(log / (
size_t(nbSides) * sectorsPerTrack));
58 auto side = narrow<uint8_t>((log / sectorsPerTrack) % nbSides);
59 auto sector = narrow<uint8_t>((log % sectorsPerTrack) + 1);
60 return {track, side, sector};
68 return sectorsPerTrack;
121 if ((sectorsPerTrack == 0) || (sectorsPerTrack > 255) ||
122 (nbSides == 0) || (nbSides > 255)) {
128 auto mediaDescriptor = buf.
raw[0];
129 if (mediaDescriptor >= 0xF8) {
130 sectorsPerTrack = (mediaDescriptor & 2) ? 8 : 9;
131 nbSides = (mediaDescriptor & 1) ? 2 : 1;
virtual void detectGeometryFallback()
size_t physToLog(uint8_t track, uint8_t side, uint8_t sector)
virtual void writeTrackImpl(uint8_t track, uint8_t side, const RawTrack &input)=0
unsigned getSectorsPerTrack()
void writeTrack(uint8_t track, uint8_t side, const RawTrack &input)
Replace a full track in this image with the given track.
virtual void detectGeometry()
TSS logToPhys(size_t log)
bool isWriteProtected() const
size_t getNbSectors() const
virtual void flushCaches()
void readSector(size_t sector, SectorBuffer &buf) const
This file implemented 3 utility functions:
std::array< uint8_t, 512 > raw