diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index c7f5c1bc7d..4237f9a9a9 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -1034,6 +1034,16 @@ static int Hook_tonyhawkp8_upload_tutorial_frame() { return 0; } +static int Hook_sdgundamggenerationportable_download_frame() { + const u32 fb_address = currentMIPS->r[MIPS_REG_A3]; + 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(ARM64) @@ -1130,6 +1140,7 @@ static const ReplacementTableEntry entries[] = { { "gakuenheaven_download_frame", &Hook_gakuenheaven_download_frame, 0, REPFLAG_HOOKENTER, }, { "youkosohitsujimura_download_frame", &Hook_youkosohitsujimura_download_frame, 0, REPFLAG_HOOKENTER, 0x94 }, { "tonyhawkp8_upload_tutorial_frame", &Hook_tonyhawkp8_upload_tutorial_frame, 0, REPFLAG_HOOKENTER, }, + { "sdgundamggenerationportable_download_frame", &Hook_sdgundamggenerationportable_download_frame, 0, REPFLAG_HOOKENTER, 0x34 }, {} }; diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index 9dea9cc5e3..86f61f314d 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -148,6 +148,7 @@ static const HardHashTableEntry hardcodedHashes[] = { { 0x2876ed93c5fd1211, 328, "dl_write_matrix_4", }, { 0x2965b1ad3ca15cc1, 44, "vtfm_t", }, { 0x299a370587df078f, 116, "strange_copy_routine", }, + { 0x2aa9634a9951c7df, 212, "sdgundamggenerationportable_download_frame", }, // SD Gundam G Generation Portable { 0x2abca53599f09ea7, 608, "dl_write_matrix_3", }, { 0x2adb92e8855c454e, 48, "vtfm_q", }, { 0x2adc229bef7bbc75, 40, "isnan", },