--- nono/vm/mfp.h 2026/04/29 17:04:52 1.1.1.8 +++ nono/vm/mfp.h 2026/04/29 17:04:55 1.1.1.9 @@ -7,6 +7,7 @@ #pragma once #include "device.h" +#include "monitor.h" #include "scheduler.h" struct MFP @@ -175,8 +176,7 @@ struct MFP uint16 udr; }; -class MFPDevice - : public IODevice +class MFPDevice : public IODevice { using inherited = IODevice; @@ -187,7 +187,6 @@ class MFPDevice virtual ~MFPDevice() override; void ResetHard() override; - void MonitorUpdate(TextScreen&) override; // 割り込みアクノリッジ int InterruptAcknowledge(); @@ -239,9 +238,13 @@ class MFPDevice // 割り込み信号線の状態を変える void ChangeInterrupt(); + DECLARE_MONITOR_CALLBACK(MonitorUpdate); + struct MFP mfp {}; Event event[4] {}; - Event key_event {}; + Event key_event { this }; + + Monitor monitor { this }; static const char *intrname[]; static const char *gpipname[];