--- nono/vm/pedec.h 2026/04/29 17:05:10 1.1.1.6 +++ nono/vm/pedec.h 2026/04/29 17:05:20 1.1.1.8 @@ -13,6 +13,9 @@ #include "device.h" #include "interrupt.h" +class FDCDevice; +class SPCDevice; + class PEDECDevice : public InterruptDevice { using inherited = InterruptDevice; @@ -35,6 +38,7 @@ class PEDECDevice : public InterruptDevi PEDECDevice(); virtual ~PEDECDevice() override; + bool Init() override; void ResetHard(bool poweron) override; // InterruptDevice インタフェース @@ -51,7 +55,7 @@ class PEDECDevice : public InterruptDevi uint64 Peek(uint32 offset); private: - uint32 GetIntmap(Device *source) const override; + uint32 GetIntmap(const Device *source) const override; // 割り込みステータスレジスタの値を取得 uint32 GetStat() const; @@ -61,6 +65,12 @@ class PEDECDevice : public InterruptDevi uint32 intmap_enabled {}; uint8 vector {}; + + FDCDevice *fdc {}; + InterruptDevice *interrupt {}; + SPCDevice *spc {}; }; -extern PEDECDevice *gPEDEC; +static inline PEDECDevice *GetPEDECDevice() { + return Object::GetObject(OBJ_PEDEC); +}