From fe43bdc3346450deb1baed2c1f268c92efc6e9cf Mon Sep 17 00:00:00 2001 From: kub Date: Fri, 24 Apr 2020 19:00:41 +0200 Subject: [PATCH] 32x poll detection fix --- pico/32x/sh2soc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.39.5