|
|
1.1 root 1: //
2: // nono
1.1.1.2 root 3: // Copyright (C) 2020 nono project
4: // Licensed under nono-license.txt
1.1 root 5: //
6:
1.1.1.8 root 7: //
8: // VM (X68030)
9: //
10:
1.1 root 11: #include "vm_x68k.h"
1.1.1.2 root 12: #include "config.h"
1.1 root 13: #include "human68k.h"
1.1.1.7 root 14: #include "mainapp.h"
1.1.1.12 root 15: #include "mainbus_x68k.h"
1.1.1.2 root 16: #include "mpu680x0.h"
1.1.1.8 root 17: #include "nmi.h"
18: #include "power.h"
1.1 root 19: #include "renderer.h"
1.1.1.16 root 20: #include "sound.h"
1.1 root 21: #include "x68kkbd.h"
22:
23: // コンストラクタ
24: VM_X68030::VM_X68030()
1.1.1.12 root 25: : inherited("X68030")
1.1 root 26: {
1.1.1.2 root 27: // 機種固有パラメータ
1.1.1.15 root 28:
29: // 実時間同期がちゃんと動作するにはゲスト OS の設定を要するため、
30: // デフォルトは仮想時間同期にしておくほうがトラブルが少なそう。
31: gConfig->SetDefault("clock-sync", "virtual");
1.1.1.14 root 32: // MPU 種別。
33: gConfig->SetDefault("mpu-type", "68030");
1.1.1.2 root 34: // MPU クロックの初期値は機種ごとに異なる。単位は MHz
35: gConfig->SetDefault("mpu-clock", 25);
36: // RAM 初期値は MAX にしておく
37: gConfig->SetDefault("ram-size", 12);
38:
1.1.1.12 root 39: // デバイス
40: NEWDV(Power, new X68030PowerDevice());
1.1.1.14 root 41: NEWDV(MPU, NewMPU680x0Device());
1.1.1.16 root 42: NEWDV(Sound, new SoundRenderer());
1.1.1.12 root 43: NEWDV(Mainbus, new X68kMainbus());
1.1.1.8 root 44: NEWDV(Keyboard, new X68030Keyboard());
1.1.1.12 root 45: NEWDV(NMI, new NMIDevice());
1.1.1.16 root 46: NEWDV(Renderer, new X68030VideoRenderer());
1.1 root 47:
1.1.1.7 root 48: if (gMainApp.human_mode) {
1.1.1.12 root 49: NEWDV(Human68k, new Human68kDevice());
1.1.1.7 root 50: }
1.1.1.13 root 51:
52: // バーストアクセスなし (回路図より)
1.1.1.14 root 53: auto mpu680x0 = GetMPU680x0Device(pMPU.get());
54: if (mpu680x0) {
55: mpu680x0->EnableBurstAccess(false);
56: }
1.1 root 57: }
58:
59: // デストラクタ
60: VM_X68030::~VM_X68030()
61: {
62: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.