Annotation of nono/vm/newsio.h, revision 1.1

1.1     ! root        1: //
        !             2: // nono
        !             3: // Copyright (C) 2022 nono project
        !             4: // Licensed under nono-license.txt
        !             5: //
        !             6: 
        !             7: //
        !             8: // NEWS の I/O 空間担当
        !             9: //
        !            10: 
        !            11: #pragma once
        !            12: 
        !            13: #include "device.h"
        !            14: #include <array>
        !            15: 
        !            16: class NewsIODevice : public IOContainerDevice
        !            17: {
        !            18:        using inherited = IOContainerDevice;
        !            19:  public:
        !            20:        NewsIODevice();
        !            21:        ~NewsIODevice() override;
        !            22: 
        !            23:        bool Init() override;
        !            24: 
        !            25:        uint64 Read8(uint32 addr) override;
        !            26:        uint64 Read16(uint32 addr) override;
        !            27:        uint64 Read32(uint32 addr) override;
        !            28:        uint64 Write8(uint32 addr, uint32 data) override;
        !            29:        uint64 Write16(uint32 addr, uint32 data) override;
        !            30:        uint64 Write32(uint32 addr, uint32 data) override;
        !            31:        uint64 Peek8(uint32 addr) override;
        !            32: 
        !            33:  protected:
        !            34:        IODevice *GetDevice(uint32 addr) const override;
        !            35: 
        !            36:  private:
        !            37:        inline IODevice *SearchDevice(uint32 addr) const;
        !            38: 
        !            39:        std::unique_ptr<IODevice> pKBC {};
        !            40:        std::unique_ptr<IODevice> pLance {};
        !            41:        std::unique_ptr<IODevice> pNopIO {};
        !            42:        std::unique_ptr<IODevice> pRTC {};
        !            43:        std::unique_ptr<IODevice> pSCC {};
        !            44:        std::unique_ptr<IODevice> pSubRAM {};
        !            45: 
        !            46:        // デバイステーブル
        !            47:        std::array<IODevice *, 64> table {};
        !            48: };
        !            49: 
        !            50: static inline NewsIODevice *GetNewsIODevice() {
        !            51:        return Object::GetObject<NewsIODevice>(OBJ_NEWSIO);
        !            52: }

unix.superglobalmegacorp.com

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