--- nono/vm/vm_x68k.cpp 2026/04/29 17:04:53 1.1.1.6 +++ nono/vm/vm_x68k.cpp 2026/04/29 17:04:59 1.1.1.7 @@ -11,6 +11,7 @@ #include "fdc.h" #include "human68k.h" #include "interrupt.h" +#include "mainapp.h" #include "mfp.h" #include "mpu680x0.h" #include "pedec.h" @@ -58,6 +59,10 @@ VM_X68030::VM_X68030() gKeyboard.reset(new X68030Keyboard()); gRenderer.reset(new X68030Renderer()); + if (gMainApp.human_mode) { + human68k.reset(new Human68k()); + } + // 割り当て // 今は拡張メモリがないので、今は上位8ビット全領域がミラーになっている。 for (int i = 0; i < countof(::devtable); i++) { @@ -91,6 +96,12 @@ VM_X68030::PowerButton() void VM_X68030::SwitchBootPage(Device *parent, bool isrom) { + if (gMainApp.human_mode) { + // Human モードではブートページを RAM に見せる。 + // 今のところ。 + return; + } + // 共通処理 inherited::SwitchBootPage(parent, isrom); @@ -146,66 +157,3 @@ VM_X68030::ResetByMPU() gPPI->ResetHard(); gSPC->ResetHard(); } - -// -// RXZ .r .x .z human68k console emulator -// - -// コンストラクタ -VM_RXZ::VM_RXZ() -{ - // 機種固有パラメータ - // MPU クロックの初期値は機種ごとに異なる。単位は MHz - gConfig->SetDefault("mpu-clock", 25); - // RAM 初期値は MAX にしておく - gConfig->SetDefault("ram-size", 12); - // SPC の入力クロック (5MHz = 200ns) - gConfig->Add("!spc-tCLF", 200); - - // この機種に不要なパラメータはここで削除する - // (機種が決まるより前に全機種の設定の和集合を用意してあるため) - gConfig->Delete("luna-dipsw1"); - gConfig->Delete("luna-dipsw2"); - gConfig->Delete("prom-image"); - - // デバイス (順序に注意) - // BusErrDevice は親コンストラクタで作成済み。 - - gMPU.reset(new MPU680x0Device()); // required by Scheduler - gScheduler.reset(new Scheduler()); // required by * - gInterrupt.reset(new X68030Interrupt()); - gRAM.reset(new RAMDevice()); // required by Human68k - gRTC.reset(new RP5C15Device()); - human68k.reset(new Human68k()); - - // 割り当て - // 全域 RAM に見せる。正しくはない。 - for (int i = 0; i < countof(::devtable); i++) { - ::devtable[i] = gRAM.get(); - } -} - -// デストラクタ -VM_RXZ::~VM_RXZ() -{ -} - -void -VM_RXZ::PowerButton() -{ - // RXZ の電源ボタンは電源オンにしか使わない。 - // - // 電源 ボタン - // ON PUSH (何も起きない) - // OFF PUSH 電源オン - - // スケジューラに指示 - gScheduler->RequestPowerOn(); -} - -// ブートページを切り替える。 -void -VM_RXZ::SwitchBootPage(Device *parent, bool isrom) -{ - // 何もしない -}