--- nono/m88xx0/m88100core.cpp 2026/04/29 17:04:44 1.1.1.5 +++ nono/m88xx0/m88100core.cpp 2026/04/29 17:04:46 1.1.1.6 @@ -118,7 +118,7 @@ m88kcpu::Run(uint32 delta) } else { // STOP 継続として戻る。 used_cycle = goal_cycle; - return atomic_reqflag; + goto exit; } } @@ -220,34 +220,20 @@ m88kcpu::Run(uint32 delta) if ((atomic_reqflag & CPU_REQ_STOP)) { // STOP 状態は、残りサイクルを消費したことにして戻る gMPU->putlog(2, "STOP 状態検出"); - used_cycle = goal_cycle; - is_release = true; + if (used_cycle < goal_cycle) { + used_cycle = goal_cycle; + } } if (used_cycle >= goal_cycle) break; } - return atomic_reqflag; -} - -// 仕掛中のサイクルを仮想時刻に反映させる -void -m88kcpu::UpdateVTime() -{ - goal_cycle -= used_cycle; + exit: total_vtime += Cycle2Vtime(used_cycle); used_cycle = 0; -} -// 仮想時刻 [nsec] を取得する -uint64 -m88kcpu::GetVTime() -{ - if (used_cycle != 0) { - UpdateVTime(); - } - return total_vtime; + return atomic_reqflag; } // この命令後に実行を中断して VM に戻る