--- nono/vm/spc.h 2026/04/29 17:04:53 1.1.1.9 +++ nono/vm/spc.h 2026/04/29 17:04:56 1.1.1.10 @@ -8,6 +8,7 @@ #include "device.h" #include "fixedqueue.h" +#include "monitor.h" #include "scheduler.h" #include "scsidev.h" #include "vm.h" @@ -154,8 +155,6 @@ class SPCDevice : public SCSIHostDevice bool Init() override; void ResetHard() override; - void MonitorUpdate(TextScreen&) override; - // 接続中のデバイスを ID 順に並べたリストを返す (UI ステータスパネル用) const std::vector& GetConnectedDevices() const { return connected_devices; @@ -183,6 +182,8 @@ class SPCDevice : public SCSIHostDevice uint64 Peek(uint32 offset); private: + DECLARE_MONITOR_CALLBACK(MonitorUpdate); + void MonitorReg(TextScreen&, int x, int y, uint32 reg, const char * const *names); @@ -275,8 +276,10 @@ class SPCDevice : public SCSIHostDevice std::vector connected_devices {}; // イベント - Event event {}; - Event event_tc {}; + Event event { this }; + Event event_tc { this }; + + Monitor monitor { this }; }; extern std::unique_ptr gSPC;