--- nono/vm/mfp.h 2026/04/29 17:05:10 1.1.1.11 +++ 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; // 割り込みアクノリッジ @@ -202,6 +206,12 @@ class MFPDevice : public IODevice // VDisp 入力 void SetVDisp(bool vdisp); + // 電源ボタン状態入力 + void SetPowSW(bool powsw); + + // ALARM 信号入力 + void SetAlarmOut(bool alarm); + // KEY CTRL 状態を設定する void SetKeyCtrl(bool ctrl); @@ -254,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]; @@ -261,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); +}