--- nono/vm/mfp.h 2026/04/29 17:04:55 1.1.1.9 +++ nono/vm/mfp.h 2026/04/29 17:05:14 1.1.1.12 @@ -4,11 +4,16 @@ // Licensed under nono-license.txt // +// +// MFP (MC68901) +// + #pragma once #include "device.h" +#include "event.h" #include "monitor.h" -#include "scheduler.h" +#include struct MFP { @@ -186,14 +191,23 @@ class MFPDevice : public IODevice MFPDevice(); virtual ~MFPDevice() override; - void ResetHard() override; + void ResetHard(bool poweron) override; // 割り込みアクノリッジ int InterruptAcknowledge(); + // HSync 入力 + void SetHSync(bool hsync); + // VDisp 入力 void SetVDisp(bool vdisp); + // 電源ボタン状態入力 + void SetPowSW(bool powsw); + + // ALARM 信号入力 + void SetAlarmOut(bool alarm); + // KEY CTRL 状態を設定する void SetKeyCtrl(bool ctrl); @@ -241,7 +255,7 @@ class MFPDevice : public IODevice DECLARE_MONITOR_CALLBACK(MonitorUpdate); struct MFP mfp {}; - Event event[4] {}; + std::array event {}; Event key_event { this }; Monitor monitor { this }; @@ -253,4 +267,4 @@ class MFPDevice : public IODevice static const int timer_vector[4]; }; -extern std::unique_ptr gMFP; +extern MFPDevice *gMFP;