diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index 6c435a9aa8..eb2bba9b5e 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -690,6 +690,15 @@ static int Hook_kagaku_no_ensemble_download_frame() { return 0; } +static int Hook_soranokiseki_fc_download_frame() { + const u32 fb_address = currentMIPS->r[MIPS_REG_A2]; + if (Memory::IsVRAMAddress(fb_address)) { + gpu->PerformMemoryDownload(fb_address, 0x00044000); + CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc); + } + return 0; +} + // Can either replace with C functions or functions emitted in Asm/ArmAsm. static const ReplacementTableEntry entries[] = { // TODO: I think some games can be helped quite a bit by implementing the @@ -747,6 +756,7 @@ static const ReplacementTableEntry entries[] = { { "suikoden1_and_2_download_frame_2", &Hook_suikoden1_and_2_download_frame_2, 0, REPFLAG_HOOKENTER, 0x48 }, { "rezel_cross_download_frame", &Hook_rezel_cross_download_frame, 0, REPFLAG_HOOKENTER, 0x54 }, { "kagaku_no_ensemble_download_frame", &Hook_kagaku_no_ensemble_download_frame, 0, REPFLAG_HOOKENTER, 0x38 }, + { "soranokiseki_fc_download_frame", &Hook_soranokiseki_fc_download_frame, 0, REPFLAG_HOOKENTER, 0x180 }, {} }; diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index e176219cdf..839108f3d4 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -344,6 +344,7 @@ static const HardHashTableEntry hardcodedHashes[] = { { 0xb8bd1f0e02e9ad87, 156, "dl_write_light_dir", }, { 0xb8cfaeebfeb2de20, 7548, "_vfprintf_r", }, { 0xb97f352e85661af6, 32, "finitef", }, + { 0xba76a8e853426baa, 544, "soranokiseki_fc_download_frame", }, // Sora no kiseki FC { 0xbb3c6592ed319ba4, 132, "dl_write_fog_params", }, { 0xbb7d7c93e4c08577, 124, "__truncdfsf2", }, { 0xbdf54d66079afb96, 200, "dl_write_bone_matrix_3", },