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

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.10  root        7: //
1.1.1.11! root        8: // LUNA-88K の ROM エミュレーション
1.1.1.10  root        9: //
                     10: 
1.1       root       11: #pragma once
                     12: 
1.1.1.5   root       13: #include "romemu_luna.h"
1.1       root       14: 
1.1.1.11! root       15: class InterruptDevice;
        !            16: class MPU88xx0Device;
1.1.1.8   root       17: 
1.1.1.5   root       18: class Luna88kPROMEmuDevice : public LunaPROMEmuDevice
1.1       root       19: {
1.1.1.5   root       20:        using inherited = LunaPROMEmuDevice;
1.1       root       21: 
1.1.1.7   root       22:        // プロンプト種別
                     23:        enum {
                     24:                PROMPT_DEFAULT = 0,
                     25:                PROMPT_NVRAM_UPDATE,
                     26:                PROMPT_NVRAM_NEW,
                     27:                PROMPT_NVRAM_INIT,
                     28:        };
                     29: 
1.1       root       30:  public:
                     31:        Luna88kPROMEmuDevice();
1.1.1.4   root       32:        virtual ~Luna88kPROMEmuDevice() override;
1.1       root       33: 
1.1.1.2   root       34:        bool Init() override;
1.1       root       35: 
1.1.1.8   root       36:        // DOS call エミュレーション
1.1.1.11! root       37:        bool FLineCallback(MPU88xx0Device *cpu);
1.1.1.8   root       38: 
1.1       root       39:  private:
1.1.1.5   root       40:        uint32 ROM_Init() override;
                     41:        uint32 ROM_Entry() override;
1.1.1.11! root       42:        void ProcessChar(char asciicode) override;
1.1.1.5   root       43:        void Command() override;
1.1.1.7   root       44: 
                     45:        void CommandH(const std::vector<std::string>& arg);
1.1.1.5   root       46:        void CommandB(const std::vector<std::string>& arg);
                     47:        void CommandBH();
                     48:        void CommandNvram(const std::vector<std::string>& arg);
1.1.1.7   root       49:        void CommandNvramShowAll();
                     50:        void CommandNvramShow(const std::vector<std::string>& arg);
                     51:        void CommandNvramUpdate(const std::vector<std::string>& arg);
                     52:        void CommandNvramUpdate2(char);
                     53:        void CommandNvramNew2(char);
                     54:        void CommandNvramDelete(const std::vector<std::string>& arg);
                     55:        void CommandNvramInit();
                     56:        void CommandNvramInit2(char);
1.1.1.5   root       57: 
                     58:        // NVRAM
1.1.1.7   root       59:        uint32 FindNVRAM(const std::string& key) const;
1.1.1.5   root       60:        bool InitNVRAM();
                     61:        void GetNVRAM(bootinfo_t&);
1.1.1.2   root       62: 
1.1.1.5   root       63:        uint32 b_entrypoint {};
1.1.1.7   root       64: 
                     65:        // nvram コマンドの遷移で覚えておくもの
                     66:        int nvram_offset {};
                     67:        std::string nvram_key {};
                     68:        std::string nvram_val {};
                     69: 
                     70:        // プロンプトの状態。
                     71:        // 0 (PROMPT_DEFAULT) が通常の行入力プロンプト。
                     72:        // PROMPT_NVRAM_* は nvram コマンドでの確認プロンプト。
                     73:        int prompt_idx {};
1.1.1.11! root       74: 
        !            75:        InterruptDevice *interrupt {};
1.1       root       76: };

unix.superglobalmegacorp.com

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