Merge pull request #7326 from daniel229/motorstorm_func_replace

Function replace in MotorStorm: Arctic Edge
This commit is contained in:
Henrik Rydgård 2015-01-13 10:58:24 +01:00
commit 74640dce11
2 changed files with 11 additions and 0 deletions

View File

@ -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, },
{}
};

View File

@ -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