X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2F32x%2Fsh2soc.c;h=62423d136135055d6c8df597a9162effb2e21fc7;hb=fa8fb7544593a0ed43f3354cc5f41150464b55bf;hp=bdf349f27b16b54ca04df85503fee96eb14ddc83;hpb=f8675e282e7aa72bc6ab0edbb1dada4395d1c44c;p=picodrive.git diff --git a/pico/32x/sh2soc.c b/pico/32x/sh2soc.c index bdf349f..62423d1 100644 --- a/pico/32x/sh2soc.c +++ b/pico/32x/sh2soc.c @@ -73,7 +73,7 @@ static void dmac_transfer_complete(SH2 *sh2, struct dma_chan *chan) { chan->chcr |= DMA_TE; // DMA has ended normally - p32x_sh2_poll_event(sh2, SH2_STATE_SLEEP, SekCyclesDoneT()); + p32x_sh2_poll_event(sh2, SH2_STATE_SLEEP, SekCyclesDone()); if (chan->chcr & DMA_IE) dmac_te_irq(sh2, chan); } @@ -150,6 +150,10 @@ static void dmac_trigger(SH2 *sh2, struct dma_chan *chan) return; } + // DREQ1 + if ((chan->dar & 0xc7fffff0) == 0x00004030) + return; + elprintf(EL_32XP|EL_ANOMALY, "unhandled DMA: " "%08x->%08x, cnt %d, chcr %04x @%06x", chan->sar, chan->dar, chan->tcr, chan->chcr, sh2->pc); @@ -354,7 +358,7 @@ void REGPARM(3) sh2_peripheral_write16(u32 a, u32 d, SH2 *sh2) r[(a / 2) ^ 1] = d; } -void sh2_peripheral_write32(u32 a, u32 d, SH2 *sh2) +void REGPARM(3) sh2_peripheral_write32(u32 a, u32 d, SH2 *sh2) { u32 *r = sh2->peri_regs; u32 old; @@ -497,8 +501,19 @@ void p32x_dreq1_trigger(void) hit = 1; } - if (!hit) - elprintf(EL_32XP|EL_ANOMALY, "dreq1: nobody cared"); + // debug +#if (EL_LOGMASK & (EL_32XP|EL_ANOMALY)) + { + static int miss_count; + if (!hit) { + if (++miss_count == 4) + elprintf(EL_32XP|EL_ANOMALY, "dreq1: nobody cared"); + } + else + miss_count = 0; + } +#endif + (void)hit; } // vim:shiftwidth=2:ts=2:expandtab