switch (a) {\r
case 0:\r
d &= 1;\r
- Pico_mcd->m.state_flags &= ~PCD_ST_S68K_IFL2;\r
- if (d) Pico_mcd->m.state_flags |= PCD_ST_S68K_IFL2;\r
+ pcd_sync_s68k(SekCyclesDone(), 0);\r
if (d && (Pico_mcd->s68k_regs[0x33] & PCDS_IEN2)) {\r
elprintf(EL_INTS, "m68k: s68k irq 2");\r
- pcd_sync_s68k(SekCyclesDone(), 0);\r
+ Pico_mcd->m.state_flags |= PCD_ST_S68K_IFL2;\r
pcd_irq_s68k(2, 1);\r
- } else\r
+ } else {\r
+ Pico_mcd->m.state_flags &= ~PCD_ST_S68K_IFL2;\r
pcd_irq_s68k(2, 0);\r
+ }\r
return;\r
case 1:\r
d &= 3;\r
Pico_mcd->m.state_flags &= ~(PCD_ST_S68K_RST|PCD_ST_S68K_POLL|PCD_ST_S68K_SLEEP);\r
elprintf(EL_CDREGS, "m68k: resetting s68k");\r
SekResetS68k();\r
+ SekCycleCntS68k += 40;\r
}\r
if (((dold & 3) == 1) != ((d & 3) == 1)) {\r
elprintf(EL_INTSW, "m68k: s68k brq %i", d >> 1);\r