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

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: 
                      7: #pragma once
                      8: 
1.1.1.2 ! root        9: #include "device.h"
1.1       root       10: 
1.1.1.2 ! root       11: class Luna88kPROMEmuDevice : public IODevice
1.1       root       12: {
1.1.1.2 ! root       13:        using inherited = IODevice;
1.1       root       14: 
                     15:        // このデバイス先頭アドレス
                     16:        static const uint32 baseaddr            = 0x41000000;
                     17: 
                     18:        // 謎の I/O 空間
                     19:        static const uint32 ROMIO_BASE          = 0x41010000;
                     20:        static const uint32 ROMIO_IPL           = (ROMIO_BASE + 0);
                     21: 
                     22:  public:
                     23:        Luna88kPROMEmuDevice();
1.1.1.2 ! root       24:        ~Luna88kPROMEmuDevice() override;
1.1       root       25: 
1.1.1.2 ! root       26:        bool Init() override;
        !            27:        void ResetHard() override;
1.1       root       28: 
1.1.1.2 ! root       29:        uint64 Read8(uint32 addr) override;
        !            30:        uint64 Read16(uint32 addr) override;
        !            31:        uint64 Read32(uint32 addr) override;
        !            32:        uint64 Write8(uint32 addr, uint32 data) override;
        !            33:        uint64 Write16(uint32 addr, uint32 data) override;
        !            34:        uint64 Write32(uint32 addr, uint32 data) override;
        !            35:        uint64 Peek8(uint32 addr) override;
1.1       root       36: 
                     37:  private:
                     38:        uint64 Decoder(uint32 addr) const;
                     39: 
                     40:        // 起動時の処理を行う
                     41:        uint32 IPL();
                     42: 
1.1.1.2 ! root       43:        // 自前 ROM 部分
        !            44:        std::unique_ptr<uint8[]> romdata {};
        !            45:        uint32 romdatalen {};
        !            46: 
1.1       root       47:        // リセット後 IPL を完了したら true
                     48:        bool ipl_done = false;
                     49: };

unix.superglobalmegacorp.com

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