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]

This commit is contained in:
smf- 2013-10-04 21:54:22 +00:00
parent 85ba0140aa
commit 92071da38a

View File

@ -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))));
}
}