--- nono/vm/crtc.h 2026/04/29 17:05:28 1.1.1.11 +++ nono/vm/crtc.h 2026/04/29 17:06:00 1.1.1.14 @@ -11,12 +11,10 @@ #pragma once #include "device.h" -#include "event.h" -#include "monitor.h" class MFPDevice; -class Renderer; class TVRAMDevice; +class VideoCtlrDevice; struct CRTC { @@ -156,28 +154,34 @@ class CRTCDevice : public IODevice void WriteOp(uint32 data); // 水平同期信号イベント - void HSyncCallback(Event& ev); + void HSyncCallback(Event *); // ラスターコピー完了イベント - void RasterCallback(Event& ev); + void RasterCallback(Event *); // 垂直表示期間イベント - void VDispCallback(Event& ev); + void VDispCallback(Event *); - DECLARE_MONITOR_CALLBACK(MonitorUpdate); + DECLARE_MONITOR_SCREEN(MonitorScreen); struct CRTC crtc {}; // ラスターコピー指示 bool raster_copy {}; + // XXX もうちょっとなんとかする + uint hsync_state {}; + uint vdisp_state {}; + MFPDevice *mfp {}; - Renderer *renderer {}; TVRAMDevice *tvram {}; + VideoCtlrDevice *videoctlr {}; + + Event *hsync_event {}; + Event *vdisp_event {}; + Event *raster_event {}; - Event hsync_event { this }; - Event vdisp_event { this }; - Event raster_event { this }; + Monitor *monitor {}; - Monitor monitor { this }; + static const busdata wait; };