--- nono/vm/dmac.h 2026/04/29 17:04:44 1.1.1.6 +++ nono/vm/dmac.h 2026/04/29 17:04:55 1.1.1.8 @@ -7,6 +7,7 @@ #pragma once #include "device.h" +#include "monitor.h" #include "scheduler.h" struct DMAC @@ -167,8 +168,7 @@ struct DMAC uint8 gcr; }; -class DMACDevice - : public IODevice +class DMACDevice : public IODevice { using inherited = IODevice; @@ -179,7 +179,6 @@ class DMACDevice virtual ~DMACDevice() override; void ResetHard() override; - void MonitorUpdate(TextScreen&) override; // 転送 void StartTransfer(DMAC::Channel *chan); @@ -194,11 +193,12 @@ class DMACDevice protected: // BusIO インタフェース static const uint NPORT = 256; - 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: + DECLARE_MONITOR_CALLBACK(MonitorUpdate); void MonitorReg4(TextScreen&, int x, int y, uint32 reg, const char * const *names); @@ -208,6 +208,8 @@ class DMACDevice struct DMAC dmac {}; Event event[4] {}; + Monitor monitor { this }; + static const char * const errnames[]; };