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 
7 namespace openmsx {
8 
13 class SectorBasedDisk : public Disk
14 {
15 protected:
16  explicit SectorBasedDisk(DiskName name);
17  void detectGeometry() override;
18  void flushCaches() override;
19 
20  void setNbSectors(size_t num);
21 
22 protected:
23  ~SectorBasedDisk() override = default;
24 
25 private:
26  // Disk
27  [[nodiscard]] size_t getNbSectorsImpl() const override;
28  void readTrack(byte track, byte side, RawTrack& output) override;
29  void writeTrackImpl(byte track, byte side, const RawTrack& input) override;
30 
31 private:
32  size_t nbSectors;
33  RawTrack cachedTrackData;
34  int cachedTrackNum;
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 detectGeometry() override
void setNbSectors(size_t num)
SectorBasedDisk(DiskName name)
This file implemented 3 utility functions:
Definition: Autofire.cc:5