Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacky compat workaround for Resistance's ad-hoc mode #18821

Merged
merged 1 commit into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Core/Compatibility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
CheckSetting(iniFile, gameID, "AllowDelayedReadbacks", &flags_.AllowDelayedReadbacks);
CheckSetting(iniFile, gameID, "TacticsOgreEliminateDebugReadback", &flags_.TacticsOgreEliminateDebugReadback);
CheckSetting(iniFile, gameID, "FramebufferAllowLargeVerticalOffset", &flags_.FramebufferAllowLargeVerticalOffset);
CheckSetting(iniFile, gameID, "DisableMemcpySlicing", &flags_.DisableMemcpySlicing);
}

void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID) {
Expand Down
1 change: 1 addition & 0 deletions Core/Compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ struct CompatFlags {
bool AllowDelayedReadbacks;
bool TacticsOgreEliminateDebugReadback;
bool FramebufferAllowLargeVerticalOffset;
bool DisableMemcpySlicing;
};

struct VRCompat {
Expand Down
4 changes: 2 additions & 2 deletions Core/HLE/ReplaceTables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static int Replace_memcpy_jak() {
skip = gpu->PerformMemoryCopy(destPtr, srcPtr, bytes);
}
}
if (!skip && bytes > SLICE_SIZE && bytes != 512 * 272 * 4) {
if (!skip && bytes > SLICE_SIZE && bytes != 512 * 272 * 4 && !PSP_CoreParameter().compat.flags().DisableMemcpySlicing) {
// This is a very slow func. To avoid thread blocking, do a slice at a time.
// Avoiding exactly 512 * 272 * 4 to detect videos, though.
bytes = SLICE_SIZE;
Expand Down Expand Up @@ -390,7 +390,7 @@ static int Replace_memset_jak() {
if (Memory::IsVRAMAddress(destPtr) && (skipGPUReplacements & (int)GPUReplacementSkip::MEMSET) == 0) {
skip = gpu->PerformMemorySet(destPtr, value, bytes);
}
if (!skip && bytes > SLICE_SIZE) {
if (!skip && bytes > SLICE_SIZE && !PSP_CoreParameter().compat.flags().DisableMemcpySlicing) {
// This is a very slow func. To avoid thread blocking, do a slice at a time.
bytes = SLICE_SIZE;
sliced = true;
Expand Down
6 changes: 6 additions & 0 deletions assets/compat.ini
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ ULES00869 = true
# Resistance Retribution
UCES01184 = true
UCUS98668 = true
UCJP00174 = true

# Spider-Man 3
ULES00938 = true
Expand Down Expand Up @@ -1737,3 +1738,8 @@ ULJM05753 = true
NPJH50348 = true
ULJM06009 = true
UCKS45164 = true

[DisableMemcpySlicing]
UCES01184 = true
UCUS98668 = true
UCJP00174 = true
Loading