--- nono/vm/pio.h 2026/04/29 17:04:36 1.1.1.2 +++ nono/vm/pio.h 2026/04/29 17:04:45 1.1.1.5 @@ -19,7 +19,9 @@ class i8255Device public: i8255Device(); - ~i8255Device() override; + virtual ~i8255Device() override; + + void ResetHard() override; protected: // コントロールポートの読み出し @@ -61,7 +63,7 @@ class PPIDevice public: PPIDevice(); - ~PPIDevice() override; + virtual ~PPIDevice() override; protected: // BusIO インタフェース @@ -77,10 +79,11 @@ class PIO0Device using inherited = i8255Device; public: PIO0Device(); - ~PIO0Device() override; + virtual ~PIO0Device() override; bool Init() override; - bool MonitorUpdate() override; + + void MonitorUpdate(TextScreen&) override; // DIP-SW1 の状態を取得 (ROM エミュレーション用) // @@ -106,12 +109,12 @@ class PIO0Device bool dipsw1[8] {}; bool dipsw2[8] {}; - bool int1rq = false; // $01 INT1 割り込み要求 - bool int1en = false; // $04 INT1 割り込み許可 - bool int5rq = false; // $08 INT5 割り込み要求 - bool int5en = false; // $10 INT5 割り込み許可 - bool parity = false; // $40 パリティ有効/無効 - bool xp_reset = false; // $80 XP リセット + bool int1rq {}; // $01 INT1 割り込み要求 + bool int1en {}; // $04 INT1 割り込み許可 + bool int5rq {}; // $08 INT5 割り込み要求 + bool int5en {}; // $10 INT5 割り込み許可 + bool parity {}; // $40 パリティ有効/無効 + bool xp_reset {}; // $80 XP リセット }; class PIO1Device @@ -120,7 +123,9 @@ class PIO1Device using inherited = i8255Device; public: PIO1Device(); - ~PIO1Device() override; + virtual ~PIO1Device() override; + + void ResetHard() override; protected: // BusIO インタフェース @@ -131,10 +136,10 @@ class PIO1Device private: void SetPC(int, int) override; - void PowerOffCallback(int); + void PowerOffCallback(Event& ev); - bool power = false; // パワーダウン (false で電源オフ指示) - bool xp_intreq = false; // XP 割り込み要求。あり(true)なら %0 + bool power {}; // パワーダウン (false で電源オフ指示) + bool xp_intreq {}; // XP 割り込み要求。あり(true)なら %0 Event poffevent {}; // 電源オフイベント };