--- nono/vm/scc.h 2026/04/29 17:05:09 1.1.1.9 +++ nono/vm/scc.h 2026/04/29 17:05:17 1.1.1.10 @@ -13,16 +13,17 @@ #include "device.h" #include "mpscc.h" +class Keyboard; + class SCCDevice : public MPSCCDevice { using inherited = MPSCCDevice; - static const int baseaddr = 0xe98000; - public: SCCDevice(); virtual ~SCCDevice() override; + bool Init() override; void ResetHard(bool poweron) override; // 割り込みアクノリッジ @@ -86,8 +87,15 @@ class SCCDevice : public MPSCCDevice DECLARE_MONITOR_CALLBACK(MonitorUpdate); void MonitorUpdateCh(TextScreen&, int ch, int xbase, int ybase); + // PCLK (入力クロック) の時間表現 + uint64 pclk_ns {}; + + Keyboard *keyboard {}; + static const char * const wrnames[32]; static const char * const rrnames[32]; }; -extern SCCDevice *gSCC; +static inline SCCDevice *GetSCCDevice() { + return Object::GetObject(OBJ_MPSCC); +}