--- nono/vm/pio.h 2026/04/29 17:04:32 1.1.1.1 +++ nono/vm/pio.h 2026/04/29 17:04:36 1.1.1.2 @@ -1,6 +1,7 @@ // // nono -// Copyright (C) 2017 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // #pragma once @@ -14,11 +15,11 @@ class i8255Device : public IODevice { - typedef IODevice inherited; + using inherited = IODevice; public: i8255Device(); - virtual ~i8255Device(); + ~i8255Device() override; protected: // コントロールポートの読み出し @@ -54,13 +55,13 @@ class i8255Device class PPIDevice : public i8255Device { - typedef i8255Device inherited; + using inherited = i8255Device; private: static const int baseaddr = 0xe9a000; public: PPIDevice(); - virtual ~PPIDevice(); + ~PPIDevice() override; protected: // BusIO インタフェース @@ -73,12 +74,13 @@ class PPIDevice class PIO0Device : public i8255Device { - typedef i8255Device inherited; + using inherited = i8255Device; public: PIO0Device(); - virtual ~PIO0Device(); + ~PIO0Device() override; - virtual bool Init(); + bool Init() override; + bool MonitorUpdate() override; // DIP-SW1 の状態を取得 (ROM エミュレーション用) // @@ -100,7 +102,7 @@ class PIO0Device uint32 GetPA() const; uint32 GetPB() const; uint32 GetPC() const; - virtual void SetPC(int, int); + void SetPC(int, int) override; bool dipsw1[8] {}; bool dipsw2[8] {}; @@ -115,10 +117,10 @@ class PIO0Device class PIO1Device : public i8255Device { - typedef i8255Device inherited; + using inherited = i8255Device; public: PIO1Device(); - virtual ~PIO1Device(); + ~PIO1Device() override; protected: // BusIO インタフェース @@ -128,7 +130,7 @@ class PIO1Device uint64 Peek(uint32 addr); private: - virtual void SetPC(int, int); + void SetPC(int, int) override; void PowerOffCallback(int); bool power = false; // パワーダウン (false で電源オフ指示)