--- nono/vm/opm.h 2026/04/29 17:04:55 1.1.1.3 +++ nono/vm/opm.h 2026/04/29 17:05:10 1.1.1.4 @@ -4,6 +4,10 @@ // Licensed under nono-license.txt // +// +// OPM (YM2151) +// + #pragma once #include "device.h" @@ -11,7 +15,7 @@ class OPMDevice : public IODevice { using inherited = IODevice; - private: + static const int baseaddr = 0xe90000; public: @@ -24,6 +28,9 @@ class OPMDevice : public IODevice uint64 Read(uint32 offset); uint64 Write(uint32 offset, uint32 data); uint64 Peek(uint32 offset); + + private: + int reg {}; // アクセスレジスタ番号 }; -extern std::unique_ptr gOPM; +extern OPMDevice *gOPM;