| 1 |
#ifndef IDEHD_HH |
| 2 |
#define IDEHD_HH |
| 3 |
|
| 4 |
#include "AbstractIDEDevice.hh" |
| 5 |
#include "HD.hh" |
| 6 |
|
| 7 |
namespace openmsx { |
| 8 |
|
| 9 |
class DeviceConfig; |
| 10 |
|
| 11 |
class IDEHD final : public HD, public AbstractIDEDevice |
| 12 |
{ |
| 13 |
public: |
| 14 |
explicit IDEHD(const DeviceConfig& config); |
| 15 |
IDEHD(const IDEHD&) = delete; |
| 16 |
IDEHD(IDEHD&&) = delete; |
| 17 |
IDEHD& operator=(const IDEHD&) = delete; |
| 18 |
IDEHD& operator=(IDEHD&&) = delete; |
| 19 |
~IDEHD() override = default; |
| 20 |
|
| 21 |
template<typename Archive> |
| 22 |
void serialize(Archive& ar, unsigned version); |
| 23 |
|
| 24 |
private: |
| 25 |
|
| 26 |
[[nodiscard]] bool isPacketDevice() override; |
| 27 |
[[nodiscard]] std::string_view getDeviceName() override; |
| 28 |
void fillIdentifyBlock (AlignedBuffer& buffer) override; |
| 29 |
[[nodiscard]] unsigned readBlockStart(AlignedBuffer& buffer, unsigned count) override; |
| 30 |
void writeBlockComplete(AlignedBuffer& buffer, unsigned count) override; |
| 31 |
void executeCommand(uint8_t cmd) override; |
| 32 |
|
| 33 |
private: |
| 34 |
unsigned transferSectorNumber = 0; |
| 35 |
const std::string devName; |
| 36 |
}; |
| 37 |
|
| 38 |
} |
| 39 |
|
| 40 |
#endif |