--- nono/vm/sysport.h 2026/04/29 17:04:56 1.1.1.8 +++ nono/vm/sysport.h 2026/04/29 17:05:14 1.1.1.10 @@ -4,6 +4,10 @@ // Licensed under nono-license.txt // +// +// システムポート +// + #pragma once #include "device.h" @@ -23,19 +27,20 @@ struct SYSPORT int rom_wait; // 設定値。ウェイトにする時には +2 する int ram_wait; // 設定値。 bool key_ctrl; + uint pwoff_count; }; class SysportDevice : public IODevice { using inherited = IODevice; - private: + static const uint32 baseaddr = 0xe8e000; public: SysportDevice(); virtual ~SysportDevice() override; - void ResetHard() override; + void ResetHard(bool poweron) override; // KEYCTRL の状態を取得する bool GetKeyCtrl() const { @@ -53,4 +58,4 @@ class SysportDevice : public IODevice struct SYSPORT sysport {}; }; -extern std::unique_ptr gSysport; +extern SysportDevice *gSysport;