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

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2017 [email protected]
                      4: //
                      5: 
                      6: #pragma once
                      7: 
                      8: #include "device.h"
                      9: #include <atomic>
                     10: 
                     11: class TVRAMDevice
                     12:        : public IODevice
                     13: {
                     14:        typedef IODevice inherited;
                     15:  private:
                     16:        static const int baseaddr = 0xe00000;
                     17: 
                     18:        struct tvram {
                     19:                bool sa;                                // 同時アクセス
                     20:                bool ap[4];                             // 同時アクセスプレーン
                     21:        };
                     22: 
                     23:  public:
                     24:        TVRAMDevice();
                     25:        virtual ~TVRAMDevice();
                     26: 
                     27:        virtual void ResetHard();
                     28: 
                     29:        virtual uint64 Read8(uint32 addr);
                     30:        virtual uint64 Read16(uint32 addr);
                     31:        virtual uint64 Write8(uint32 addr, uint32 data);
                     32:        virtual uint64 Write16(uint32 addr, uint32 data);
                     33:        virtual uint64 Peek8(uint32 addr);
                     34: 
                     35:        void set_crtc_21(uint16 data);
                     36: 
                     37:        bool Render(uint8 *);
                     38: 
                     39:  private:
1.1.1.2 ! root       40:        // アドレスデコーダ
        !            41:        uint64 Decoder(uint32 addr) const;
        !            42: 
1.1       root       43:        void Invalidate();
                     44: 
1.1.1.2 ! root       45:        std::unique_ptr<uint8[]> mem {};
1.1       root       46:        // XXX 実際には縦がこれ以上になる可能性はある
                     47:        std::atomic<uint8> atomic_dirty[1024] {};
                     48:        struct tvram tvram {};
                     49: };
                     50: 
1.1.1.2 ! root       51: extern std::unique_ptr<TVRAMDevice> gTVRAM;

unix.superglobalmegacorp.com

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