--- nono/vm/fdc.h 2026/04/29 17:05:14 1.1.1.8 +++ nono/vm/fdc.h 2026/04/29 17:05:18 1.1.1.9 @@ -16,7 +16,9 @@ #include "monitor.h" #include +class DMACDevice; class FDDDevice; +class PEDECDevice; struct FDCCmdBuf { @@ -279,6 +281,7 @@ class FDCDevice : public IODevice virtual ~FDCDevice() override; bool Create() override; + bool Init() override; void ResetHard(bool poweron) override; // READY 信号が変化したことの通知 (FDD から呼ばれる) @@ -291,9 +294,6 @@ class FDCDevice : public IODevice void AssertDACK(bool tc); void NegateDACK(); - // 接続されている FDD のリストを取得 (UI 用) - const std::vector& GetFDD() const { return fdd_vector; } - protected: // BusIO インタフェース static const uint32 NPORT = 4; @@ -446,6 +446,9 @@ class FDCDevice : public IODevice // OPM bool force_ready {}; // 強制レディ + DMACDevice *dmac {}; + PEDECDevice *pedec {}; + Event phase_event { this }; // 状態遷移用 Event poll_event { this }; // ポーリング用 Event motor_event { this }; // モータ停止用 @@ -453,4 +456,6 @@ class FDCDevice : public IODevice Monitor monitor { this }; }; -extern FDCDevice *gFDC; +static inline FDCDevice *GetFDCDevice() { + return Object::GetObject(OBJ_FDC); +}