Annotation of nono/vm/romemu_news.h, revision 1.1

1.1     ! root        1: //
        !             2: // nono
        !             3: // Copyright (C) 2022 nono project
        !             4: // Licensed under nono-license.txt
        !             5: //
        !             6: 
        !             7: //
        !             8: // NEWS の ROM エミュレーション (-X のみ対応)
        !             9: //
        !            10: 
        !            11: #pragma once
        !            12: 
        !            13: #include "rom.h"
        !            14: 
        !            15: class MainRAMDevice;
        !            16: 
        !            17: class NewsROMEmuDevice : public ROMDevice
        !            18: {
        !            19:        using inherited = ROMDevice;
        !            20: 
        !            21:  protected:
        !            22:        // このデバイス先頭アドレス
        !            23:        static const uint32 baseaddr            = 0xf8000000;
        !            24: 
        !            25:        // 謎の I/O 空間
        !            26:        static const uint32 ROMIO_BASE          = 0xf8010000;
        !            27:        static const uint32 ROMIO_INIT          = (ROMIO_BASE + 0);
        !            28:        static const uint32 ROMIO_SYS           = (ROMIO_BASE + 4);
        !            29: 
        !            30:        // NEWS の ROM サービスコール?
        !            31:        static const uint32 SYS_reboot  = 0;
        !            32:        static const uint32 SYS_exit    = 1;
        !            33:        static const uint32 SYS_read    = 3;
        !            34:        static const uint32 SYS_write   = 4;
        !            35: 
        !            36:  public:
        !            37:        NewsROMEmuDevice();
        !            38:        virtual ~NewsROMEmuDevice() override; 
        !            39: 
        !            40:        bool Init() override;
        !            41:        void ResetHard(bool poweron) override;
        !            42: 
        !            43:        uint64 Read32(uint32 addr) override;
        !            44: 
        !            45:  private:
        !            46:        uint32 ROM_Init();
        !            47:        uint32 ROM_Sys();
        !            48: 
        !            49:        MainRAMDevice *mainram {};
        !            50: };

unix.superglobalmegacorp.com

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