Settings: Make DMA performance parameters tweakable

This commit is contained in:
Connor McLaughlin
2020-04-29 20:00:22 +10:00
parent 9d1eb321ec
commit 940b725c1d
6 changed files with 68 additions and 27 deletions

View File

@ -25,6 +25,10 @@ void DMA::Initialize(System* system, Bus* bus, InterruptController* interrupt_co
m_cdrom = cdrom;
m_spu = spu;
m_mdec = mdec;
m_max_slice_ticks = system->GetSettings().dma_max_slice_ticks;
m_halt_ticks = system->GetSettings().dma_halt_ticks;
m_transfer_buffer.resize(32);
m_unhalt_event = system->CreateTimingEvent("DMA Transfer Unhalt", 1, m_max_slice_ticks,
std::bind(&DMA::UnhaltTransfer, this, std::placeholders::_1), false);
@ -306,7 +310,7 @@ bool DMA::TransferChannel(Channel channel)
if (used_ticks >= m_max_slice_ticks)
{
// stall the transfer for a bit if we ran for too long
//Log_WarningPrintf("breaking dma chain at 0x%08X", current_address);
// Log_WarningPrintf("breaking dma chain at 0x%08X", current_address);
HaltTransfer(m_halt_ticks);
return false;
}