diff options
| author | Fiora <fioraaeterna@gmail.com> | 2014-11-10 20:10:41 -0800 |
|---|---|---|
| committer | Fiora <fioraaeterna@gmail.com> | 2014-11-10 20:31:07 -0800 |
| commit | 4b105ed0e412fa992bd1b99c6608e7ac63e2c830 (patch) | |
| tree | d0fc77ef5ab3841df78228f28d7d43f25430050f /Source/Core | |
| parent | 974dd2101901196d30ba09e5e7e5a6fc0f57ada2 (diff) | |
JIT: revert accuracy improvement to mftb
Fixes a few games (e.g. Karaoke Revolution Party) for reasons explained in the
comments.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp index 0db3a3cca1..3381d8c57e 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp @@ -232,9 +232,13 @@ void Jit64::mfspr(UGeckoInstruction inst) // cost of calling out to C for this is actually significant. MOV(64, R(RAX), M(&CoreTiming::globalTimer)); SUB(64, R(RAX), M(&CoreTiming::fakeTBStartTicks)); - // The timer can change within a long block, so add in any difference - if (js.downcountAmount) - ADD(64, R(RAX), Imm32(js.downcountAmount)); + // It might seem convenient to correct the timer for the block position here for even more accurate + // timing, but as of currently, this can break games. If we end up reading a time *after* the time + // at which an interrupt was supposed to occur, e.g. because we're 100 cycles into a block with only + // 50 downcount remaining, some games don't function correctly, such as Karaoke Party Revolution, + // which won't get past the loading screen. + //if (js.downcountAmount) + // ADD(64, R(RAX), Imm32(js.downcountAmount)); // a / 12 = (a * 0xAAAAAAAAAAAAAAAB) >> 67 MOV(64, R(RDX), Imm64(0xAAAAAAAAAAAAAAABULL)); MUL(64, R(RDX)); |
