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

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

//
// VM (virt-m68k)
//

#include "vm_virt68k.h"
#include "config.h"
#include "console.h"
#include "mainbus_virt68k.h"
#include "mpu680x0.h"
#include "power.h"
#include "renderer.h"

// コンストラクタ
VM_Virt68k::VM_Virt68k()
	: inherited("virt-m68k")
{
	// 機種固有パラメータ
	// 実時間に同期したほうが便利。
	gConfig->SetDefault("clock-sync", "real");
	gConfig->SetDefault("hostcom0-driver", "console");
	gConfig->SetDefault("mpu-type", "68030");
	gConfig->SetDefault("mpu-clock", 25);
	// RAM 初期値。適当。
	gConfig->SetDefault("ram-size", 128);

	// デバイス
	NEWDV(Power, new PowerDevice());
	NEWDV(MPU, NewMPU680x0Device());
	NEWDV(Mainbus, new Virt68kMainbus());
	NEWDV(Console, new ConsoleDevice());
	NEWDV(Keyboard, new ConsoleKeyboard());
	NEWDV(Renderer, new ConsoleRenderer());

	// バーストアクセス有効にする
	auto mpu680x0 = GetMPU680x0Device(pMPU.get());
	if (mpu680x0) {
		mpu680x0->EnableBurstAccess(true);
	}
}

// デストラクタ
VM_Virt68k::~VM_Virt68k()
{
}

unix.superglobalmegacorp.com

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