--- nono/vm/vm.cpp 2026/04/29 17:04:36 1.1.1.4 +++ nono/vm/vm.cpp 2026/04/29 17:04:50 1.1.1.6 @@ -11,6 +11,7 @@ #include "mythread.h" #include "ram.h" #include "renderer.h" +#include "rtc.h" #include "scheduler.h" std::unique_ptr gVM; @@ -95,6 +96,12 @@ VM::Apply() bool VM::DevicePowerOn() { + // 時刻開始 + // RTC::PowerOn() でもいいかも知れないけど念のため全 PowerOn より先に。 + if (!gRTC->InitRTC()) { + return false; + } + for (const auto& d : gDevices) { if (!d->PowerOn()) { return false; @@ -105,7 +112,6 @@ VM::DevicePowerOn() ResetHard(); // スケジューラを開始 - // (MPU の ResetHard() より後で起動時に1回だけ呼び出す) gScheduler->Run(); return true; @@ -143,12 +149,3 @@ VM::ResetHard() d->ResetHard(); } } - -// MPU の RESET 命令によるリセット -void -VM::ResetSoft() -{ - for (const auto& d : gDevices) { - d->ResetSoft(); - } -}