--- nono/vm/mfp.h 2026/04/29 17:05:14 1.1.1.12 +++ nono/vm/mfp.h 2026/04/29 17:05:17 1.1.1.13 @@ -15,6 +15,9 @@ #include "monitor.h" #include +class InterruptDevice; +class X68030Keyboard; + struct MFP { static const int GPIP = 0; // $E88001 @@ -191,6 +194,7 @@ class MFPDevice : public IODevice MFPDevice(); virtual ~MFPDevice() override; + bool Init() override; void ResetHard(bool poweron) override; // 割り込みアクノリッジ @@ -260,6 +264,9 @@ class MFPDevice : public IODevice Monitor monitor { this }; + InterruptDevice *interrupt {}; + X68030Keyboard *keyboard {}; + static const char *intrname[]; static const char *gpipname[]; static const int prescale_ns[8]; @@ -267,4 +274,6 @@ class MFPDevice : public IODevice static const int timer_vector[4]; }; -extern MFPDevice *gMFP; +static inline MFPDevice *GetMFPDevice() { + return Object::GetObject(OBJ_MFP); +}