--- nono/vm/pluto.cpp 2026/04/29 17:04:42 1.1.1.4 +++ nono/vm/pluto.cpp 2026/04/29 17:05:10 1.1.1.8 @@ -4,26 +4,35 @@ // Licensed under nono-license.txt // +// +// Pluto-X (独自の仮想ボード) +// + #include "pluto.h" -#include "aout.h" #include "mainapp.h" #include "mpu680x0.h" #include "ram.h" +// グローバル参照用 +PlutoDevice *gPluto; + +// コンストラクタ PlutoDevice::PlutoDevice() + : inherited("Pluto") { - logname = "pluto"; - devname = "Pluto"; devaddr = 0xeac000; devlen = 0x2000; } +// デストラクタ PlutoDevice::~PlutoDevice() { + gPluto = NULL; } +// リセット void -PlutoDevice::ResetHard() +PlutoDevice::ResetHard(bool poweron) { // XXX not yet m_count = 0; @@ -147,16 +156,16 @@ PlutoDevice::Peek8(uint32 addr) // ホストファイル起動 // -// -A オプションで指定されたホストファイルをロードする。 +// -X オプションで指定されたホストファイルをロードする。 // ロードできればエントリポイントを返す。 -// host_file が指定されている時に呼ぶこと。 +// exec_file が指定されている時に呼ぶこと。 uint32 PlutoDevice::ROM_Load() { - assert(gMainApp.host_file); + assert(gMainApp.exec_file); // ホストファイルをロード - uint32 entry = gRAM->LoadFile(gMainApp.host_file, AOUT_MID_M68K); + uint32 entry = gRAM->LoadFile(gMainApp.exec_file); if (entry) { // NetBSD/x68k のプライマリブートローダが /boot を読み込む時には @@ -293,6 +302,6 @@ PlutoDevice::write_8_benchmark(uint32 ad benchmark_start(data); break; default: - PANIC("not impl"); + VMPANIC("not impl"); } }