--- nono/vm/interrupt.h 2026/04/29 17:05:17 1.1.1.5 +++ nono/vm/interrupt.h 2026/04/29 17:05:20 1.1.1.6 @@ -12,6 +12,7 @@ #include "device.h" #include "monitor.h" +#include // XP からの割り込み用。 // これだけ1デバイスで2本あるので、仕方なく識別子を用意。 @@ -24,6 +25,7 @@ class MFPDevice; class NewsCtlrDevice; class NMIDevice; class PEDECDevice; +class RTL8019ASDevice; class SCCDevice; class SIODevice; class SPCDevice; @@ -68,6 +70,9 @@ class InterruptDevice : public IODevice // MPU からの割り込みアクノリッジに応答する virtual int InterruptAcknowledge(int lv) = 0; + // 割り込み信号線の状態を取得する + bool GetINT(const Device *source) const; + protected: // 割り込みを上位デバイス(MPUなど)に伝達する。 // 子デバイスが割り込み信号線の状態を変えたときに呼び出される。 @@ -107,7 +112,7 @@ class InterruptDevice : public IODevice static const uint32 IntmapSentinel = 0x00000001; // デバイスから Intmap 値を引く。 - virtual uint32 GetIntmap(Device *source) const = 0; + virtual uint32 GetIntmap(const Device *source) const = 0; // 割り込みマップ uint32 intmap {}; @@ -162,6 +167,8 @@ class X68030Interrupt : public M680x0Int static const uint32 IntmapNMI = 0x80000000; static const uint32 IntmapMFP = 0x08000000; static const uint32 IntmapSCC = 0x00800000; + static const uint32 IntmapNereid0 = 0x00080000; + static const uint32 IntmapNereid1 = 0x00040000; static const uint32 IntmapDMAC = 0x00008000; static const uint32 IntmapPEDEC = 0x00000080; @@ -173,7 +180,7 @@ class X68030Interrupt : public M680x0Int int InterruptAcknowledge(int lv) override; private: - uint32 GetIntmap(Device *soruce) const override; + uint32 GetIntmap(const Device *soruce) const override; DECLARE_MONITOR_CALLBACK(MonitorUpdate); @@ -181,6 +188,7 @@ class X68030Interrupt : public M680x0Int MFPDevice *mfp {}; NMIDevice *nmi {}; PEDECDevice *pedec {}; + std::array net {}; SCCDevice *scc {}; Monitor monitor { this }; @@ -218,7 +226,7 @@ class LunaInterrupt : public M680x0Inter int InterruptAcknowledge(int lv) override; private: - uint32 GetIntmap(Device *source) const override; + uint32 GetIntmap(const Device *source) const override; DECLARE_MONITOR_CALLBACK(MonitorUpdate); @@ -264,7 +272,7 @@ class NewsInterrupt : public M680x0Inter uint8 PeekStatus() const; private: - uint32 GetIntmap(Device *source) const override; + uint32 GetIntmap(const Device *source) const override; DECLARE_MONITOR_CALLBACK(MonitorUpdate);