mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-03 08:07:45 +00:00
Merge pull request #3771 from phire/pr3771
Remove instant ARAM DMA hack (Fixes Sarge's War)
This commit is contained in:
commit
d951f9e765
6 changed files with 1 additions and 109 deletions
|
@ -336,14 +336,6 @@ void Interpreter::dcbi(UGeckoInstruction _inst)
|
|||
// should use icbi consistently, but games aren't portable.)
|
||||
u32 address = Helper_Get_EA_X(_inst);
|
||||
JitInterface::InvalidateICache(address & ~0x1f, 32, false);
|
||||
|
||||
// The following detects a situation where the game is writing to the dcache at the address being
|
||||
// DMA'd. As we do not
|
||||
// have dcache emulation, invalid data is being DMA'd causing audio glitches. The following code
|
||||
// detects this and
|
||||
// enables the DMA to complete instantly before the invalid data is written. Resident Evil 2 & 3
|
||||
// trigger this.
|
||||
DSP::FlushInstantDMA(address);
|
||||
}
|
||||
|
||||
void Interpreter::dcbst(UGeckoInstruction _inst)
|
||||
|
|
|
@ -315,23 +315,6 @@ void Jit64::dcbx(UGeckoInstruction inst)
|
|||
SwitchToNearCode();
|
||||
SetJumpTarget(c);
|
||||
|
||||
// dcbi
|
||||
if (inst.SUBOP10 == 470)
|
||||
{
|
||||
// Flush DSP DMA if DMAState bit is set
|
||||
TEST(16, M(&DSP::g_dspState), Imm16(1 << 9));
|
||||
c = J_CC(CC_NZ, true);
|
||||
SwitchToFarCode();
|
||||
SetJumpTarget(c);
|
||||
ABI_PushRegistersAndAdjustStack(registersInUse, 0);
|
||||
SHL(32, R(addr), Imm8(5));
|
||||
ABI_CallFunctionR(DSP::FlushInstantDMA, addr);
|
||||
ABI_PopRegistersAndAdjustStack(registersInUse, 0);
|
||||
c = J(true);
|
||||
SwitchToNearCode();
|
||||
SetJumpTarget(c);
|
||||
}
|
||||
|
||||
gpr.UnlockAllX();
|
||||
}
|
||||
|
||||
|
|
|
@ -733,34 +733,6 @@ void JitArm64::dcbx(UGeckoInstruction inst)
|
|||
SetJumpTarget(bit_not_set);
|
||||
SetJumpTarget(near);
|
||||
|
||||
// dcbi
|
||||
if (inst.SUBOP10 == 470)
|
||||
{
|
||||
// Flush DSP DMA if DMAState bit is set
|
||||
MOVI2R(EncodeRegTo64(WA), (u64)&DSP::g_dspState);
|
||||
LDRH(INDEX_UNSIGNED, WA, EncodeRegTo64(WA), 0);
|
||||
|
||||
bit_not_set = TBZ(WA, 9);
|
||||
far = B();
|
||||
SwitchToFarCode();
|
||||
SetJumpTarget(far);
|
||||
|
||||
ABI_PushRegisters(gprs_to_push);
|
||||
m_float_emit.ABI_PushRegisters(fprs_to_push, X30);
|
||||
|
||||
LSL(W0, addr, 5);
|
||||
MOVI2R(X1, (u64)DSP::FlushInstantDMA);
|
||||
BLR(X1);
|
||||
|
||||
m_float_emit.ABI_PopRegisters(fprs_to_push, X30);
|
||||
ABI_PopRegisters(gprs_to_push);
|
||||
|
||||
near = B();
|
||||
SwitchToNearCode();
|
||||
SetJumpTarget(near);
|
||||
SetJumpTarget(bit_not_set);
|
||||
}
|
||||
|
||||
gpr.Unlock(addr, value, W30);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue