From 92071da38a69ea50d035093a125e5eb124a60f47 Mon Sep 17 00:00:00 2001 From: smf- Date: Fri, 4 Oct 2013 21:54:22 +0000 Subject: [PATCH] Added a hack to get konami 80's loading games again. It misses out triggering dma for three sectors, the old code didn't care as it didn't check for how much had been requested. Why it does this and what should actually happen is currently unknown. [smf] --- src/mame/drivers/ksys573.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/ksys573.c b/src/mame/drivers/ksys573.c index 5ea5a41a18c..7b24779f9b8 100644 --- a/src/mame/drivers/ksys573.c +++ b/src/mame/drivers/ksys573.c @@ -756,14 +756,19 @@ TIMER_CALLBACK_MEMBER(ksys573_state::atapi_xfer_end) address_space &space = m_maincpu->space(AS_PROGRAM); - while( m_atapi_xfersize > 0 ) + for (int i = 0; i < m_atapi_xfersize; i++) { UINT32 d = m_ata->read_cs0(space, (UINT32) 0, (UINT32) 0xffff) << 0; d |= m_ata->read_cs0(space, (UINT32) 0, (UINT32) 0xffff) << 16; m_p_n_psxram[ m_atapi_xferbase / 4 ] = d; m_atapi_xferbase += 4; - m_atapi_xfersize--; + } + + /// HACK: konami80s only works if you dma more data than requested + if ((m_ata->read_cs1(space, (UINT32) 6, (UINT32) 0xffff) & 8) != 0) + { + m_atapi_timer->adjust(m_maincpu->cycles_to_attotime((ATAPI_CYCLES_PER_SECTOR * (m_atapi_xfersize/512)))); } }