openMSX
SectorBasedDisk.hh
Go to the documentation of this file.
1#ifndef SECTORBASEDDISK_HH
2#define SECTORBASEDDISK_HH
3
4#include "Disk.hh"
5#include "RawTrack.hh"
6
7namespace openmsx {
8
13class SectorBasedDisk : public Disk
14{
15protected:
16 explicit SectorBasedDisk(DiskName name);
17 void detectGeometry() override;
18 void flushCaches() override;
19
20 void setNbSectors(size_t num);
21
22protected:
23 ~SectorBasedDisk() override = default;
24
25private:
26 // Disk
27 [[nodiscard]] size_t getNbSectorsImpl() const override;
28 void readTrack(uint8_t track, uint8_t side, RawTrack& output) override;
29 void writeTrackImpl(uint8_t track, uint8_t side, const RawTrack& input) override;
30
31private:
32 size_t nbSectors = size_t(-1); // to detect misuse
33 RawTrack cachedTrackData;
34 int cachedTrackNum = -1;
35};
36
37} // namespace openmsx
38
39#endif
Abstract class for disk images that only represent the logical sector information (so not the raw tra...
~SectorBasedDisk() override=default
void setNbSectors(size_t num)
This file implemented 3 utility functions:
Definition Autofire.cc:11