|
|
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: //
! 8: // LUNA88K の ROM エミュレーション
! 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.8 root 15: class m88kcpu;
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.4 root 31: virtual ~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 エミュレーション
36: bool FLineCallback(m88kcpu *cpu);
37:
1.1 root 38: private:
1.1.1.5 root 39: uint32 ROM_Init() override;
40: uint32 ROM_Entry() override;
1.1.1.7 root 41: void GetChar(char asciicode) 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 CommandBH();
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.5 root 59: bool InitNVRAM();
60: void GetNVRAM(bootinfo_t&);
1.1.1.2 root 61:
1.1.1.5 root 62: uint32 b_entrypoint {};
1.1.1.7 root 63:
64: // nvram コマンドの遷移で覚えておくもの
65: int nvram_offset {};
66: std::string nvram_key {};
67: std::string nvram_val {};
68:
69: // プロンプトの状態。
70: // 0 (PROMPT_DEFAULT) が通常の行入力プロンプト。
71: // PROMPT_NVRAM_* は nvram コマンドでの確認プロンプト。
72: int prompt_idx {};
1.1 root 73: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.