|
|
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.11 root 40: void ProcessChar(char asciicode) override;
1.1.1.12! root 41: uint32 LoadFile(const std::string& fname) override;
1.1.1.5 root 42: void Command() override;
1.1.1.7 root 43:
44: void CommandH(const std::vector<std::string>& arg);
1.1.1.5 root 45: void CommandB(const std::vector<std::string>& arg);
46: void CommandNvram(const std::vector<std::string>& arg);
1.1.1.7 root 47: void CommandNvramShowAll();
48: void CommandNvramShow(const std::vector<std::string>& arg);
49: void CommandNvramUpdate(const std::vector<std::string>& arg);
50: void CommandNvramUpdate2(char);
51: void CommandNvramNew2(char);
52: void CommandNvramDelete(const std::vector<std::string>& arg);
53: void CommandNvramInit();
54: void CommandNvramInit2(char);
1.1.1.5 root 55:
56: // NVRAM
1.1.1.7 root 57: uint32 FindNVRAM(const std::string& key) const;
1.1.1.12! root 58: bool InitNVRAM() override;
! 59: void GetNVRAM(bootinfo_t&) override;
1.1.1.7 root 60:
61: // nvram コマンドの遷移で覚えておくもの
62: int nvram_offset {};
63: std::string nvram_key {};
64: std::string nvram_val {};
65:
66: // プロンプトの状態。
67: // 0 (PROMPT_DEFAULT) が通常の行入力プロンプト。
68: // PROMPT_NVRAM_* は nvram コマンドでの確認プロンプト。
69: int prompt_idx {};
1.1 root 70: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.