kstenerud / Musashi

Motorola 680x0 emulator written in C
412 stars 94 forks source link

Recent bogus cycle count PR #106

Closed Paul-Arnold closed 7 months ago

Paul-Arnold commented 7 months ago

Hi, I’m trying to understand the recent PR to fix bogus cycle counts being reported. I can’t workout from the comment how to reproduce the sawtooth effect described. Can someone explain please?

It looks like it’s to correct the cycles reported when m68k_end_timeslice() is used ? But I think it breaks the value reported when m68k_modify_timesclice() is used. Would a better fix be to change m68k_end_timeslice() from m68ki_initial_cycles = CYCLES(); to m68ki_initial_cycles -= CYCLES();?

sorry if I’ve completely misunderstood what it’s fixing