Annotation of nono/vm/fuserom.h, revision 1.1.1.9

1.1       root        1: //
                      2: // nono
1.1.1.2   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: // FuseROM
                      9: //
                     10: 
1.1       root       11: #pragma once
                     12: 
1.1.1.2   root       13: #include "device.h"
1.1.1.9 ! root       14: #include <array>
1.1       root       15: 
1.1.1.2   root       16: class FuseROMDevice : public IODevice
1.1       root       17: {
1.1.1.2   root       18:        using inherited = IODevice;
                     19: 
                     20:        // この ROM が保持できるデータ量 (バイト数換算)
                     21:        static const uint32 SRCBYTES = 128;
1.1       root       22:  public:
                     23:        FuseROMDevice();
1.1.1.8   root       24:        ~FuseROMDevice() override;
1.1.1.2   root       25: 
                     26:        bool Init() override;
1.1       root       27: 
1.1.1.2   root       28:  protected:
                     29:        // BusIO インタフェース
                     30:        static const uint32 NPORT = SRCBYTES * 2;       // XXX 未調査
1.1.1.9 ! root       31:        busdata ReadPort(uint32 offset);
        !            32:        busdata WritePort(uint32 offset, uint32 data);
        !            33:        busdata PeekPort(uint32 offset);
        !            34:        bool PokePort(uint32 offset, uint32 data);
1.1       root       35: 
                     36:  private:
1.1.1.9 ! root       37:        uint8 GetByte(uint32 offset) const;
        !            38: 
1.1.1.2   root       39:        // バイトデータで保持しておく
1.1.1.9 ! root       40:        std::array<uint8, SRCBYTES> src {};
1.1       root       41: };
1.1.1.5   root       42: 
1.1.1.7   root       43: static inline FuseROMDevice *GetFuseROMDevice() {
                     44:        return Object::GetObject<FuseROMDevice>(OBJ_FUSEROM);
                     45: }

unix.superglobalmegacorp.com

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