--- nono/vm/crtc2.h 2026/04/29 17:05:10 1.1.1.8 +++ nono/vm/crtc2.h 2026/04/29 17:05:24 1.1.1.10 @@ -13,21 +13,24 @@ #include "device.h" #include "event.h" +class Renderer; + class CRTC2Device : public IODevice { using inherited = IODevice; public: CRTC2Device(); - virtual ~CRTC2Device() override; + ~CRTC2Device() override; + bool Init() override; void ResetHard(bool poweron) override; protected: // BusIO インタフェース static const uint32 NPORT = 2; - uint64 Read(uint32 offset); - uint64 Write(uint32 offset, uint32 data); - uint64 Peek(uint32 offset); + busdata Read(uint32 offset); + busdata Write(uint32 offset, uint32 data); + busdata Peek(uint32 offset); private: // 垂直表示期間イベント @@ -39,7 +42,7 @@ class CRTC2Device : public IODevice // レジスタ uint8 reg[40] {}; + Renderer *renderer {}; + Event vdisp_event { this }; }; - -extern CRTC2Device *gCRTC2;