15#include "CoreObject.h"
32struct FSDeviceDescriptor : CoreObject {
48 FSDeviceDescriptor() { }
51 FSDeviceDescriptor(DiskType type, DOSType dos =
DOS_TYPE_CBM);
54 FSDeviceDescriptor(
const class D64File &d64);
56 const char *objectName()
const override {
return "FSLayout"; }
63 bool isCylinderNr(Cylinder c)
const {
return 1 <= c && c <= numCyls; }
64 bool isHeadNr(Head h)
const {
return h == 0 || h == 1; }
65 bool isTrackNr(Track t)
const {
return 1 <= t && t <= numCyls * numHeads; }
66 bool isValidLink(TSLink ref)
const;
73 isize numTracks()
const {
return numCyls * numHeads; }
74 isize speedZone(Cylinder track)
const;
75 isize numSectors(Cylinder track)
const;
76 isize numBlocks()
const;
83 Cylinder cylNr(Track t)
const {
return t <= numCyls ? t : t - numCyls; }
84 Head headNr(Track t)
const {
return t <= numCyls ? 0 : 1; }
85 Track trackNr(Cylinder c, Head h)
const {
return c + h * numCyls; }
87 TSLink tsLink(Block b)
const;
88 Track trackNr(Block b)
const {
return tsLink(b).t; }
89 Sector sectorNr(Block b)
const {
return tsLink(b).s; }
91 Block blockNr(TSLink ts)
const;
92 Block blockNr(Track t, Sector s)
const {
return blockNr(TSLink{t,s}); }
93 Block blockNr(Cylinder c, Head h, Sector s)
const {
return blockNr(trackNr(c,h), s); }
102 bool nextBlock(Block b, Block *nb)
const;
103 TSLink nextBlockRef(TSLink b)
const;
VirtualC64 project namespace.
Definition CmdQueue.cpp:16
@ DOS_TYPE_CBM
C64 CBM file system.
Definition FSTypes.h:29
@ DOS_TYPE_NODOS
No file system.
Definition FSTypes.h:28