--- nono/vm/crtc.cpp 2026/04/29 17:05:28 1.1.1.12 +++ nono/vm/crtc.cpp 2026/04/29 17:05:37 1.1.1.14 @@ -21,9 +21,10 @@ #include "crtc.h" #include "mfp.h" -#include "renderer.h" +#include "monitor.h" #include "scheduler.h" #include "tvram.h" +#include "videoctlr.h" // InsideOut p.135 const busdata wait = busdata::Wait(9 * 40_nsec); @@ -32,9 +33,9 @@ const busdata wait = busdata::Wait(9 * 4 CRTCDevice::CRTCDevice() : inherited(OBJ_CRTC) { - monitor.func = ToMonitorCallback(&CRTCDevice::MonitorUpdate); - monitor.SetSize(62, 14); - monitor.Regist(ID_MONITOR_CRTC); + monitor = gMonitorManager->Regist(ID_MONITOR_CRTC, this); + monitor->func = ToMonitorCallback(&CRTCDevice::MonitorUpdate); + monitor->SetSize(62, 14); } // デストラクタ @@ -46,13 +47,9 @@ CRTCDevice::~CRTCDevice() bool CRTCDevice::Init() { - if (inherited::Init() == false) { - return false; - } - mfp = GetMFPDevice(); - renderer = GetRenderer(); tvram = GetTVRAMDevice(); + videoctlr = GetVideoCtlrDevice(); hsync_event.func = ToEventCallback(&CRTCDevice::HSyncCallback); hsync_event.SetName("CRTC H-Sync"); @@ -438,8 +435,7 @@ CRTCDevice::VDispCallback(Event& ev) // 今はここで1画面まるごと作成 if (vdisp) { - // Render に作画指示 - renderer->NotifyRender(); + videoctlr->VDisp(); } // 次のタイミングを計算