--- nono/vm/crtc2.h 2026/04/29 17:04:50 1.1.1.6 +++ nono/vm/crtc2.h 2026/04/29 17:05:17 1.1.1.9 @@ -4,20 +4,26 @@ // Licensed under nono-license.txt // +// +// CRTC-II (HD6445) +// + #pragma once #include "device.h" -#include "scheduler.h" +#include "event.h" -class CRTC2Device - : public IODevice +class Renderer; + +class CRTC2Device : public IODevice { using inherited = IODevice; public: CRTC2Device(); virtual ~CRTC2Device() override; - void ResetHard() override; + bool Init() override; + void ResetHard(bool poweron) override; protected: // BusIO インタフェース @@ -36,7 +42,7 @@ class CRTC2Device // レジスタ uint8 reg[40] {}; - Event vdisp_event {}; -}; + Renderer *renderer {}; -extern std::unique_ptr gCRTC2; + Event vdisp_event { this }; +};