From: kub Date: Fri, 24 Apr 2020 17:00:41 +0000 (+0200) Subject: 32x poll detection fix X-Git-Tag: v2.00~743 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe43bdc3346450deb1baed2c1f268c92efc6e9cf;p=picodrive.git 32x poll detection fix --- diff --git a/pico/32x/sh2soc.c b/pico/32x/sh2soc.c index 369fc0de..9da3f296 100644 --- a/pico/32x/sh2soc.c +++ b/pico/32x/sh2soc.c @@ -312,7 +312,10 @@ u32 REGPARM(2) sh2_peripheral_read32(u32 a, SH2 *sh2) elprintf_sh2(sh2, EL_32XP, "peri r32 [%08x] %08x @%06x", a | ~0x1ff, d, sh2_pc(sh2)); - if ((a & 0x1c0) == 0x140) { + if (a == 0x18c) + // kludge for polling COMM while polling for end of DMA + sh2->poll_cnt = 0; + else if ((a & 0x1c0) == 0x140) { // abused as comm area DRC_SAVE_SR(sh2); p32x_sh2_poll_detect(a, sh2, SH2_STATE_CPOLL, 3);