--- nono/vm/sysport.h 2026/04/29 17:04:53 1.1.1.7 +++ nono/vm/sysport.h 2026/04/29 17:05:11 1.1.1.9 @@ -4,6 +4,10 @@ // Licensed under nono-license.txt // +// +// システムポート +// + #pragma once #include "device.h" @@ -25,18 +29,17 @@ struct SYSPORT bool key_ctrl; }; -class SysportDevice - : public IODevice +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 { @@ -54,4 +57,4 @@ class SysportDevice struct SYSPORT sysport {}; }; -extern std::unique_ptr gSysport; +extern SysportDevice *gSysport;