23 using Drives = std::vector<std::unique_ptr<DiskContainer>>;
35 [[nodiscard]]
byte peek()
const;
40 void write(
byte data,
unsigned time);
48 template<
typename Archive>
49 void serialize(Archive& ar,
unsigned version);
66 void executeCommand();
68 void send(
byte value);
69 void send16(
word value);
79 [[nodiscard]]
unsigned getSectorAmount()
const;
80 [[nodiscard]]
unsigned getStartSector()
const;
81 [[nodiscard]]
unsigned getStartAddress()
const;
82 [[nodiscard]]
unsigned getCurrentAddress()
const;
87 void transferSectors(
unsigned transferAddress,
unsigned amount);
88 void transferSectorsBackwards(
unsigned transferAddress,
unsigned amount);
94 [[nodiscard]]
word getFCB()
const;
95 [[nodiscard]] std::string extractName(
int begin,
int end)
const;
96 unsigned readHelper1(
unsigned dev, std::span<char, 256> buffer);
97 void readHelper2(std::span<const char> buffer);
98 [[nodiscard]]
int getDeviceNum()
const;
99 int getFreeDeviceNum();
105 void callImage(
const std::string& filename);
108 static constexpr unsigned MAX_DEVICES = 16;
115 std::optional<std::fstream> fs;
118 std::array<Device, MAX_DEVICES> devices;
121 std::vector<SectorBuffer> buffer;
122 unsigned lastTime = 0;
125 unsigned transferred;
127 unsigned transferSize;
128 std::array<byte, 9> cmdData;
129 std::array<byte, 240 + 2> extraData;
132 bool allowOtherDiskRoms =
false;
133 bool enablePhantomDrives =
true;