Annotation of nono/debugger/vectortable.h, revision 1.1.1.5

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2022 nono project
                      4: // Licensed under nono-license.txt
                      5: //
                      6: 
                      7: //
                      8: // ベクタテーブル (モニタ)
                      9: //
                     10: 
                     11: #pragma once
                     12: 
1.1.1.3   root       13: #include "device.h"
1.1       root       14: #include <array>
1.1.1.3   root       15: #include <map>
1.1       root       16: #include <vector>
                     17: 
1.1.1.3   root       18: class MainbusDevice;
1.1.1.4   root       19: class MainMPUDevice;
1.1.1.5 ! root       20: enum class VMType;
1.1.1.3   root       21: 
                     22: class VectorTable : public Device
1.1       root       23: {
1.1.1.3   root       24:        using inherited = Device;
1.1       root       25: 
                     26:  public:
1.1.1.4   root       27:        explicit VectorTable(VMType vmtype);
1.1       root       28:        ~VectorTable() override;
                     29: 
1.1.1.3   root       30:        bool Init() override;
                     31: 
1.1       root       32:        // 例外名を返す (ベクタテーブル用)
                     33:        const char *GetTableName(int vector) const;
                     34: 
                     35:        // 例外名を返す (例外履歴用)
                     36:        const char *GetExceptionName(int vector) const;
                     37: 
                     38:        // ベクタテーブルの要素数を返す
                     39:        int Size() const { return nametable.size(); }
                     40: 
                     41:        // モニタ更新
                     42:        DECLARE_MONITOR_CALLBACK(MonitorUpdate);
                     43: 
                     44:  private:
                     45:        // 初期化
1.1.1.5 ! root       46:        void InitTableM680x0(VMType vmtype);
1.1       root       47:        void InitTableLuna88k();
                     48: 
                     49:        // ベクタテーブル
                     50:        std::vector<const char *> nametable {};
                     51: 
1.1.1.3   root       52:        MainbusDevice *mainbus {};
1.1.1.4   root       53:        MainMPUDevice *mpu {};
1.1.1.3   root       54: 
1.1       root       55:        // モニタ
1.1.1.5 ! root       56:        Monitor *monitor {};
1.1       root       57: 
                     58:        // 初期値
1.1.1.5 ! root       59:        static std::array<const char * const, 64>  name_m680x0;
1.1.1.3   root       60:        static std::map<int, const char * const>   name_x68030;
                     61:        static std::map<int, const char * const>   name_luna1;
                     62:        static std::map<int, const char * const>   name_news;
1.1.1.5 ! root       63:        static std::map<int, const char * const>   name_virt68k;
1.1       root       64:        static std::array<const char * const, 11>  name_luna88k;
                     65: };
                     66: 
1.1.1.3   root       67: static inline VectorTable *GetVectorTable() {
                     68:        return Object::GetObject<VectorTable>(OBJ_VECTOR_TABLE);
                     69: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.