--- nono/vm/mpu88xx0.cpp 2026/04/29 17:05:29 1.1.1.15 +++ nono/vm/mpu88xx0.cpp 2026/04/29 17:05:43 1.1.1.18 @@ -13,7 +13,6 @@ #include "debugger.h" #include "m88100disasm.h" #include "scheduler.h" -#include "syncer.h" // コンストラクタ MPU88xx0Device::MPU88xx0Device() @@ -53,9 +52,9 @@ MPU88xx0Device::MPU88xx0Device() excep_counter.resize(512); // レジスタモニター - monitor.func = ToMonitorCallback(&MPU88xx0Device::MonitorUpdate); - monitor.SetSize(79, 25); - monitor.Regist(ID_MONITOR_MPUREG); + monitor = gMonitorManager->Regist(ID_MONITOR_MPUREG, this); + monitor->func = ToMonitorCallback(&MPU88xx0Device::MonitorUpdate); + monitor->SetSize(79, 25); } // デストラクタ @@ -71,8 +70,6 @@ MPU88xx0Device::Init() return false; } - debugger = GetDebugger(); - const ConfigItem& item_stop = gConfig->Find("mpu-pseudo-stop"); pseudo_stop_enable = (bool)item_stop.AsInt(); @@ -247,22 +244,6 @@ MPU88xx0Device::SetTrace(bool enable) exec_event.func = exec_normal; } -void -MPU88xx0Device::ChangeState(uint32 new_state) -{ - // new_state (CPU_STATE_*) と - // RequestCPUMode() の引数 Syncer::SCHED_CPU_* は - // 実は同じ値なのでそのまま渡してよいことにする。 - static_assert(CPU_STATE_NORMAL == Syncer::SCHED_CPU_NORMAL, ""); - static_assert(CPU_STATE_STOP == Syncer::SCHED_CPU_STOP, ""); - - if (cpu_state != new_state) { - cpu_state = new_state; - // スケジューラに通知 - syncer->RequestCPUMode(new_state); - } -} - // アクセス中の論理アドレスを取得 uint32 MPU88xx0Device::GetLaddr() const