--- nono/vm/upd7201.h 2026/04/29 17:04:45 1.1.1.5 +++ 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 のレジスタ // @@ -81,7 +82,7 @@ struct SIO // | | +---------------- Stop Bits // | +-------------------------- Sync Mode // +------------------------------------ Clock Rate - // + // static const int CR4_CLKRATE = 0xc0; static const int CR4_SYNCMODE = 0x30; static const int CR4_STOPBITS = 0x0c; @@ -262,15 +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 MonitorUpdate(TextScreen&) override; + void ResetHard() override; // 受信 bool Rx(int ch, uint32 data); @@ -292,6 +292,8 @@ class uPD7201Device struct SIO cr {}; + Monitor monitor { this }; + static const int bits_per_char[4]; private: @@ -306,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);