--- nono/vm/mfp.h 2026/04/29 17:05:42 1.1.1.18 +++ nono/vm/mfp.h 2026/04/29 17:06:00 1.1.1.20 @@ -11,7 +11,6 @@ #pragma once #include "device.h" -#include "event.h" #include class InterruptDevice; @@ -279,8 +278,8 @@ class MFPDevice : public IODevice bool IsRR() const; // イベントコールバック - void TimerCallback(Event& ev); - void KeyCallback(Event& ev); + void TimerCallback(Event *); + void KeyCallback(Event *); // 必要なら割り込みを上げる void SetInterrupt(uint ch); @@ -288,11 +287,11 @@ class MFPDevice : public IODevice // 割り込み信号線の状態を変える void ChangeInterrupt(); - DECLARE_MONITOR_CALLBACK(MonitorUpdate); + DECLARE_MONITOR_SCREEN(MonitorScreen); struct MFP mfp {}; - std::array event {}; - Event key_event { this }; + std::array event {}; + Event *key_event {}; // 各タイマーが刻んでいる時刻 (時間軸) std::array stime {}; @@ -309,14 +308,15 @@ class MFPDevice : public IODevice Syncer *syncer {}; X68030Keyboard *keyboard {}; + static const busdata wait; static const char *intrname[]; static const char *gpipname[]; - static const uint64 prescale_ns[8]; + static const uint64 prescale_tsec[8]; static const char *prescale_str[8]; static const uint timer_vector[4]; static const char *regname[MFP::RegMax]; }; -static inline MFPDevice *GetMFPDevice() { +inline MFPDevice *GetMFPDevice() { return Object::GetObject(OBJ_MFP); }