--- nono/vm/opm.h 2026/04/29 17:05:14 1.1.1.5 +++ nono/vm/opm.h 2026/04/29 17:05:25 1.1.1.7 @@ -13,6 +13,9 @@ #include "device.h" #include "event.h" +class ADPCMDevice; +class FDCDevice; + class OPMDevice : public IODevice { using inherited = IODevice; @@ -22,16 +25,17 @@ class OPMDevice : public IODevice public: OPMDevice(); - virtual ~OPMDevice() override; + ~OPMDevice() override; + bool Init() override; void ResetHard(bool poweron) override; protected: // BusIO インタフェース static const uint32 NPORT = 2; - uint64 Read(uint32 offset); - uint64 Write(uint32 offset, uint32 data); - uint64 Peek(uint32 offset); + busdata Read(uint32 offset); + busdata Write(uint32 offset, uint32 data); + busdata Peek(uint32 offset); private: bool IsBusy() const; @@ -41,6 +45,7 @@ class OPMDevice : public IODevice uint64 busy_origin; // BUSY の起点時刻 uint64 busy_start; // BUSY のアサート開始時刻 uint64 busy_end; // BUSY のアサート終了時刻 -}; -extern OPMDevice *gOPM; + ADPCMDevice *adpcm {}; + FDCDevice *fdc {}; +};