--- nono/vm/nmi.h 2026/04/29 17:05:10 1.1.1.1 +++ nono/vm/nmi.h 2026/04/29 17:05:18 1.1.1.2 @@ -14,6 +14,8 @@ #include "message.h" #include "event.h" +class InterruptDevice; + class NMIDevice : public Device { using inherited = Device; @@ -36,7 +38,11 @@ class NMIDevice : public Device void AssertCallback(MessageID, uint32); void NegateCallback(Event& ev); + InterruptDevice *interrupt {}; + Event event { this }; }; -extern NMIDevice *gNMI; +static inline NMIDevice *GetNMIDevice() { + return Object::GetObject(OBJ_NMI); +}