--- nono/debugger/vectortable.h 2026/04/29 17:05:09 1.1 +++ nono/debugger/vectortable.h 2026/04/29 17:05:16 1.1.1.3 @@ -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 MPUDevice; + +class VectorTable : public Device { - using inherited = Object; + using inherited = Device; public: - VectorTable(int vmtype); + VectorTable(VMType vmtype); ~VectorTable() override; + bool Init() override; + // 例外名を返す (ベクタテーブル用) const char *GetTableName(int vector) const; @@ -37,20 +43,26 @@ class VectorTable : public Object private: // 初期化 - void InitTableM68030(int vmtype); + void InitTableM68030(VMType vmtype); void InitTableLuna88k(); // ベクタテーブル std::vector nametable {}; + MainbusDevice *mainbus {}; + MPUDevice *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); +}