Disable MMUL as a compat hack to fix Tekken games leg shaking.

This commit is contained in:
LunaMoo committed 2019-06-13 15:19:14 +02:00
1 parent d08d155edc
commit 52eef0c021
8 files changed
+35

No files matched your search

+1
View File
@@ -76,6 +76,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
CheckSetting(iniFile, gameID, "ForceUMDDelay", &flags_.ForceUMDDelay);
CheckSetting(iniFile, gameID, "ForceMax60FPS", &flags_.ForceMax60FPS);
CheckSetting(iniFile, gameID, "JitInvalidationHack", &flags_.JitInvalidationHack);
CheckSetting(iniFile, gameID, "MMULDisableHack", &flags_.MMULDisableHack);
}
void Compatibility::CheckSetting(IniFile &iniFile, const std::string &gameID, const char *option, bool *flag) {
+1
View File
@@ -76,6 +76,7 @@ struct CompatFlags {
bool ForceUMDDelay;
bool ForceMax60FPS;
bool JitInvalidationHack;
bool MMULDisableHack;
};
class IniFile;
+3
View File
@@ -29,6 +29,7 @@
#include "Common/CPUDetect.h"
#include "Core/Config.h"
#include "Core/Reporting.h"
#include "Core/System.h"
#include "Core/MIPS/ARM/ArmJit.h"
#include "Core/MIPS/ARM/ArmRegCache.h"
@@ -1467,6 +1468,8 @@ namespace MIPSComp
}
void ArmJit::Comp_Vmmul(MIPSOpcode op) {
if (PSP_CoreParameter().compat.flags().MMULDisableHack)
DISABLE;
CONDITIONAL_DISABLE(VFPU_MTX_VMMUL);
if (js.HasUnknownPrefix()) {
DISABLE;
+3
View File
@@ -41,6 +41,7 @@
#include "Core/MIPS/MIPSVFPUUtils.h"
#include "Core/Config.h"
#include "Core/Reporting.h"
#include "Core/System.h"
#include "Core/MIPS/ARM/ArmJit.h"
#include "Core/MIPS/ARM/ArmRegCache.h"
@@ -856,6 +857,8 @@ void ArmJit::CompNEON_Vmmov(MIPSOpcode op) {
}
void ArmJit::CompNEON_Vmmul(MIPSOpcode op) {
if (PSP_CoreParameter().compat.flags().MMULDisableHack)
DISABLE;
CONDITIONAL_DISABLE(VFPU_MTX_VMMUL);
MatrixSize msz = GetMtxSize(op);
+3
View File
@@ -29,6 +29,7 @@
#include "Common/CPUDetect.h"
#include "Core/Config.h"
#include "Core/Reporting.h"
#include "Core/System.h"
#include "Common/Arm64Emitter.h"
#include "Core/MIPS/ARM64/Arm64Jit.h"
@@ -1214,6 +1215,8 @@ namespace MIPSComp {
}
void Arm64Jit::Comp_Vmmul(MIPSOpcode op) {
if (PSP_CoreParameter().compat.flags().MMULDisableHack)
DISABLE;
CONDITIONAL_DISABLE(VFPU_MTX_VMMUL);
if (!js.HasNoPrefix()) {
DISABLE;
+3
View File
@@ -29,6 +29,7 @@
#include "Core/MIPS/IR/IRFrontend.h"
#include "Core/MIPS/IR/IRRegCache.h"
#include "Core/Reporting.h"
#include "Core/System.h"
// All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly.
@@ -1237,6 +1238,8 @@ namespace MIPSComp {
// This may or may not be a win when using the IR interpreter...
// Many more instructions to interpret.
void IRFrontend::Comp_Vmmul(MIPSOpcode op) {
if (PSP_CoreParameter().compat.flags().MMULDisableHack)
DISABLE;
CONDITIONAL_DISABLE(VFPU_MTX_VMMUL);
if (!js.HasNoPrefix()) {
DISABLE;
+3
View File
@@ -37,6 +37,7 @@
#include "Core/MIPS/MIPSVFPUUtils.h"
#include "Core/MIPS/x86/Jit.h"
#include "Core/MIPS/x86/RegCache.h"
#include "Core/System.h"
// All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly.
// Currently known non working ones should have DISABLE.
@@ -2802,6 +2803,8 @@ void Jit::Comp_VScl(MIPSOpcode op) {
}
void Jit::Comp_Vmmul(MIPSOpcode op) {
if (PSP_CoreParameter().compat.flags().MMULDisableHack)
DISABLE;
CONDITIONAL_DISABLE(VFPU_MTX_VMMUL);
// TODO: This probably ignores prefixes?
+18
View File
@@ -332,6 +332,24 @@ ULJS00201 = true
# Bijin Tokei Portable not even a game, but needs it to load 2 miniatures, they will be low res, but better than black
NPJH00055 = true
[MMULDisableHack]
# Force software MMUL to fix Tekken leg shaking
# Tekken 5 DR
ULJS00048 = true
ULUS10139 = true
UCES00356 = true
ULJS19013 = true
NPJH50137 = true
# Tekken 6
ULUS10466 = true
ULES01376 = true
ULJS00224 = true
NPUH10047 = true
ULAS42214 = true
ULJS19054 = true
NPJH50184 = true
[RequireBufferedRendering]
# Warn the user that the game will not work and have issue, if buffered rendering is not enabled.
# Midnight Club: LA Remix