|
|
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: // SPC の入力クロック (5MHz = 200ns)
39: gConfig->Add("!spc-tCLF", 200);
40:
1.1.1.12 root 41: // デバイス
42: NEWDV(Power, new X68030PowerDevice());
1.1.1.14 root 43: NEWDV(MPU, NewMPU680x0Device());
1.1.1.16! root 44: NEWDV(Sound, new SoundRenderer());
1.1.1.12 root 45: NEWDV(Mainbus, new X68kMainbus());
1.1.1.8 root 46: NEWDV(Keyboard, new X68030Keyboard());
1.1.1.12 root 47: NEWDV(NMI, new NMIDevice());
1.1.1.16! root 48: NEWDV(Renderer, new X68030VideoRenderer());
1.1 root 49:
1.1.1.7 root 50: if (gMainApp.human_mode) {
1.1.1.12 root 51: NEWDV(Human68k, new Human68kDevice());
1.1.1.7 root 52: }
1.1.1.13 root 53:
54: // バーストアクセスなし (回路図より)
1.1.1.14 root 55: auto mpu680x0 = GetMPU680x0Device(pMPU.get());
56: if (mpu680x0) {
57: mpu680x0->EnableBurstAccess(false);
58: }
1.1 root 59: }
60:
61: // デストラクタ
62: VM_X68030::~VM_X68030()
63: {
64: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.