--- nono/debugger/vectortable.h 2026/04/29 17:05:13 1.1.1.2 +++ nono/debugger/vectortable.h 2026/04/29 17:05:28 1.1.1.4 @@ -10,19 +10,25 @@ #pragma once -#include "object.h" +#include "device.h" #include "monitor.h" #include +#include #include -class VectorTable : public Object +class MainbusDevice; +class MainMPUDevice; + +class VectorTable : public Device { - using inherited = Object; + using inherited = Device; public: - VectorTable(VMType vmtype); + explicit VectorTable(VMType vmtype); ~VectorTable() override; + bool Init() override; + // 例外名を返す (ベクタテーブル用) const char *GetTableName(int vector) const; @@ -43,14 +49,20 @@ class VectorTable : public Object // ベクタテーブル std::vector nametable {}; + MainbusDevice *mainbus {}; + MainMPUDevice *mpu {}; + // モニタ Monitor monitor { this }; // 初期値 static std::array name_m68030; - static std::array name_x68030; - static std::array name_luna1; + static std::map name_x68030; + static std::map name_luna1; + static std::map name_news; static std::array name_luna88k; }; -extern VectorTable *gVectorTable; +static inline VectorTable *GetVectorTable() { + return Object::GetObject(OBJ_VECTOR_TABLE); +}