#include "../pico_int.h"
#include "../memory.h"
-#if 1
+#if 0
#undef ash2_end_run
#undef SekEndRun
#define ash2_end_run(x)
return sh2_comm_faker(a);
#else
if ((a & 0x30) == 0x20 && p32x_poll_detect(&m68k_poll, a, SekCyclesDoneT(), 0)) {
- SekEndRun(16);
+ SekEndTimeslice(16);
}
#endif
if ((a & 0x30) == 0x20) {
u8 *r8 = (u8 *)r;
r8[a ^ 1] = d;
- if (p32x_poll_undetect(&sh2_poll[0], 0) || p32x_poll_undetect(&sh2_poll[1], 0))
- // if some SH2 is busy waiting, it needs to see the result ASAP
- SekEndRun(16);
+ p32x_poll_undetect(&sh2_poll[0], 0);
+ p32x_poll_undetect(&sh2_poll[1], 0);
+ // if some SH2 is busy waiting, it needs to see the result ASAP
+ if (SekCyclesLeftNoMCD > 32)
+ SekEndRun(32);
return;
}
}
// comm port
else if ((a & 0x30) == 0x20 && r[a / 2] != d) {
r[a / 2] = d;
- if (p32x_poll_undetect(&sh2_poll[0], 0) || p32x_poll_undetect(&sh2_poll[1], 0))
- // if some SH2 is busy waiting, it needs to see the result ASAP
- SekEndRun(16);
+ p32x_poll_undetect(&sh2_poll[0], 0);
+ p32x_poll_undetect(&sh2_poll[1], 0);
+ // same as for w8
+ if (SekCyclesLeftNoMCD > 32)
+ SekEndRun(32);
return;
}
// PWM