Annotation of nono/vm/x68kio.h, revision 1.1.1.5

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2020 nono project
                      4: // Licensed under nono-license.txt
                      5: //
                      6: 
                      7: //
                      8: // X68030 のメイン空間 ($000000-$FFFFFF) 担当
                      9: //
                     10: 
                     11: #pragma once
                     12: 
1.1.1.3   root       13: #include "mainbus.h"
1.1       root       14: 
1.1.1.3   root       15: class X68kIODevice : public MainbusBaseDevice
1.1       root       16: {
1.1.1.3   root       17:        using inherited = MainbusBaseDevice;
1.1       root       18:  public:
                     19:        X68kIODevice();
1.1.1.3   root       20:        ~X68kIODevice() override;
1.1       root       21: 
1.1.1.3   root       22:        bool InitMainbus() override;
1.1       root       23: 
1.1.1.4   root       24:        busdata Read(busaddr addr) override;
                     25:        busdata Write(busaddr addr, uint32 data) override;
                     26:        busdata Peek1(uint32 addr) override;
                     27:        bool Poke1(uint32 addr, uint32 data) override;
1.1.1.3   root       28: 
                     29:        // ブートページを切り替える。(X68kMainbus から呼ばれる)
                     30:        void SwitchBootPage(bool isrom) override;
                     31: 
                     32:        // エリアセット。
                     33:        uint8 GetAreaset() const { return arealimit; }
                     34:        void SetAreaset(uint8 arealimit_);
                     35:        // 拡張エリアセット。
1.1.1.4   root       36:        uint8 GetExtarea(uint offset) const;
                     37:        void SetExtarea(uint offset, uint8 data);
1.1       root       38: 
1.1.1.3   root       39:  private:
                     40:        void SetUdevice(uint32 startaddr, uint32 endaddr, bool accessible);
1.1.1.2   root       41:        void AddDevice(IODevice *dev, uint devaddr, uint devlen);
                     42: 
1.1.1.3   root       43:        inline IODevice *Decoder(bool super, uint32 addr) const;
                     44:        inline void CheckCI(busaddr addr);
1.1       root       45: 
1.1.1.2   root       46:        DECLARE_MONITOR_CALLBACK(MonitorUpdate);
1.1.1.3   root       47:        DECLARE_MONITOR_CALLBACK(MonitorUpdateAreaset);
1.1       root       48: 
                     49:        std::unique_ptr<IODevice> pADPCM {};
                     50:        std::unique_ptr<IODevice> pAreaSet {};
1.1.1.3   root       51:        std::unique_ptr<IODevice> pBusErr {};
1.1       root       52:        std::unique_ptr<IODevice> pCGROM {};
                     53:        std::unique_ptr<IODevice> pCRTC {};
                     54:        std::unique_ptr<IODevice> pDMAC {};
1.1.1.3   root       55:        std::unique_ptr<IODevice> pExtArea {};
1.1       root       56:        std::unique_ptr<IODevice> pFDC {};
                     57:        std::unique_ptr<IODevice> pGVRAM {};
                     58:        std::unique_ptr<IODevice> pPEDEC {};
1.1.1.3   root       59:        std::unique_ptr<IODevice> pIPLROM0 {};
1.1       root       60:        std::unique_ptr<IODevice> pIPLROM1 {};
                     61:        std::unique_ptr<IODevice> pIPLROM2 {};
1.1.1.3   root       62:        std::unique_ptr<IODevice> pMainRAM {};
1.1       root       63:        std::unique_ptr<IODevice> pMFP {};
1.1.1.2   root       64:        std::unique_ptr<IODevice> pNereid {};
1.1       root       65:        std::unique_ptr<IODevice> pOPM {};
                     66:        std::unique_ptr<IODevice> pPlaneVRAM {};
                     67:        std::unique_ptr<IODevice> pPluto {};
                     68:        std::unique_ptr<IODevice> pPPI {};
                     69:        std::unique_ptr<IODevice> pPrinter {};
                     70:        std::unique_ptr<IODevice> pRTC {};
                     71:        std::unique_ptr<IODevice> pSCC {};
                     72:        std::unique_ptr<IODevice> pSRAM {};
                     73:        std::unique_ptr<IODevice> pSPC {};
                     74:        std::unique_ptr<IODevice> pSprite {};
                     75:        std::unique_ptr<IODevice> pSysport {};
                     76:        std::unique_ptr<IODevice> pVideoCtlr {};
1.1.1.3   root       77:        std::unique_ptr<IODevice> pWindrv {};
                     78: 
                     79:        std::array<IODevice*, 2048> udevice {}; // ユーザ空間用
                     80:        std::array<IODevice*, 2048> sdevice {}; // スーパーバイザ空間用
                     81: 
                     82:        uint8 arealimit {};                                     // エリアセット (設定値)
                     83:        std::array<uint8, 5> extarea {};        // 拡張エリアセット (設定値)
1.1       root       84: 
1.1.1.3   root       85:        bool cut_fc2 {};                                        // FC2 ピンカットなら true
1.1.1.2   root       86: 
1.1.1.5 ! root       87:        Monitor *map_monitor {};
        !            88:        Monitor *area_monitor {};
1.1       root       89: };
1.1.1.2   root       90: 
                     91: static inline X68kIODevice *GetX68kIODevice() {
                     92:        return Object::GetObject<X68kIODevice>(OBJ_X68KIO);
                     93: }

unix.superglobalmegacorp.com

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