Annotation of nono/vm/mpu88xx0.h, revision 1.1.1.1

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2020 [email protected]
                      4: //
                      5: 
                      6: // MPU (m88xx0)
                      7: 
                      8: #pragma once
                      9: 
                     10: #include "mpu.h"
                     11: #include "m88100.h"
                     12: 
                     13: class MPU88xx0Device : public MPUDevice
                     14: {
                     15:        typedef MPUDevice inherited;
                     16:  public:
                     17:        MPU88xx0Device(uint32 reset_addr);
                     18:        virtual ~MPU88xx0Device();
                     19: 
                     20:        virtual void ResetHard();
                     21: 
                     22:        virtual bool MonitorUpdate();
                     23: 
                     24:        // MPU を request サイクル分実行する
                     25:        virtual uint32 Run(uint64 request) { return cpu->Run(request); }
                     26: 
                     27:        // 基準サイクル数を取得
                     28:        virtual uint64 total_cycle() const { return cpu->total_cycle; }
                     29: 
                     30:        // MPU の処理をこの命令で中断させる。
                     31:        virtual void Release() { cpu->Release(); }
                     32: 
                     33:        // 現在実行中の命令の PC を取得
                     34:        virtual uint32 GetPPC() const { return cpu->Getxip(); }
                     35: 
                     36:        // 現在アクセス中の論理アドレス、物理アドレスを取得。
                     37:        virtual uint32 GetLaddr() const { return 0; }   // XXX NotImplemented
                     38:        virtual uint32 GetPaddr() const { return 0; }   // XXX NotImplemented
                     39: 
                     40:        // 割り込み発生を MPU に通知
                     41:        virtual void Interrupt(int dummy) { cpu->Interrupt(); }
                     42: 
                     43:        // CPU コアを取得 (主にデバッグ用途)
                     44:        m88kcpu *GetCPU() const { return cpu.get(); }
                     45: 
                     46:  private:
                     47:        // リセットベクタ
                     48:        uint32 reset_vector;
                     49: 
                     50:        std::unique_ptr<m88kcpu> cpu;
                     51: };
                     52: 
                     53: #define gMPU88xx0      (dynamic_cast<MPU88xx0Device *>(gMPU.get()))

unix.superglobalmegacorp.com

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