--- nono/vm/opm.h 2026/04/29 17:05:25 1.1.1.7 +++ nono/vm/opm.h 2026/04/29 17:05:50 1.1.1.10 @@ -11,7 +11,6 @@ #pragma once #include "device.h" -#include "event.h" class ADPCMDevice; class FDCDevice; @@ -20,7 +19,7 @@ class OPMDevice : public IODevice { using inherited = IODevice; - static const int baseaddr = 0xe90000; + static const uint32 baseaddr = 0xe90000; static const uint64 clk = 250_nsec; // 4MHz public: @@ -33,18 +32,19 @@ class OPMDevice : public IODevice protected: // BusIO インタフェース static const uint32 NPORT = 2; - busdata Read(uint32 offset); - busdata Write(uint32 offset, uint32 data); - busdata Peek(uint32 offset); + busdata ReadPort(uint32 offset); + busdata WritePort(uint32 offset, uint32 data); + busdata PeekPort(uint32 offset); + bool PokePort(uint32 offset, uint32 data); private: bool IsBusy() const; int reg {}; // アクセスレジスタ番号 - uint64 busy_origin; // BUSY の起点時刻 - uint64 busy_start; // BUSY のアサート開始時刻 - uint64 busy_end; // BUSY のアサート終了時刻 + uint64 busy_origin {}; // BUSY の起点時刻 + uint64 busy_start {}; // BUSY のアサート開始時刻 + uint64 busy_end {}; // BUSY のアサート終了時刻 ADPCMDevice *adpcm {}; FDCDevice *fdc {};