--- nono/vm/vm_news.cpp 2026/04/29 17:05:28 1.1.1.3 +++ nono/vm/vm_news.cpp 2026/04/29 17:05:33 1.1.1.4 @@ -10,6 +10,7 @@ #include "vm_news.h" #include "config.h" +#include "console.h" #include "dipsw.h" #include "mainbus_news.h" #include "mpu680x0.h" @@ -22,6 +23,10 @@ VM_NEWS::VM_NEWS() : inherited("NWS-1750") { // 機種固有パラメータ + // 仮想コンソール。 + gConfig->SetDefault("hostcom-driver", "cons"); + // MPU 種別。 + gConfig->SetDefault("mpu-type", "68030"); // MPU クロックの初期値は機種ごとに異なる。単位は MHz gConfig->SetDefault("mpu-clock", 25); // RAM 初期値は? @@ -30,15 +35,20 @@ VM_NEWS::VM_NEWS() gConfig->SetDefault("rtc-epoch-year", 1900); NEWDV(Power, new PowerDevice()); - NEWDV(MPU, new MPU680x0Device()); + NEWDV(MPU, NewMPU680x0Device()); NEWDV(Mainbus, new NewsMainbus()); - NEWDV(Renderer, new NopRenderer()); + NEWDV(Console, new ConsoleDevice()); + NEWDV(Keyboard, new ConsoleKeyboard()); + NEWDV(Renderer, new ConsoleRenderer()); NEWDV(Newsfb, new NewsfbDevice()); NEWDV(Dipsw, new NewsDipswDevice()); // バーストアクセスがあるかどうかは分からないが // Mainbus が LUNA-I と共通なので一応揃えておく。 - dynamic_cast(pMPU.get())->EnableBurstAccess(true); + auto mpu680x0 = GetMPU680x0Device(pMPU.get()); + if (mpu680x0) { + mpu680x0->EnableBurstAccess(true); + } } // デストラクタ