--- nono/m680x0/m68030subr.cpp 2026/04/29 17:04:44 1.1.1.5 +++ nono/m680x0/m68030subr.cpp 2026/04/29 17:04:46 1.1.1.6 @@ -9,7 +9,6 @@ #include "m68030fpu.h" #include "debugger.h" -static void m68030_update_vtime(m68kcpu *cpu); static void m68030_change_intr(m68kcpu *, int); static void m68030_set_intr(m68kcpu *, int); static void m68030_double_bus_fault(m68kcpu *, const char *); @@ -37,27 +36,11 @@ m68030_init(uint32 reset_vector) return cpu; } -// 仕掛中のサイクルを仮想時刻に反映させる。 -void -m68030_update_vtime(m68kcpu *cpu) -{ - if (cpu->used_cycle > cpu->goal_cycle) { - cpu->goal_cycle = cpu->used_cycle; - } else { - cpu->goal_cycle -= cpu->used_cycle; - } - cpu->total_vtime += cpu->Cycle2Vtime(cpu->used_cycle); - cpu->used_cycle = 0; -} - // 仮想時刻を返す uint64 m68030_get_vtime(m68kcpu *cpu) { - if (cpu->used_cycle != 0) { - m68030_update_vtime(cpu); - } - return cpu->total_vtime; + return cpu->total_vtime + cpu->Cycle2Vtime(cpu->used_cycle); } // 二重バスフォールト