Annotation of nono/vm/pedec.h, revision 1.1.1.9

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2020 nono project
                      4: // Licensed under nono-license.txt
                      5: //
                      6: 
1.1.1.6   root        7: //
                      8: // PEDEC
                      9: //
                     10: 
1.1       root       11: #pragma once
                     12: 
                     13: #include "interrupt.h"
                     14: 
1.1.1.4   root       15: class PEDECDevice : public InterruptDevice
1.1       root       16: {
                     17:        using inherited = InterruptDevice;
1.1.1.6   root       18: 
1.1       root       19:        static const int baseaddr = 0xe9c000;
                     20: 
                     21:  public:
1.1.1.9 ! root       22:        // SPC からの割り込みはここでマスク制御しないので intmap_enable には
1.1.1.2   root       23:        // IntmapSPC を常に立てておくこと。
1.1.1.9 ! root       24:        static const uint32 IntmapSPC   = 0x1000;
        !            25:        static const uint32 IntmapFDC   = 0x0080;
        !            26:        static const uint32 IntmapFDD0  = 0x0800;
        !            27:        static const uint32 IntmapFDD1  = 0x0400;
        !            28:        static const uint32 IntmapFDD2  = 0x0200;
        !            29:        static const uint32 IntmapFDD3  = 0x0100;
        !            30:        static const uint32 IntmapFDD   = 0x0f00;       // FDD(0|1|2|3)
        !            31:        static const uint32 IntmapHDD   = 0x0020;
        !            32:        static const uint32 IntmapPRT   = 0x0010;
1.1.1.2   root       33: 
                     34:  public:
1.1       root       35:        PEDECDevice();
1.1.1.9 ! root       36:        ~PEDECDevice() override;
1.1       root       37: 
1.1.1.7   root       38:        bool Init() override;
1.1.1.6   root       39:        void ResetHard(bool poweron) override;
1.1       root       40: 
                     41:        // InterruptDevice インタフェース
1.1.1.9 ! root       42:        busdata InterruptAcknowledge(int lv) override;
1.1       root       43: 
1.1.1.5   root       44:        // 割り込みコントローラからのモニタ表示
                     45:        void MonitorUpdate(TextScreen& screen, uint intr_level, int y);
1.1.1.2   root       46: 
1.1       root       47:  protected:
                     48:        // BusIO インタフェース
                     49:        static const uint32 NPORT = 8;
1.1.1.9 ! root       50:        busdata Read(uint32 offset);
        !            51:        busdata Write(uint32 offset, uint32 data);
        !            52:        busdata Peek(uint32 offset);
1.1       root       53: 
                     54:  private:
                     55:        // 割り込みステータスレジスタの値を取得
                     56:        uint32 GetStat() const;
                     57: 
                     58:        // 割り込み信号線の状態を変える
1.1.1.5   root       59:        void ChangeInterrupt() override;
1.1       root       60: 
                     61:        uint8 vector {};
1.1.1.7   root       62: 
                     63:        InterruptDevice *interrupt {};
1.1       root       64: };
                     65: 
1.1.1.7   root       66: static inline PEDECDevice *GetPEDECDevice() {
                     67:        return Object::GetObject<PEDECDevice>(OBJ_PEDEC);
                     68: }

unix.superglobalmegacorp.com

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