diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index 7e53eda2b..282c364ff 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -895,6 +895,15 @@ static int Hook_flowers_download_frame() { return 0; } +static int Hook_motorstorm_download_frame() { + const u32 fb_address = Memory::Read_U32(currentMIPS->r[MIPS_REG_A1] + 0x18); + 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) @@ -978,6 +987,7 @@ static const ReplacementTableEntry entries[] = { { "toheart2_download_frame", &Hook_toheart2_download_frame, 0, REPFLAG_HOOKENTER, }, { "toheart2_download_frame_2", &Hook_toheart2_download_frame_2, 0, REPFLAG_HOOKENTER, 0x18 }, { "flowers_download_frame", &Hook_flowers_download_frame, 0, REPFLAG_HOOKENTER, 0x44 }, + { "motorstorm_download_frame", &Hook_motorstorm_download_frame, 0, REPFLAG_HOOKENTER, }, {} }; diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index 87c1b76ef..9cf1324fe 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -440,6 +440,7 @@ static const HardHashTableEntry hardcodedHashes[] = { { 0xf4f8cdf479dfc4a4, 224, "sinf", }, { 0xf52f993e444b6c52, 44, "dl_write_shademode", }, { 0xf56641884b36c638, 468, "scalbn", }, + { 0xf5e91870b5b76ddc, 288, "motorstorm_download_frame", }, // MotorStorm: Arctic Edge { 0xf5f7826b4a61767c, 40, "matrix_copy_q", }, { 0xf73c094e492bc163, 396, "hypot", }, { 0xf773297d89ff7a63, 532, "kumonohatateni_download_frame", }, // Amatsumi Sora ni Kumo no Hatate ni, and Hanakisou