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

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: 
                     13: #include "device.h"
1.1.1.2 ! root       14: #include "monitor.h"
1.1       root       15: #include <array>
                     16: 
                     17: class X68kIODevice : public IOContainerDevice
                     18: {
                     19:        using inherited = IOContainerDevice;
                     20:  public:
                     21:        X68kIODevice();
                     22:        virtual ~X68kIODevice() override;
                     23: 
                     24:        bool Init() override;
                     25: 
                     26:        uint64 Read8(uint32 addr) override;
                     27:        uint64 Read16(uint32 addr) override;
                     28:        uint64 Read32(uint32 addr) override;
                     29:        uint64 Write8(uint32 addr, uint32 data) override;
                     30:        uint64 Write16(uint32 addr, uint32 data) override;
                     31:        uint64 Write32(uint32 addr, uint32 data) override;
                     32:        uint64 Peek8(uint32 addr) override;
                     33: 
                     34:        // ブートページを切り替える。
                     35:        void SwitchBootPage(bool isrom);
                     36: 
1.1.1.2 ! root       37:        // デバイスをセット (Nereid からも呼ばれる)
        !            38:        void AddDevice(IODevice *dev, uint devaddr, uint devlen);
        !            39: 
1.1       root       40:  protected:
                     41:        IODevice *GetDevice(uint32 addr) const override;
                     42: 
                     43:  private:
                     44:        IODevice *SearchDevice(uint32 addr) const;
                     45: 
1.1.1.2 ! root       46:        DECLARE_MONITOR_CALLBACK(MonitorUpdate);
1.1       root       47: 
                     48:        std::unique_ptr<IODevice> pADPCM {};
                     49:        std::unique_ptr<IODevice> pAreaSet {};
                     50:        std::unique_ptr<IODevice> pCGROM {};
                     51:        std::unique_ptr<IODevice> pCRTC {};
                     52:        std::unique_ptr<IODevice> pDMAC {};
                     53:        std::unique_ptr<IODevice> pFDC {};
                     54:        std::unique_ptr<IODevice> pGVRAM {};
                     55:        std::unique_ptr<IODevice> pPEDEC {};
                     56:        std::unique_ptr<IODevice> pIPLROM1 {};
                     57:        std::unique_ptr<IODevice> pIPLROM2 {};
                     58:        std::unique_ptr<IODevice> pMFP {};
1.1.1.2 ! root       59:        std::unique_ptr<IODevice> pNereid {};
1.1       root       60:        std::unique_ptr<IODevice> pOPM {};
                     61:        std::unique_ptr<IODevice> pPlaneVRAM {};
                     62:        std::unique_ptr<IODevice> pPluto {};
                     63:        std::unique_ptr<IODevice> pPPI {};
                     64:        std::unique_ptr<IODevice> pPrinter {};
                     65:        std::unique_ptr<IODevice> pRTC {};
                     66:        std::unique_ptr<IODevice> pSCC {};
                     67:        std::unique_ptr<IODevice> pSRAM {};
                     68:        std::unique_ptr<IODevice> pSPC {};
                     69:        std::unique_ptr<IODevice> pSprite {};
                     70:        std::unique_ptr<IODevice> pSysport {};
                     71:        std::unique_ptr<IODevice> pVideoCtlr {};
                     72: 
                     73:        std::array<IODevice*, 2048> table {};
1.1.1.2 ! root       74: 
        !            75:        Monitor monitor { this };
1.1       root       76: };
1.1.1.2 ! root       77: 
        !            78: static inline X68kIODevice *GetX68kIODevice() {
        !            79:        return Object::GetObject<X68kIODevice>(OBJ_X68KIO);
        !            80: }

unix.superglobalmegacorp.com

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