|
|
1.1 root 1: //
2: // nono
3: // Copyright (C) 2024 nono project
4: // Licensed under nono-license.txt
5: //
6:
7: //
1.1.1.2 root 8: // VM (virt-m68k)
1.1 root 9: //
10:
11: #include "vm_virt68k.h"
12: #include "config.h"
1.1.1.3 root 13: #include "console.h"
1.1 root 14: #include "mainbus_virt68k.h"
15: #include "mpu680x0.h"
16: #include "power.h"
17: #include "renderer.h"
18:
19: // コンストラクタ
20: VM_Virt68k::VM_Virt68k()
1.1.1.2 root 21: : inherited("virt-m68k")
1.1 root 22: {
23: // 機種固有パラメータ
1.1.1.4 root 24: // 実時間に同期したほうが便利。
25: gConfig->SetDefault("clock-sync", "real");
1.1.1.5 ! root 26: gConfig->SetDefault("hostcom0-driver", "console");
1.1.1.3 root 27: gConfig->SetDefault("mpu-type", "68030");
1.1 root 28: gConfig->SetDefault("mpu-clock", 25);
29: // RAM 初期値。適当。
30: gConfig->SetDefault("ram-size", 128);
31:
32: // デバイス
33: NEWDV(Power, new PowerDevice());
1.1.1.3 root 34: NEWDV(MPU, NewMPU680x0Device());
1.1 root 35: NEWDV(Mainbus, new Virt68kMainbus());
1.1.1.3 root 36: NEWDV(Console, new ConsoleDevice());
37: NEWDV(Keyboard, new ConsoleKeyboard());
38: NEWDV(Renderer, new ConsoleRenderer());
1.1.1.2 root 39:
40: // バーストアクセス有効にする
1.1.1.3 root 41: auto mpu680x0 = GetMPU680x0Device(pMPU.get());
42: if (mpu680x0) {
43: mpu680x0->EnableBurstAccess(true);
44: }
1.1 root 45: }
46:
47: // デストラクタ
48: VM_Virt68k::~VM_Virt68k()
49: {
50: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.