mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 05:37:57 +03:00
Remove old patches.xml.
Some checks are pending
Build Android / build_android (apk) (push) Waiting to run
Build Android / build_android (libretro) (push) Waiting to run
Build iOS / build_ios (push) Waiting to run
Build JavaScript / build_js (push) Waiting to run
Build Linux / build_linux (push) Waiting to run
Build Linux ARM32 / build_linux_arm32 (push) Waiting to run
Build Linux ARM64 / build_linux_arm64 (push) Waiting to run
Build macOS / build_macos (push) Waiting to run
Build Windows / build_windows (x86_32, Visual Studio 16 2019, installer32.nsi, win32_msvc2019, Win32) (push) Waiting to run
Build Windows / build_windows (x86_64, Visual Studio 16 2019, installer64.nsi, win64_msvc2019_64, x64) (push) Waiting to run
Build Windows Psf / build_windows_psf (off, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Waiting to run
Build Windows Psf / build_windows_psf (on, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Waiting to run
Check Format / run_clangformat (push) Waiting to run
Some checks are pending
Build Android / build_android (apk) (push) Waiting to run
Build Android / build_android (libretro) (push) Waiting to run
Build iOS / build_ios (push) Waiting to run
Build JavaScript / build_js (push) Waiting to run
Build Linux / build_linux (push) Waiting to run
Build Linux ARM32 / build_linux_arm32 (push) Waiting to run
Build Linux ARM64 / build_linux_arm64 (push) Waiting to run
Build macOS / build_macos (push) Waiting to run
Build Windows / build_windows (x86_32, Visual Studio 16 2019, installer32.nsi, win32_msvc2019, Win32) (push) Waiting to run
Build Windows / build_windows (x86_64, Visual Studio 16 2019, installer64.nsi, win64_msvc2019_64, x64) (push) Waiting to run
Build Windows Psf / build_windows_psf (off, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Waiting to run
Build Windows Psf / build_windows_psf (on, x86_64, Visual Studio 16 2019, installer64.nsi, x64) (push) Waiting to run
Check Format / run_clangformat (push) Waiting to run
This commit is contained in:
parent
06db080a5f
commit
a7edad8479
9 changed files with 6 additions and 93 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,7 +1,7 @@
|
|||
.gradle
|
||||
build
|
||||
build_android/build
|
||||
build_android/src/main/assets/patches.xml
|
||||
build_android/src/main/assets/GameConfig.xml
|
||||
build_android/local.properties
|
||||
build_android/proguard-project.txt
|
||||
build_android/.*
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
// game's lifetime doesn't seem to be used, so this bug probably doesn't have any side effect.
|
||||
#define SEMA_ID_BASE 0
|
||||
|
||||
#define PATCHESFILENAME "patches.xml"
|
||||
#define GAMECONFIG_FILENAME "GameConfig.xml"
|
||||
|
||||
#define LOG_NAME ("ps2os")
|
||||
|
@ -437,7 +436,6 @@ void CPS2OS::LoadELF(Framework::CStream* stream, const char* executablePath, con
|
|||
}();
|
||||
|
||||
LoadExecutableInternal();
|
||||
ApplyPatches();
|
||||
ApplyGameConfig();
|
||||
|
||||
OnExecutableChange();
|
||||
|
@ -571,70 +569,6 @@ uint32 CPS2OS::LoadExecutable(const char* path, const char* section)
|
|||
return result;
|
||||
}
|
||||
|
||||
void CPS2OS::ApplyPatches()
|
||||
{
|
||||
std::unique_ptr<Framework::Xml::CNode> document;
|
||||
try
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
Framework::Android::CAssetStream patchesStream(PATCHESFILENAME);
|
||||
#else
|
||||
auto patchesPath = Framework::PathUtils::GetAppResourcesPath() / PATCHESFILENAME;
|
||||
Framework::CStdStream patchesStream(Framework::CreateInputStdStream(patchesPath.native()));
|
||||
#endif
|
||||
document = Framework::Xml::CParser::ParseDocument(patchesStream);
|
||||
if(!document) return;
|
||||
}
|
||||
catch(const std::exception& exception)
|
||||
{
|
||||
CLog::GetInstance().Print(LOG_NAME, "Failed to open patch definition file: %s.\r\n", exception.what());
|
||||
return;
|
||||
}
|
||||
|
||||
auto patchesNode = document->Select("Patches");
|
||||
if(patchesNode == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for(Framework::Xml::CFilteringNodeIterator itNode(patchesNode, "Executable"); !itNode.IsEnd(); itNode++)
|
||||
{
|
||||
auto executableNode = (*itNode);
|
||||
|
||||
const char* name = executableNode->GetAttribute("Name");
|
||||
if(name == NULL) continue;
|
||||
|
||||
if(!strcmp(name, GetExecutableName()))
|
||||
{
|
||||
//Found the right executable
|
||||
unsigned int patchCount = 0;
|
||||
|
||||
for(Framework::Xml::CFilteringNodeIterator itNode(executableNode, "Patch"); !itNode.IsEnd(); itNode++)
|
||||
{
|
||||
auto patch = (*itNode);
|
||||
|
||||
const char* addressString = patch->GetAttribute("Address");
|
||||
const char* valueString = patch->GetAttribute("Value");
|
||||
|
||||
if(addressString == nullptr) continue;
|
||||
if(valueString == nullptr) continue;
|
||||
|
||||
uint32 value = 0, address = 0;
|
||||
if(sscanf(addressString, "%x", &address) == 0) continue;
|
||||
if(sscanf(valueString, "%x", &value) == 0) continue;
|
||||
|
||||
*(uint32*)&m_ram[address] = value;
|
||||
|
||||
patchCount++;
|
||||
}
|
||||
|
||||
CLog::GetInstance().Print(LOG_NAME, "Applied %i patch(es).\r\n", patchCount);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CPS2OS::ApplyGameConfig()
|
||||
{
|
||||
std::unique_ptr<Framework::Xml::CNode> document;
|
||||
|
|
|
@ -342,7 +342,6 @@ private:
|
|||
void LoadExecutableInternal();
|
||||
void UnloadExecutable();
|
||||
|
||||
void ApplyPatches();
|
||||
void ApplyGameConfig();
|
||||
|
||||
void DisassembleSysCall(uint8);
|
||||
|
|
|
@ -131,7 +131,7 @@ set(OSX_HEADERS
|
|||
)
|
||||
|
||||
set(OSX_RES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../patches.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../GameConfig.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Base.lproj/Main.storyboard
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Resources/icon@2x.png
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Resources/boxart.png
|
||||
|
|
|
@ -277,7 +277,7 @@ if(TARGET_PLATFORM_MACOS)
|
|||
FILE(GLOB ARCADE_DEFS ${CMAKE_CURRENT_SOURCE_DIR}/../../arcadedefs/*.arcadedef)
|
||||
set(OSX_RES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/macos/AppIcon.icns
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../patches.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../GameConfig.xml
|
||||
)
|
||||
if(DEBUGGER_INCLUDED)
|
||||
list(APPEND OSX_RES ${CMAKE_CURRENT_SOURCE_DIR}/../../ee_functions.xml)
|
||||
|
|
|
@ -106,7 +106,7 @@ android {
|
|||
}
|
||||
|
||||
task copyPatchesFile(type: Copy) {
|
||||
from '../patches.xml'
|
||||
from '../GameConfig.xml'
|
||||
into 'src/main/assets'
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ Section "Play! (required)"
|
|||
File /oname=platforms\qwindows.dll "${BINARY_INPUT_PATH}\platforms\qwindows.dll"
|
||||
File /oname=styles\qwindowsvistastyle.dll "${BINARY_INPUT_PATH}\styles\qwindowsvistastyle.dll"
|
||||
File /oname=imageformats\qjpeg.dll "${BINARY_INPUT_PATH}\imageformats\qjpeg.dll"
|
||||
File "..\Patches.xml"
|
||||
File "..\GameConfig.xml"
|
||||
File "..\states.db"
|
||||
|
||||
SetOutPath $INSTDIR\arcadedefs
|
||||
|
@ -131,7 +131,7 @@ Section "Uninstall"
|
|||
Delete $INSTDIR\platforms\qwindows.dll
|
||||
Delete $INSTDIR\styles\qwindowsvistastyle.dll
|
||||
Delete $INSTDIR\imageformats\qjpeg.dll
|
||||
Delete $INSTDIR\Patches.xml
|
||||
Delete $INSTDIR\GameConfig.xml
|
||||
Delete $INSTDIR\states.db
|
||||
Delete $INSTDIR\arcadedefs\*
|
||||
Delete $INSTDIR\uninstall.exe
|
||||
|
|
|
@ -81,7 +81,6 @@ Section "Play! (required)"
|
|||
File /oname=platforms\qwindows.dll "${BINARY_INPUT_PATH}\platforms\qwindows.dll"
|
||||
File /oname=styles\qwindowsvistastyle.dll "${BINARY_INPUT_PATH}\styles\qwindowsvistastyle.dll"
|
||||
File /oname=imageformats\qjpeg.dll "${BINARY_INPUT_PATH}\imageformats\qjpeg.dll"
|
||||
File "..\Patches.xml"
|
||||
File "..\GameConfig.xml"
|
||||
File "..\states.db"
|
||||
|
||||
|
@ -135,7 +134,6 @@ Section "Uninstall"
|
|||
Delete $INSTDIR\platforms\qwindows.dll
|
||||
Delete $INSTDIR\styles\qwindowsvistastyle.dll
|
||||
Delete $INSTDIR\imageformats\qjpeg.dll
|
||||
Delete $INSTDIR\Patches.xml
|
||||
Delete $INSTDIR\GameConfig.xml
|
||||
Delete $INSTDIR\states.db
|
||||
Delete $INSTDIR\arcadedefs\*
|
||||
|
|
18
patches.xml
18
patches.xml
|
@ -1,18 +0,0 @@
|
|||
<Patches>
|
||||
<Executable Name="SLES_501.76;1" Title="Oni" Region="EU">
|
||||
<Patch Address="0x001cef7c" Value="0x00000000 // bc0f $001cef7c" Description="Fix hang by skip branch if copro 0 condition false." />
|
||||
</Executable>
|
||||
<Executable Name="SLPM_551.91;1" Title="L2 - Love x Loop">
|
||||
<Patch Address="0x001B4828" Value="0x10000008" Description="Avoid bug in code that fiddles with SP and causes the stack to be clobbered by SifCallRpc. Requires proper data cache handling to avoid issue." />
|
||||
</Executable>
|
||||
<Executable Name="SCES_500.03;1" Title="Dead or Alive 2" Region="EU">
|
||||
<Patch Address="0x002b4c44" Value="0x24060000" Description="Make the file reading RPC call synchronous. Requires proper data cache handling to avoid issue." />
|
||||
</Executable>
|
||||
<Executable Name="SLPS_250.02;1" Title="Dead or Alive 2">
|
||||
<Patch Address="0x00290408" Value="0x24060000" Description="Make the file reading RPC call synchronous. Requires proper data cache handling to avoid issue." />
|
||||
</Executable>
|
||||
<Executable Name="SLUS_200.24;1" Title="Blood Omen 2">
|
||||
<Patch Address="0x00463018" Value="0x03E00008" Description="Nullify custom exception handler." />
|
||||
<Patch Address="0x0046301C" Value="0x24020001" Description="Nullify custom exception handler." />
|
||||
</Executable>
|
||||
</Patches>
|
Loading…
Add table
Add a link
Reference in a new issue