From aec9e25be95f1ac9ac13d4df2964333752a49320 Mon Sep 17 00:00:00 2001 From: daniel229 Date: Thu, 12 Feb 2015 20:36:17 +0800 Subject: [PATCH] Another replace frame download in Photo Kano. --- Core/HLE/ReplaceTables.cpp | 10 ++++++++++ Core/MIPS/MIPSAnalyst.cpp | 1 + 2 files changed, 11 insertions(+) diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index 5c3f62dffb..70b7532267 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -922,6 +922,15 @@ static int Hook_photokano_download_frame() { return 0; } +static int Hook_photokano_download_frame_2() { + const u32 fb_address = currentMIPS->r[MIPS_REG_A1]; + if (Memory::IsVRAMAddress(fb_address)) { + gpu->PerformMemoryDownload(fb_address, 0x00088000); + CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc); + } + return 0; +} + #ifdef ARM #define JITFUNC(f) (&MIPSComp::ArmJit::f) #elif defined(_M_X64) || defined(_M_IX86) @@ -1008,6 +1017,7 @@ static const ReplacementTableEntry entries[] = { { "motorstorm_download_frame", &Hook_motorstorm_download_frame, 0, REPFLAG_HOOKENTER, }, { "utawarerumono_download_frame", &Hook_utawarerumono_download_frame, 0, REPFLAG_HOOKENTER, }, { "photokano_download_frame", &Hook_photokano_download_frame, 0, REPFLAG_HOOKENTER, 0x2C }, + { "photokano_download_frame_2", &Hook_photokano_download_frame_2, 0, REPFLAG_HOOKENTER, }, {} }; diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index 271f1a8fcd..2a3e3c1eea 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -451,6 +451,7 @@ static const HardHashTableEntry hardcodedHashes[] = { { 0xf4d797cef4ac88cd, 684, "_free_r", }, { 0xf4ea7d2ec943fa02, 224, "sinf", }, { 0xf4f8cdf479dfc4a4, 224, "sinf", }, + { 0xf527d906d69005a0, 848, "photokano_download_frame_2", }, // Photo Kano { 0xf52f993e444b6c52, 44, "dl_write_shademode", }, { 0xf56641884b36c638, 468, "scalbn", }, { 0xf5e91870b5b76ddc, 288, "motorstorm_download_frame", }, // MotorStorm: Arctic Edge