openMSX
fdc
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(uint8_t track, uint8_t side,
RawTrack
& output)
override
;
29
void
writeTrackImpl(uint8_t track, uint8_t side,
const
RawTrack
& input)
override
;
30
31
private
:
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
Disk.hh
RawTrack.hh
openmsx::DiskName
Definition
DiskName.hh:9
openmsx::Disk
Definition
Disk.hh:13
openmsx::RawTrack
Definition
RawTrack.hh:65
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::SectorBasedDisk::detectGeometry
void detectGeometry() override
Definition
SectorBasedDisk.cc:157
openmsx::SectorBasedDisk::setNbSectors
void setNbSectors(size_t num)
Definition
SectorBasedDisk.cc:151
openmsx::SectorBasedDisk::flushCaches
void flushCaches() override
Definition
SectorBasedDisk.cc:140
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
Generated on Tue Nov 12 2024 20:14:32 for openMSX by
1.9.8