--- nono/vm/sio.h 2026/04/29 17:05:10 1.1.1.9 +++ nono/vm/sio.h 2026/04/29 17:05:17 1.1.1.10 @@ -13,6 +13,8 @@ #include "device.h" #include "mpscc.h" +class Keyboard; + class SIODevice : public MPSCCDevice { using inherited = MPSCCDevice; @@ -20,6 +22,7 @@ class SIODevice : public MPSCCDevice SIODevice(); virtual ~SIODevice() override; + bool Init() override; void ResetHard(bool poweron) override; // BusIO インタフェース @@ -68,8 +71,12 @@ class SIODevice : public MPSCCDevice DECLARE_MONITOR_CALLBACK(MonitorUpdate); void MonitorUpdateCh(TextScreen&, int ch, int xbase, int ybase); + Keyboard *keyboard {}; + static const char * const crnames[16]; static const char * const srnames[16]; }; -extern SIODevice *gSIO; +static inline SIODevice *GetSIODevice() { + return Object::GetObject(OBJ_MPSCC); +}