--- nono/vm/mpu.h 2026/04/29 17:05:13 1.1.1.12 +++ nono/vm/mpu.h 2026/04/29 17:05:16 1.1.1.13 @@ -5,7 +5,7 @@ // // -// MPU 共通部 +// メイン MPU (680x0/88xx0) 共通部 // #pragma once @@ -14,11 +14,15 @@ #include "event.h" #include "message.h" +class Debugger; +class MainbusDevice; +class Syncer; + class MPUDevice : public Device { using inherited = Device; public: - MPUDevice(const std::string& objname_); + MPUDevice(); virtual ~MPUDevice() override; bool Init() override; @@ -68,6 +72,10 @@ class MPUDevice : public Device bool resetting {}; // リセット処理中フラグ + Debugger *debugger {}; + MainbusDevice *mainbus {}; + Syncer *syncer {}; + // 1命令実行イベント Event exec_event { this }; @@ -75,4 +83,9 @@ class MPUDevice : public Device static const char * const rmstr[4]; }; +// XXX 互換性のためまだしばらく必要 extern MPUDevice *gMPU; + +static inline MPUDevice *GetMPUDevice() { + return Object::GetObject(OBJ_MPU); +}