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

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 *GetExceptionName(int vector) const;
                     34: 
                     35:        // ベクタテーブルの要素数を返す
                     36:        int Size() const { return nametable.size(); }
                     37: 
                     38:  private:
                     39:        // 初期化
1.1.1.5   root       40:        void InitTableM680x0(VMType vmtype);
1.1       root       41:        void InitTableLuna88k();
                     42: 
1.1.1.7   root       43:        // モニタ更新
1.1.1.8 ! root       44:        DECLARE_MONITOR_SCREEN(MonitorScreenM680x0);
        !            45:        DECLARE_MONITOR_SCREEN(MonitorScreenM88xx0);
1.1.1.7   root       46: 
                     47:        // m88100 のベクタテーブルから再分岐先を取得する。
                     48:        busaddr VectorToAddr(uint32 vecaddr);
                     49: 
1.1       root       50:        // ベクタテーブル
                     51:        std::vector<const char *> nametable {};
                     52: 
1.1.1.3   root       53:        MainbusDevice *mainbus {};
1.1.1.4   root       54:        MainMPUDevice *mpu {};
1.1.1.3   root       55: 
1.1       root       56:        // モニタ
1.1.1.5   root       57:        Monitor *monitor {};
1.1       root       58: 
                     59:        // 初期値
1.1.1.5   root       60:        static std::array<const char * const, 64>  name_m680x0;
1.1.1.3   root       61:        static std::map<int, const char * const>   name_x68030;
                     62:        static std::map<int, const char * const>   name_luna1;
                     63:        static std::map<int, const char * const>   name_news;
1.1.1.5   root       64:        static std::map<int, const char * const>   name_virt68k;
1.1.1.7   root       65:        static std::map<int, const char * const>   name_luna88k;
1.1       root       66: };
                     67: 
1.1.1.8 ! root       68: inline VectorTable *GetVectorTable() {
1.1.1.3   root       69:        return Object::GetObject<VectorTable>(OBJ_VECTOR_TABLE);
                     70: }

unix.superglobalmegacorp.com

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