--- nono/vm/crtc.h 2026/04/29 17:04:35 1.1.1.2 +++ nono/vm/crtc.h 2026/04/29 17:04:55 1.1.1.6 @@ -39,35 +39,34 @@ struct CRTC static const uint32 R22 = 0x16; // $E8002C static const uint32 R23 = 0x17; // $E8002E static const uint32 REG_END = 0x18; - static const uint32 REG_OP = 0x240; // $E80480 + static const uint32 REG_OP = 0x240; // $E80480 }; -class CRTCDevice - : public IODevice +class CRTCDevice : public IODevice { using inherited = IODevice; public: CRTCDevice(); - ~CRTCDevice() override; + virtual ~CRTCDevice() override; void ResetHard() override; protected: // BusIO インタフェース static const uint NPORT = 0x800; - uint64 Read(uint32 addr); - uint64 Write(uint32 addr, uint32 data); - uint64 Peek(uint32 addr); + uint64 Read(uint32 offset); + uint64 Write(uint32 offset, uint32 data); + uint64 Peek(uint32 offset); private: void SetReg(uint32 offset, uint32 data); // 垂直表示期間イベント - void VDispCallback(int arg); + void VDispCallback(Event& ev); struct CRTC crtc {}; - Event vdisp_event {}; + Event vdisp_event { this }; }; extern std::unique_ptr gCRTC;