|
|
1.1 root 1: //
2: // nono
3: // Copyright (C) 2022 nono project
4: // Licensed under nono-license.txt
5: //
6:
7: //
8: // VM (NEWS)
9: //
10:
11: #include "vm_news.h"
12: #include "config.h"
1.1.1.4 ! root 13: #include "console.h"
1.1 root 14: #include "dipsw.h"
1.1.1.2 root 15: #include "mainbus_news.h"
1.1 root 16: #include "mpu680x0.h"
17: #include "newsfb.h"
1.1.1.2 root 18: #include "power.h"
1.1 root 19: #include "renderer.h"
20:
21: // コンストラクタ
22: VM_NEWS::VM_NEWS()
1.1.1.2 root 23: : inherited("NWS-1750")
1.1 root 24: {
25: // 機種固有パラメータ
1.1.1.4 ! root 26: // 仮想コンソール。
! 27: gConfig->SetDefault("hostcom-driver", "cons");
! 28: // MPU 種別。
! 29: gConfig->SetDefault("mpu-type", "68030");
1.1 root 30: // MPU クロックの初期値は機種ごとに異なる。単位は MHz
31: gConfig->SetDefault("mpu-clock", 25);
32: // RAM 初期値は?
33: gConfig->SetDefault("ram-size", 16);
34: // RTC epoch は 1900年。
35: gConfig->SetDefault("rtc-epoch-year", 1900);
36:
1.1.1.2 root 37: NEWDV(Power, new PowerDevice());
1.1.1.4 ! root 38: NEWDV(MPU, NewMPU680x0Device());
1.1.1.2 root 39: NEWDV(Mainbus, new NewsMainbus());
1.1.1.4 ! root 40: NEWDV(Console, new ConsoleDevice());
! 41: NEWDV(Keyboard, new ConsoleKeyboard());
! 42: NEWDV(Renderer, new ConsoleRenderer());
1.1 root 43: NEWDV(Newsfb, new NewsfbDevice());
44: NEWDV(Dipsw, new NewsDipswDevice());
1.1.1.3 root 45:
46: // バーストアクセスがあるかどうかは分からないが
47: // Mainbus が LUNA-I と共通なので一応揃えておく。
1.1.1.4 ! root 48: auto mpu680x0 = GetMPU680x0Device(pMPU.get());
! 49: if (mpu680x0) {
! 50: mpu680x0->EnableBurstAccess(true);
! 51: }
1.1 root 52: }
53:
54: // デストラクタ
55: VM_NEWS::~VM_NEWS()
56: {
57: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.