if (Pico_mcd->m.state_flags & (PCD_ST_M68K_POLL|PCD_ST_M68K_SLEEP)) {
int s68k_left;
// main CPU is polling, (wake and) run sub only
- Pico_mcd->m.state_flags &= ~(PCD_ST_S68K_POLL|PCD_ST_S68K_SLEEP);
- Pico_mcd->m.s68k_poll_cnt = 0;
+ if (Pico_mcd->m.state_flags & (PCD_ST_S68K_POLL|PCD_ST_S68K_SLEEP)) {
+ Pico_mcd->m.state_flags &= ~(PCD_ST_S68K_POLL|PCD_ST_S68K_SLEEP);
+ Pico_mcd->m.s68k_poll_cnt = 0;
+ }
s68k_left = pcd_sync_s68k(Pico.t.m68c_aim, 1);
Pico.t.m68c_cnt = Pico.t.m68c_aim;
// Delay slave a bit to make sure master can check before slave changes.\r
SekCycleCntS68k += 24; // Silpheed\r
}\r
- if ((Pico_mcd->m.s68k_poll_a ^ a) & ~1) {\r
+ if (!((Pico_mcd->m.s68k_poll_a ^ a) & ~1)) {\r
if (Pico_mcd->m.state_flags & PCD_ST_S68K_POLL)\r
elprintf(EL_CDPOLL, "s68k poll release, a=%02x", a);\r
Pico_mcd->m.state_flags &= ~PCD_ST_S68K_POLL;\r
return;\r
\r
Pico_mcd->s68k_regs[a] = (u8) d;\r
- if ((Pico_mcd->m.m68k_poll_a ^ a) & ~1) {\r
+ if (!((Pico_mcd->m.m68k_poll_a ^ a) & ~1)) {\r
SekEndRunS68k(8);\r
Pico_mcd->m.state_flags &= ~PCD_ST_M68K_POLL;\r
Pico_mcd->m.m68k_poll_cnt = 0;\r
\r
r[a] = d >> 8;\r
r[a + 1] = d;\r
- if ((Pico_mcd->m.m68k_poll_a ^ a) & ~1) {\r
+ if (!((Pico_mcd->m.m68k_poll_a ^ a) & ~1)) {\r
SekEndRunS68k(8);\r
Pico_mcd->m.state_flags &= ~PCD_ST_M68K_POLL;\r
Pico_mcd->m.m68k_poll_cnt = 0;\r