}
}
cycles_mult &= ~0x7f;
+ if (cycles_mult < 0x80) {
+ cycles_mult = 0x80;
+ }
currprefs.cpu_clock_multiplier = changed_prefs.cpu_clock_multiplier;
currprefs.cpu_frequency = changed_prefs.cpu_frequency;
check_debugger();
TRY(prb) {
while (!exit) {
+ evt_t c = get_cycles();
r->instruction_pc = m68k_getpc();
r->opcode = get_iword_cache_040(0);
// "prefetch"
exit = true;
}
- regs.instruction_cnt++;
// workaround for situation when all accesses are cached
- extracycles++;
- if (extracycles >= 8) {
- extracycles = 0;
- x_do_cycles(CYCLE_UNIT);
+ if (c == get_cycles()) {
+ extracycles++;
+ if (extracycles >= 4) {
+ extracycles = 0;
+ x_do_cycles(CYCLE_UNIT);
+ }
}
+
+ regs.instruction_cnt++;
}
} CATCH(prb) {
bus_error();
(*cpufunctbl_noret[r->opcode])(r->opcode);
- cpu_cycles = 1 * CYCLE_UNIT;
+ cpu_cycles = 2 * CYCLE_UNIT;
cycles = adjust_cycles(cpu_cycles);
regs.instruction_cnt++;
- do_cycles(cycles);
+ x_do_cycles(cycles);
if (r->spcflags) {
if (do_specialties(0))