|
|
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 MPU88xx0Device;
1.1.1.8 root 16:
1.1.1.5 root 17: class Luna88kPROMEmuDevice : public LunaPROMEmuDevice
1.1 root 18: {
1.1.1.5 root 19: using inherited = LunaPROMEmuDevice;
1.1 root 20:
1.1.1.7 root 21: // プロンプト種別
22: enum {
23: PROMPT_DEFAULT = 0,
24: PROMPT_NVRAM_UPDATE,
25: PROMPT_NVRAM_NEW,
26: PROMPT_NVRAM_INIT,
27: };
28:
1.1 root 29: public:
30: Luna88kPROMEmuDevice();
1.1.1.12 root 31: ~Luna88kPROMEmuDevice() override;
1.1 root 32:
1.1.1.2 root 33: bool Init() override;
1.1 root 34:
1.1.1.8 root 35: // DOS call エミュレーション
1.1.1.11 root 36: bool FLineCallback(MPU88xx0Device *cpu);
1.1.1.8 root 37:
1.1 root 38: private:
1.1.1.12 root 39: void ROM_InitMD() override;
1.1.1.13! root 40: void ROM_Close() override;
1.1.1.11 root 41: void ProcessChar(char asciicode) override;
1.1.1.12 root 42: uint32 LoadFile(const std::string& fname) 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 CommandNvram(const std::vector<std::string>& arg);
1.1.1.7 root 48: void CommandNvramShowAll();
49: void CommandNvramShow(const std::vector<std::string>& arg);
50: void CommandNvramUpdate(const std::vector<std::string>& arg);
51: void CommandNvramUpdate2(char);
52: void CommandNvramNew2(char);
53: void CommandNvramDelete(const std::vector<std::string>& arg);
54: void CommandNvramInit();
55: void CommandNvramInit2(char);
1.1.1.5 root 56:
57: // NVRAM
1.1.1.7 root 58: uint32 FindNVRAM(const std::string& key) const;
1.1.1.12 root 59: bool InitNVRAM() override;
60: void GetNVRAM(bootinfo_t&) override;
1.1.1.7 root 61:
62: // nvram コマンドの遷移で覚えておくもの
63: int nvram_offset {};
64: std::string nvram_key {};
65: std::string nvram_val {};
66:
67: // プロンプトの状態。
68: // 0 (PROMPT_DEFAULT) が通常の行入力プロンプト。
69: // PROMPT_NVRAM_* は nvram コマンドでの確認プロンプト。
70: int prompt_idx {};
1.1 root 71: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.