--- nono/vm/interrupt.h 2026/04/29 17:05:24 1.1.1.7 +++ nono/vm/interrupt.h 2026/04/29 17:05:37 1.1.1.10 @@ -11,14 +11,13 @@ #pragma once #include "device.h" -#include "monitor.h" #include #include // XP からの割り込み用。 // これだけ1デバイスで2本あるので、仕方なく識別子を用意。 -#define DEVICE_XPINT_HIGH ((Device *)(intptr_t)1) -#define DEVICE_XPINT_LOW ((Device *)(intptr_t)2) +#define DEVICE_XPINT_HIGH (reinterpret_cast((intptr_t)1)) +#define DEVICE_XPINT_LOW (reinterpret_cast((intptr_t)2)) class DMACDevice; class GFPICDevice; @@ -52,7 +51,7 @@ class InterruptDevice : public IODevice public: InterruptDevice(); - InterruptDevice(int objid_); + InterruptDevice(uint objid_); ~InterruptDevice() override; // リセットで割り込みを下げるのは各割り込み送出デバイスの責任。 @@ -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; @@ -225,8 +225,6 @@ class X68030Interrupt : public M680x0Int PEDECDevice *pedec {}; std::array net {}; SCCDevice *scc {}; - - Monitor monitor { this }; }; // LUNA-I 仮想割り込みコントローラ @@ -262,8 +260,6 @@ class LunaInterrupt : public M680x0Inter private: DECLARE_MONITOR_CALLBACK(MonitorUpdate); - - Monitor monitor { this }; }; // NEWS 仮想割り込みコントローラ @@ -302,11 +298,9 @@ class NewsInterrupt : public M680x0Inter DECLARE_MONITOR_CALLBACK(MonitorUpdate); SCCDevice *scc {}; - - Monitor monitor { this }; }; -// virt68k 仮想割り込みコントローラ +// virt-m68k 仮想割り込みコントローラ // // Level // 7 @@ -343,8 +337,6 @@ class Virt68kInterrupt : public M680x0In DECLARE_MONITOR_CALLBACK(MonitorUpdate); std::array gfpic {}; - - Monitor monitor { this }; }; // LUNA-88K は sysctlr.cpp 参照。