--- nono/vm/nmi.h 2026/04/29 17:05:10 1.1.1.1 +++ nono/vm/nmi.h 2026/04/29 17:06:00 1.1.1.5 @@ -12,7 +12,8 @@ #include "device.h" #include "message.h" -#include "event.h" + +class InterruptDevice; class NMIDevice : public Device { @@ -33,10 +34,14 @@ class NMIDevice : public Device void NegateNMI(); private: - void AssertCallback(MessageID, uint32); - void NegateCallback(Event& ev); + void AssertMessage(MessageID, uint32); + void NegateCallback(Event *); + + InterruptDevice *interrupt {}; - Event event { this }; + Event *event {}; }; -extern NMIDevice *gNMI; +inline NMIDevice *GetNMIDevice() { + return Object::GetObject(OBJ_NMI); +}