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

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2020 nono project
                      4: // Licensed under nono-license.txt
                      5: //
                      6: 
                      7: //
                      8: // 何もしないデバイス
                      9: //
                     10: 
                     11: #pragma once
                     12: 
                     13: #include "device.h"
                     14: 
                     15: // 何もしないデバイス。
                     16: // 読み込むと全域で 0xff が読めて、書き込んでも何も起きない。
                     17: class NopIODevice : public IODevice
                     18: {
                     19:        using inherited = IODevice;
                     20:  public:
                     21:        NopIODevice();
                     22:        ~NopIODevice() override;
                     23: 
                     24:        busdata Read(busaddr addr) override;
                     25:        busdata Write(busaddr addr, uint32 data) override;
                     26:        busdata Read1(uint32 addr) override;
                     27:        busdata Write1(uint32 addr, uint32 data) override;
                     28:        busdata Peek1(uint32 addr) override;
                     29: };
                     30: 
1.1.1.2 ! root       31: inline NopIODevice *GetNopIODevice() {
1.1       root       32:        return Object::GetObject<NopIODevice>(OBJ_NOPIO);
                     33: }

unix.superglobalmegacorp.com

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