if ((cyc_do = SekCycleAimS68k - SekCycleCntS68k) <= 0)
return;
+ if (SekShouldInterrupt())
+ Pico_mcd->m.s68k_poll_a = 0;
+
SekCycleCntS68k += cyc_do;
#if defined(EMU_C68K)
PicoCpuCS68k.cycles = cyc_do;
static inline void pcd_run_cpus_normal(int m68k_cycles)
{
SekCycleAim += m68k_cycles;
- if (SekShouldInterrupt())
+ if (SekShouldInterrupt() || Pico_mcd->m.m68k_poll_cnt < 12)
Pico_mcd->m.m68k_poll_cnt = 0;
else if (Pico_mcd->m.m68k_poll_cnt >= 16) {
int s68k_left = pcd_sync_s68k(SekCycleAim, 1);
\r
// poller detection\r
#define POLL_LIMIT 16\r
-#define POLL_CYCLES 124\r
+#define POLL_CYCLES 64\r
\r
void m68k_comm_check(u32 a)\r
{\r
u32 dold;\r
a &= 0x3f;\r
\r
- Pico_mcd->m.m68k_poll_a =\r
- Pico_mcd->m.m68k_poll_cnt = 0;\r
-\r
switch (a) {\r
case 0:\r
d &= 1;\r
if (d == Pico_mcd->s68k_regs[a])\r
return;\r
\r
- Pico_mcd->s68k_regs[a] = d;\r
pcd_sync_s68k(SekCyclesDone(), 0);\r
- if (Pico_mcd->m.s68k_poll_a == a && Pico_mcd->m.s68k_poll_cnt > POLL_LIMIT) {\r
+ Pico_mcd->s68k_regs[a] = d;\r
+ if (Pico_mcd->m.s68k_poll_a == (a & ~1)\r
+ && Pico_mcd->m.s68k_poll_cnt > POLL_LIMIT)\r
+ {\r
SekSetStopS68k(0);\r
Pico_mcd->m.s68k_poll_a = 0;\r
elprintf(EL_CDPOLL, "s68k poll release, a=%02x", a);\r
}\r
}\r
\r
-#ifndef _ASM_CD_MEMORY_C\r
-static\r
-#endif\r
u32 s68k_poll_detect(u32 a, u32 d)\r
{\r
#ifdef USE_POLL_DETECT\r
a &= 0x1ff;\r
if (a >= 0x0e && a < 0x30) {\r
d = Pico_mcd->s68k_regs[a];\r
- s68k_poll_detect(a, d);\r
+ s68k_poll_detect(a & ~1, d);\r
goto regs_done;\r
}\r
else if (a >= 0x58 && a < 0x68)\r