From 6d47b6b63cb93c577d04f5ab9f5aa6a92c095d97 Mon Sep 17 00:00:00 2001 From: angelosa Date: Wed, 8 Jul 2015 02:14:37 +0200 Subject: [PATCH] Added transfer size clear for DMAs, used by Chaos Seed in SS (still randomly crashes tho), nw --- src/emu/cpu/sh2/sh2.c | 3 +-- src/emu/cpu/sh2/sh2comn.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/emu/cpu/sh2/sh2.c b/src/emu/cpu/sh2/sh2.c index 2cba2b28205..b2ea57f60d4 100644 --- a/src/emu/cpu/sh2/sh2.c +++ b/src/emu/cpu/sh2/sh2.c @@ -147,6 +147,7 @@ static ADDRESS_MAP_START( sh7604_map, AS_PROGRAM, 32, sh2_device ) @todo: cps3boot breaks with this enabled. Needs customization ... */ // AM_RANGE(0xc0000000, 0xc0000fff) AM_RAM // cache data array +// AM_RANGE(0xffffff88, 0xffffff8b) AM_READWRITE(dma_dtcr0_r,dma_dtcr0_w) AM_RANGE(0xe0000000, 0xe00001ff) AM_MIRROR(0x1ffffe00) AM_READWRITE(sh7604_r, sh7604_w) ADDRESS_MAP_END @@ -166,8 +167,6 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sh7032_map, AS_PROGRAM, 32, sh1_device ) // fall-back AM_RANGE(0x05fffe00, 0x05ffffff) AM_READWRITE16(sh7032_r,sh7032_w,0xffffffff) // SH-7032H internal i/o -// AM_RANGE(0x07000000, 0x070003ff) AM_RAM AM_SHARE("oram")// on-chip RAM, actually at 0xf000000 (1 kb) -// AM_RANGE(0x0f000000, 0x0f0003ff) AM_RAM AM_SHARE("oram")// on-chip RAM, actually at 0xf000000 (1 kb) ADDRESS_MAP_END sh2_device::sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) diff --git a/src/emu/cpu/sh2/sh2comn.c b/src/emu/cpu/sh2/sh2comn.c index ac575438cda..f6883649ee9 100644 --- a/src/emu/cpu/sh2/sh2comn.c +++ b/src/emu/cpu/sh2/sh2comn.c @@ -366,6 +366,7 @@ void sh2_device::sh2_do_dma(int dma) LOG(("SH2.%s: DMA %d complete\n", tag(), dma)); + m_m[0x62+4*dma] = 0; m_m[0x63+4*dma] |= 2; m_dma_timer_active[dma] = 0; m_dma_irq[dma] |= 1; @@ -461,6 +462,7 @@ void sh2_device::sh2_dmac_check(int dma) } } + WRITE32_MEMBER( sh2_device::sh7604_w ) { UINT32 old;