--- nono/vm/mfp.h 2026/04/29 17:04:45 1.1.1.6 +++ nono/vm/mfp.h 2026/04/29 17:04:52 1.1.1.8 @@ -187,7 +187,6 @@ class MFPDevice virtual ~MFPDevice() override; void ResetHard() override; - void ResetSoft() override; void MonitorUpdate(TextScreen&) override; // 割り込みアクノリッジ @@ -199,8 +198,8 @@ class MFPDevice // KEY CTRL 状態を設定する void SetKeyCtrl(bool ctrl); - // RR 線の状態を返す - bool IsRR() const; + // キーボードからの送信が可能なら true を返す。 + bool RxIsReady() const; // キーボードからデータを受信 void Rx(uint32 data); @@ -208,12 +207,11 @@ class MFPDevice protected: // BusIO インタフェース static const uint32 NPORT = 0x20; - 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 Reset(); void SetTCR(int ch, uint32 data); uint8 GetTDR(int ch) const; void SetTDR(int ch, uint32 data); @@ -225,6 +223,12 @@ class MFPDevice void SetRSR(uint32 data); void SetUDR(uint32 data); + // RSR::BF ビットの状態を変える + void SetBF(); + void ClearBF(); + // MFP の RR 線の状態を返す + bool IsRR() const; + // イベントコールバック void TimerCallback(Event& ev); void KeyCallback(Event& ev); @@ -239,12 +243,6 @@ class MFPDevice Event event[4] {}; Event key_event {}; - // Receiver Ready 線の状態 - bool rr {}; - - // システムポート#4 の KEY CTRL 状態 - bool key_ctrl {}; - static const char *intrname[]; static const char *gpipname[]; static const int prescale_ns[8];