--- nono/vm/mfp.h 2026/04/29 17:04:55 1.1.1.9 +++ nono/vm/mfp.h 2026/04/29 17:05:10 1.1.1.11 @@ -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,11 +191,14 @@ 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); @@ -241,7 +249,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 +261,4 @@ class MFPDevice : public IODevice static const int timer_vector[4]; }; -extern std::unique_ptr gMFP; +extern MFPDevice *gMFP;