Annotation of nono/vm/zram.h, revision 1.1.1.6

1.1       root        1: //
                      2: // nono
1.1.1.3   root        3: // Copyright (C) 2020 nono project
                      4: // Licensed under nono-license.txt
1.1       root        5: //
                      6: 
1.1.1.6 ! root        7: //
        !             8: // 3ポート共有 RAM
        !             9: //
        !            10: 
1.1       root       11: #pragma once
                     12: 
                     13: #include "device.h"
                     14: 
1.1.1.5   root       15: class ZRAMDevice : public IODevice
1.1       root       16: {
1.1.1.3   root       17:        using inherited = IODevice;
1.1       root       18:  public:
                     19:        ZRAMDevice();
1.1.1.4   root       20:        virtual ~ZRAMDevice() override;
1.1       root       21: 
1.1.1.3   root       22:        uint64 Read8(uint32 addr) override;
                     23:        uint64 Read16(uint32 addr) override;
                     24:        uint64 Read32(uint32 addr) override;
                     25:        uint64 Write8(uint32 addr, uint32 data) override;
                     26:        uint64 Write16(uint32 addr, uint32 data) override;
                     27:        uint64 Write32(uint32 addr, uint32 data) override;
                     28:        uint64 Peek8(uint32 addr) override;
1.1       root       29: 
                     30:  private:
1.1.1.2   root       31:        // アドレスデコーダ
                     32:        uint64 Decoder(uint32 addr) const;
                     33: 
                     34:        std::unique_ptr<uint8[]> ram {};
1.1       root       35: };
                     36: 
1.1.1.6 ! root       37: extern ZRAMDevice *gZRAM;

unix.superglobalmegacorp.com

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