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

1.1     ! root        1: //
        !             2: // nono
        !             3: // Copyright (C) 2024 nono project
        !             4: // Licensed under nono-license.txt
        !             5: //
        !             6: 
        !             7: //
        !             8: // virt68k の I/O 空間担当
        !             9: //
        !            10: 
        !            11: #pragma once
        !            12: 
        !            13: #include "device.h"
        !            14: #include <array>
        !            15: 
        !            16: class V68kIODevice : public IODevice
        !            17: {
        !            18:        using inherited = IODevice;
        !            19:  public:
        !            20:        V68kIODevice();
        !            21:        ~V68kIODevice() override;
        !            22: 
        !            23:        bool Create() override;
        !            24:        bool Init() override;
        !            25: 
        !            26:        busdata Read8(uint32 addr) override;
        !            27:        busdata Read16(uint32 addr) override;
        !            28:        busdata Read32(uint32 addr) override;
        !            29:        busdata Write8(uint32 addr, uint32 data) override;
        !            30:        busdata Write16(uint32 addr, uint32 data) override;
        !            31:        busdata Write32(uint32 addr, uint32 data) override;
        !            32:        busdata Peek8(uint32 addr) override;
        !            33:        bool Poke8(uint32 addr, uint32 data) override;
        !            34: 
        !            35:  private:
        !            36:        inline IODevice *SearchDevice(uint32 addr) const;
        !            37: 
        !            38:        std::unique_ptr<IODevice> pGFPIC1 {};
        !            39:        std::unique_ptr<IODevice> pGFPIC2 {};
        !            40:        std::unique_ptr<IODevice> pGFPIC3 {};
        !            41:        std::unique_ptr<IODevice> pGFPIC4 {};
        !            42:        std::unique_ptr<IODevice> pGFPIC5 {};
        !            43:        std::unique_ptr<IODevice> pGFPIC6 {};
        !            44:        std::unique_ptr<IODevice> pGFTimer {};
        !            45:        std::unique_ptr<IODevice> pGFRTC {};
        !            46:        std::unique_ptr<IODevice> pGFTTY {};
        !            47:        std::unique_ptr<IODevice> pPROM {};
        !            48:        std::unique_ptr<IODevice> pQemuSysCtlr {};
        !            49:        std::unique_ptr<IODevice> pVirtIONone {};
        !            50:        std::array<std::unique_ptr<IODevice>, 128> pVirtIO {};
        !            51: 
        !            52:        IODevice *buserr {};
        !            53: 
        !            54:        // メインテーブル。
        !            55:        // $ff00'xxxx から $1000 ずつ、当面 $ff07'0000 (の手前) まで。
        !            56:        std::array<IODevice*, 7 * 16> table {};
        !            57: 
        !            58:        // VirtIO 用スロット。
        !            59:        std::array<IODevice*, 128> viotable {};
        !            60: };
        !            61: 
        !            62: static inline V68kIODevice *GetV68kIODevice() {
        !            63:        return Object::GetObject<V68kIODevice>(OBJ_V68KIO);
        !            64: }

unix.superglobalmegacorp.com

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