--- nono/vm/upd7201.h 2026/04/29 17:04:50 1.1.1.6 +++ nono/vm/upd7201.h 2026/04/29 17:04:56 1.1.1.7 @@ -7,6 +7,7 @@ #pragma once #include "device.h" +#include "monitor.h" // uPD7201/Z8530 のレジスタ // @@ -262,16 +263,14 @@ struct SIO } chan[2]; }; -class uPD7201Device - : public IODevice +class uPD7201Device : public IODevice { using inherited = IODevice; public: - uPD7201Device(); + uPD7201Device(const std::string& objname_); virtual ~uPD7201Device() override; void ResetHard() override; - void MonitorUpdate(TextScreen&) override; // 受信 bool Rx(int ch, uint32 data); @@ -293,6 +292,8 @@ class uPD7201Device struct SIO cr {}; + Monitor monitor { this }; + static const int bits_per_char[4]; private: @@ -307,6 +308,7 @@ class uPD7201Device void ChangeInterrupt(); + DECLARE_MONITOR_CALLBACK(MonitorUpdate); void MonitorUpdateCh(TextScreen&, int ch, int xbase, int ybase); void MonitorReg(TextScreen&, int, int, uint32 reg, const char * const *names);