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
openmsx::SectorBasedDisk::detectGeometry
void detectGeometry() override
Definition: SectorBasedDisk.cc:153
Disk.hh
openmsx::SectorBasedDisk::SectorBasedDisk
SectorBasedDisk(DiskName name)
Definition: SectorBasedDisk.cc:7
openmsx::RawTrack
Definition: RawTrack.hh:62
openmsx::Disk
Definition: Disk.hh:13
openmsx::DiskName
Definition: DiskName.hh:9
openmsx::SectorBasedDisk::setNbSectors
void setNbSectors(size_t num)
Definition: SectorBasedDisk.cc:147
openmsx::SectorBasedDisk::flushCaches
void flushCaches() override
Definition: SectorBasedDisk.cc:136
RawTrack.hh
openmsx::SectorBasedDisk
Abstract class for disk images that only represent the logical sector information (so not the raw tra...
Definition: SectorBasedDisk.hh:14
openmsx::SectorBasedDisk::~SectorBasedDisk
~SectorBasedDisk() override=default
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5