|
|
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.3 ! root 24: gConfig->SetDefault("hostcom-driver", "cons");
! 25: gConfig->SetDefault("mpu-type", "68030");
1.1 root 26: gConfig->SetDefault("mpu-clock", 25);
27: // RAM 初期値。適当。
28: gConfig->SetDefault("ram-size", 128);
29:
30: // デバイス
31: NEWDV(Power, new PowerDevice());
1.1.1.3 ! root 32: NEWDV(MPU, NewMPU680x0Device());
1.1 root 33: NEWDV(Mainbus, new Virt68kMainbus());
1.1.1.3 ! root 34: NEWDV(Console, new ConsoleDevice());
! 35: NEWDV(Keyboard, new ConsoleKeyboard());
! 36: NEWDV(Renderer, new ConsoleRenderer());
1.1.1.2 root 37:
38: // バーストアクセス有効にする
1.1.1.3 ! root 39: auto mpu680x0 = GetMPU680x0Device(pMPU.get());
! 40: if (mpu680x0) {
! 41: mpu680x0->EnableBurstAccess(true);
! 42: }
1.1 root 43: }
44:
45: // デストラクタ
46: VM_Virt68k::~VM_Virt68k()
47: {
48: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.