--- nono/vm/interrupt.h 2026/04/29 17:05:28 1.1.1.8 +++ nono/vm/interrupt.h 2026/04/29 17:05:59 1.1.1.11 @@ -11,7 +11,6 @@ #pragma once #include "device.h" -#include "monitor.h" #include #include @@ -154,6 +153,8 @@ class InterruptDevice : public IODevice // [0] が Intmap の bit31 割り込みのカウント。 // [27] が Intmap の bit 4 割り込みのカウント。 uint64 counter[32] {}; + + Monitor *monitor {}; }; // m680x0 仮想割り込みコントローラ (共通部) @@ -170,7 +171,6 @@ class M680x0Interrupt : public Interrupt ~M680x0Interrupt() override; bool Init() override; - void ResetHard(bool poweron) override; protected: void ChangeInterrupt() override; @@ -217,7 +217,7 @@ class X68030Interrupt : public M680x0Int busdata InterruptAcknowledge(int lv) override; private: - DECLARE_MONITOR_CALLBACK(MonitorUpdate); + DECLARE_MONITOR_SCREEN(MonitorScreen); DMACDevice *dmac {}; MFPDevice *mfp {}; @@ -225,8 +225,6 @@ class X68030Interrupt : public M680x0Int PEDECDevice *pedec {}; std::array net {}; SCCDevice *scc {}; - - Monitor monitor { this }; }; // LUNA-I 仮想割り込みコントローラ @@ -261,9 +259,7 @@ class LunaInterrupt : public M680x0Inter busdata InterruptAcknowledge(int lv) override; private: - DECLARE_MONITOR_CALLBACK(MonitorUpdate); - - Monitor monitor { this }; + DECLARE_MONITOR_SCREEN(MonitorScreen); }; // NEWS 仮想割り込みコントローラ @@ -299,11 +295,9 @@ class NewsInterrupt : public M680x0Inter uint8 PeekStatus() const; private: - DECLARE_MONITOR_CALLBACK(MonitorUpdate); + DECLARE_MONITOR_SCREEN(MonitorScreen); SCCDevice *scc {}; - - Monitor monitor { this }; }; // virt-m68k 仮想割り込みコントローラ @@ -340,15 +334,13 @@ class Virt68kInterrupt : public M680x0In void IncMonitorHeight(); private: - DECLARE_MONITOR_CALLBACK(MonitorUpdate); + DECLARE_MONITOR_SCREEN(MonitorScreen); std::array gfpic {}; - - Monitor monitor { this }; }; // LUNA-88K は sysctlr.cpp 参照。 -static inline InterruptDevice *GetInterruptDevice() { +inline InterruptDevice *GetInterruptDevice() { return Object::GetObject(OBJ_INTERRUPT); }