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

1.1       root        1: //
                      2: // nono
1.1.1.3   root        3: // Copyright (C) 2020 nono project
                      4: // Licensed under nono-license.txt
1.1       root        5: //
                      6: 
1.1.1.9 ! root        7: //
        !             8: // SCC (Z8530)
        !             9: //
        !            10: 
1.1       root       11: #pragma once
                     12: 
                     13: #include "device.h"
1.1.1.9 ! root       14: #include "mpscc.h"
1.1       root       15: 
1.1.1.9 ! root       16: class SCCDevice : public MPSCCDevice
1.1       root       17: {
1.1.1.9 ! root       18:        using inherited = MPSCCDevice;
        !            19: 
1.1       root       20:        static const int baseaddr = 0xe98000;
                     21: 
                     22:  public:
                     23:        SCCDevice();
1.1.1.4   root       24:        virtual ~SCCDevice() override;
1.1       root       25: 
1.1.1.9 ! root       26:        void ResetHard(bool poweron) override;
1.1       root       27: 
1.1.1.4   root       28:        // 割り込みアクノリッジ
                     29:        int InterruptAcknowledge();
1.1.1.2   root       30: 
1.1.1.3   root       31:  protected:
                     32:        // BusIO インタフェース
                     33:        static const uint32 NPORT = 4;
1.1.1.5   root       34:        uint64 Read(uint32 offset);
                     35:        uint64 Write(uint32 offset, uint32 data);
                     36:        uint64 Peek(uint32 offset);
1.1.1.4   root       37: 
1.1.1.8   root       38:        void Tx(int ch, uint32 data) override;
1.1.1.9 ! root       39:        uint GetHighestInt() const override;
1.1.1.8   root       40: 
1.1.1.9 ! root       41:  private:
1.1.1.8   root       42:        // 指定のレジスタ名を返す
1.1.1.9 ! root       43:        const char *CRName(const MPSCCChan&, int n) const override;
        !            44:        const char *SRName(const MPSCCChan&, int n) const override;
1.1.1.8   root       45: 
                     46:        // WR, RR のほうが通りがいいので結局用意する
1.1.1.9 ! root       47:        const char *WRName(const MPSCCChan& chan, int n) const {
1.1.1.8   root       48:                return CRName(chan, n);
                     49:        }
1.1.1.9 ! root       50:        const char *WRName(const MPSCCChan& chan) const {
1.1.1.8   root       51:                return inherited::CRName(chan);
                     52:        }
1.1.1.9 ! root       53:        const char *RRName(const MPSCCChan& chan, int n) const {
1.1.1.8   root       54:                return SRName(chan, n);
                     55:        }
1.1.1.9 ! root       56:        const char *RRName(const MPSCCChan& chan) const {
1.1.1.8   root       57:                return inherited::SRName(chan);
                     58:        }
                     59: 
1.1.1.9 ! root       60:        void ResetChannel(MPSCCChan&);
        !            61: 
        !            62:        uint8 ReadCtrl(MPSCCChan&);
        !            63:        void WriteCtrl(MPSCCChan&, uint32 data);
        !            64:        uint8 PeekCtrl(const MPSCCChan&) const;
        !            65: 
        !            66:        uint8 GetWR1(const MPSCCChan&) const;
        !            67:        uint8 GetWR9() const;
        !            68:        uint8 GetRR0(const MPSCCChan&) const;
        !            69:        uint8 GetRR2B() const;
        !            70:        uint8 GetRR3A() const;
        !            71: 
        !            72:        void WriteWR0(MPSCCChan&, uint32 data);
        !            73:        void WriteWR1(MPSCCChan&, uint32 data);
        !            74:        void WriteWR2(uint32 data);
        !            75:        void WriteWR5(MPSCCChan&, uint32 data);
        !            76:        void WriteWR9(uint32 data);
        !            77:        void WriteWR10(MPSCCChan&, uint32 data);
        !            78:        void WriteWR11(MPSCCChan&, uint32 data);
        !            79:        void WriteWR12(MPSCCChan&, uint32 data);
        !            80:        void WriteWR13(MPSCCChan&, uint32 data);
        !            81:        void WriteWR14(MPSCCChan&, uint32 data);
        !            82:        void WriteWR15(MPSCCChan&, uint32 data);
        !            83: 
        !            84:        void SetXC(MPSCCChan&);
        !            85: 
        !            86:        DECLARE_MONITOR_CALLBACK(MonitorUpdate);
        !            87:        void MonitorUpdateCh(TextScreen&, int ch, int xbase, int ybase);
1.1.1.8   root       88: 
                     89:        static const char * const wrnames[32];
                     90:        static const char * const rrnames[32];
1.1       root       91: };
1.1.1.2   root       92: 
1.1.1.9 ! root       93: extern SCCDevice *gSCC;

unix.superglobalmegacorp.com

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