--- nono/vm/goldfish_timer.h 2026/04/29 17:05:25 1.1 +++ nono/vm/goldfish_timer.h 2026/04/29 17:05:33 1.1.1.3 @@ -10,7 +10,6 @@ #include "device.h" #include "event.h" -#include "monitor.h" class GFRTCDevice; class InterruptDevice; @@ -27,9 +26,12 @@ class GFTimerDevice : public IODevice bool Init() override; void ResetHard(bool poweron) override; - busdata Read32(uint32 addr) override; - busdata Write32(uint32 addr, uint32 data) override; - busdata Peek8(uint32 addr) override; + protected: + // BusIO インタフェース + static const uint32 NPORT = 0x1000 >> 2; + busdata ReadPort(uint32 offset); + busdata WritePort(uint32 offset, uint32 data); + busdata PeekPort(uint32 offset); private: DECLARE_MONITOR_CALLBACK(MonitorUpdate); @@ -57,14 +59,14 @@ class GFTimerDevice : public IODevice // 実時間同期用 uint64 mtime_epoch {}; // 調整実時間軸の起点(仮想時刻) - uint64 mtime {}; // 自身の調整実時間 + uint64 mtime {}; // 自身の調整実時間。(mtime_epoch からの経過時間) bool intr_enable {}; // 割り込み許可 bool intr_assert {}; // 割り込み発生 Event event { this }; - Monitor monitor { this }; + Monitor *monitor {}; GFRTCDevice *gfrtc {}; InterruptDevice *interrupt {};