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

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"
1.1.1.4   root       14: #include "textscreen.h"
1.1       root       15: #include <array>
                     16: 
1.1.1.2   root       17: class NewsCtlrDevice;
                     18: 
                     19: class NewsIODevice : public IODevice
1.1       root       20: {
1.1.1.2   root       21:        using inherited = IODevice;
1.1       root       22:  public:
                     23:        NewsIODevice();
                     24:        ~NewsIODevice() override;
                     25: 
                     26:        bool Init() override;
                     27: 
1.1.1.3   root       28:        busdata Read(busaddr addr) override;
                     29:        busdata Write(busaddr addr, uint32 data) override;
                     30:        busdata Peek1(uint32 addr) override;
                     31:        bool Poke1(uint32 addr, uint32 data) override;
1.1       root       32: 
                     33:  private:
                     34:        inline IODevice *SearchDevice(uint32 addr) const;
                     35: 
1.1.1.2   root       36:        void InitMonitor();
1.1.1.5 ! root       37:        DECLARE_MONITOR_SCREEN(MonitorScreen);
1.1.1.2   root       38: 
1.1       root       39:        std::unique_ptr<IODevice> pKBC {};
                     40:        std::unique_ptr<IODevice> pLance {};
                     41:        std::unique_ptr<IODevice> pRTC {};
                     42:        std::unique_ptr<IODevice> pSCC {};
                     43:        std::unique_ptr<IODevice> pSubRAM {};
                     44: 
                     45:        // デバイステーブル
                     46:        std::array<IODevice *, 64> table {};
1.1.1.2   root       47: 
                     48:        NewsCtlrDevice *newsctlr {};
                     49: 
1.1.1.4   root       50:        Monitor *monitor {};
1.1.1.2   root       51: 
                     52:        // 裏バッファ
                     53:        TextScreen src_screen {};
1.1       root       54: };
                     55: 
1.1.1.5 ! root       56: inline NewsIODevice *GetNewsIODevice() {
1.1       root       57:        return Object::GetObject<NewsIODevice>(OBJ_NEWSIO);
                     58: }

unix.superglobalmegacorp.com

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