Musashi
Musashi copied to clipboard
Incorrect used clocks returned by m68k_execute(int num_cycles) after a call to m68k_end_timeslice(void)
I have noticed that the number of used clocks is incorrectly calculated by int m68k_execute(int num_cycles) (in m68kcpu.c) once a call is made to void m68k_end_timeslice(void) during the call to m68k_execute.
The proposed solution would be to change:
void m68k_end_timeslice(void)
{
m68ki_initial_cycles = GET_CYCLES();
SET_CYCLES(0);
}
into:
void m68k_end_timeslice(void)
{
m68ki_initial_cycles -= GET_CYCLES();
SET_CYCLES(0);
}
(please note -= in stead of =)
Best regards, elmerucr