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() = default;
24 
25 private:
26  // Disk
27  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  size_t nbSectors;
32 
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...
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
void detectGeometry() override
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
SectorBasedDisk(DiskName name)
void setNbSectors(size_t num)