|
|
1.1 root 1: //
2: // nono
1.1.1.3 root 3: // Copyright (C) 2020 nono project
4: // Licensed under nono-license.txt
1.1 root 5: //
6:
1.1.1.9 root 7: //
8: // VM (基本クラス)
9: //
10:
1.1 root 11: #pragma once
12:
13: #include "device.h"
1.1.1.2 root 14:
1.1 root 15: class VM
16: {
1.1.1.12 root 17: protected:
1.1.1.13 root 18: explicit VM(const char *vmname_);
1.1 root 19: public:
1.1.1.14 root 20: enum CreationPhase : bool {
21: First = false,
22: Second = true,
23: };
24:
25: public:
1.1 root 26: virtual ~VM();
27:
1.1.1.3 root 28: // 明示的な後始末
29: void Dispose();
30:
1.1 root 31: // 動的なコンストラクション
1.1.1.14 root 32: bool Create(CreationPhase);
1.1 root 33:
34: // 初期化
1.1.1.12 root 35: bool Init();
1.1 root 36:
1.1.1.9 root 37: // スレッド開始
38: bool StartThread();
39:
1.1.1.12 root 40: // VM 名取得 (ウィンドウタイトル用)
41: const char *GetVMName() const { return vmname; }
1.1.1.8 root 42:
43: protected:
1.1.1.12 root 44: std::unique_ptr<Device> pDebugger {};
1.1.1.15! root 45: std::unique_ptr<Object> pEventManager {};
1.1.1.12 root 46: std::unique_ptr<Device> pKeyboard {};
47: std::unique_ptr<Device> pMainbus {};
48: std::unique_ptr<Device> pMPU {};
49: std::unique_ptr<Device> pNMI {};
50: std::unique_ptr<Device> pPower {};
51: std::unique_ptr<Device> pRenderer {};
52: std::unique_ptr<Device> pScheduler {};
53: std::unique_ptr<Device> pSignalThread {};
54: std::unique_ptr<Device> pSyncer {};
1.1.1.9 root 55:
1.1.1.12 root 56: private:
57: const char *vmname {}; // VM 機種名(表示名)
1.1 root 58: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.