File:  [Isaki's NoNo m68k/m88k emulator] / nono / vm / vm.h
Revision 1.1.1.15 (vendor branch): download - view: text, annotated - select for diffs
Wed Apr 29 17:05:49 2026 UTC (3 months ago) by root
Branches: MAIN, Isaki
CVS tags: v027, v026, v025, HEAD
nono 1.5.0

//
// nono
// Copyright (C) 2020 nono project
// Licensed under nono-license.txt
//

//
// VM (基本クラス)
//

#pragma once

#include "device.h"

class VM
{
 protected:
	explicit VM(const char *vmname_);
 public:
	enum CreationPhase : bool {
		First = false,
		Second = true,
	};

 public:
	virtual ~VM();

	// 明示的な後始末
	void Dispose();

	// 動的なコンストラクション
	bool Create(CreationPhase);

	// 初期化
	bool Init();

	// スレッド開始
	bool StartThread();

	// VM 名取得 (ウィンドウタイトル用)
	const char *GetVMName() const { return vmname; }

 protected:
	std::unique_ptr<Device> pDebugger {};
	std::unique_ptr<Object> pEventManager {};
	std::unique_ptr<Device> pKeyboard {};
	std::unique_ptr<Device> pMainbus {};
	std::unique_ptr<Device> pMPU {};
	std::unique_ptr<Device> pNMI {};
	std::unique_ptr<Device> pPower {};
	std::unique_ptr<Device> pRenderer {};
	std::unique_ptr<Device> pScheduler {};
	std::unique_ptr<Device> pSignalThread {};
	std::unique_ptr<Device> pSyncer {};

 private:
	const char *vmname {};	// VM 機種名(表示名)
};

unix.superglobalmegacorp.com

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