Merge pull request #3773 from phire/if_you_want_100_cycles_ask_for_100_cycles
"Instant" ARAM DMA shouldn't schedule and event too soon.
This commit is contained in:
commit
58d8c734b8
|
@ -212,6 +212,7 @@ void EnableInstantDMA()
|
||||||
CoreTiming::RemoveEvent(et_CompleteARAM);
|
CoreTiming::RemoveEvent(et_CompleteARAM);
|
||||||
CompleteARAM(0, 0);
|
CompleteARAM(0, 0);
|
||||||
instant_dma = true;
|
instant_dma = true;
|
||||||
|
ERROR_LOG(DSPINTERFACE, "Enabling Instant ARAM DMA hack");
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlushInstantDMA(u32 address)
|
void FlushInstantDMA(u32 address)
|
||||||
|
@ -544,14 +545,12 @@ static void Do_ARAM_DMA()
|
||||||
// ARAM DMA transfer rate has been measured on real hw
|
// ARAM DMA transfer rate has been measured on real hw
|
||||||
int ticksToTransfer = (g_arDMA.Cnt.count / 32) * 246;
|
int ticksToTransfer = (g_arDMA.Cnt.count / 32) * 246;
|
||||||
|
|
||||||
|
// This is a huge hack that appears to be here only to fix Resident Evil 2/3
|
||||||
if (instant_dma)
|
if (instant_dma)
|
||||||
ticksToTransfer = 0;
|
ticksToTransfer = std::min(ticksToTransfer, 100);
|
||||||
|
|
||||||
CoreTiming::ScheduleEvent(ticksToTransfer, et_CompleteARAM);
|
CoreTiming::ScheduleEvent(ticksToTransfer, et_CompleteARAM);
|
||||||
|
|
||||||
if (instant_dma)
|
|
||||||
CoreTiming::ForceExceptionCheck(100);
|
|
||||||
|
|
||||||
last_mmaddr = g_arDMA.MMAddr;
|
last_mmaddr = g_arDMA.MMAddr;
|
||||||
last_aram_dma_count = g_arDMA.Cnt.count;
|
last_aram_dma_count = g_arDMA.Cnt.count;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue