--- nono/m88xx0/m88100core.cpp 2026/04/29 17:05:47 1.1.1.17 +++ nono/m88xx0/m88100core.cpp 2026/04/29 17:05:56 1.1.1.18 @@ -100,7 +100,7 @@ MPU88xx0Device::ExecNormal(Event *ev) Prefetch(); int cycle = used_cycle - cycle_start; - ev->time = cycle * clock_nsec + buswait; + ev->time = cycle * clock_tsec + buswait; scheduler->StartEvent(ev); } @@ -172,6 +172,7 @@ MPU88xx0Device::ExceptionCore(uint32 pri // ただし 0 番は syscall(2) (間接システムコール) で、実際の番号は r2。 // 198番 __syscall(2) だと r2:r3 (なので実質 r3)。 // 非公式 NetBSD/luna88k はベクタ 128 を使っているようだ。 + last_vector = vec; excep_counter[vec]++; if (vec == 450 || vec == 128) { syscall = reg.r[13]; @@ -186,8 +187,6 @@ MPU88xx0Device::ExceptionCore(uint32 pri uint32 info = 0xfc000000 | (syscall << 12) | vec; exhist.AddEntry(from, 0, info); brhist.AddEntry(from, 0, info); - // デバッガに通知 (例外ブレーク用) - debugger->NotifyExceptionMain(vec); if ((reg.psr & PSR_SFRZ)) { if (pri != EXCPRI_TRAP) { @@ -197,10 +196,10 @@ MPU88xx0Device::ExceptionCore(uint32 pri // BranchHistory に繰り返しと判定されないよう to を変えておく。 pri = EXCPRI_ERROR; vec = EXCVEC_ERROR; + last_vector = vec; info = 0xfc000000 | vec; exhist.AddEntry(from, 1, info); brhist.AddEntry(from, 1, info); - debugger->NotifyExceptionMain(vec); } else { putlog(0, "Trap during Exception"); }