diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index a21fce13db..3fa1059460 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -1140,6 +1140,15 @@ static int Hook_katamari_screenshot_to_565() { return 0; } +static int Hook_mytranwars_upload_frame() { + u32 fb_address = currentMIPS->r[MIPS_REG_S0]; + if (Memory::IsVRAMAddress(fb_address)) { + gpu->PerformMemoryUpload(fb_address, 0x00088000); + CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc); + } + return 0; +} + #define JITFUNC(f) (&MIPSComp::MIPSFrontendInterface::f) // Can either replace with C functions or functions emitted in Asm/ArmAsm. @@ -1236,6 +1245,7 @@ static const ReplacementTableEntry entries[] = { { "omertachinmokunookitethelegacy_download_frame", &Hook_omertachinmokunookitethelegacy_download_frame, 0, REPFLAG_HOOKENTER, 0x88 }, { "katamari_render_check", &Hook_katamari_render_check, 0, REPFLAG_HOOKENTER, 0, }, { "katamari_screenshot_to_565", &Hook_katamari_screenshot_to_565, 0, REPFLAG_HOOKENTER, 0 }, + { "mytranwars_upload_frame", &Hook_mytranwars_upload_frame, 0, REPFLAG_HOOKENTER, 0x128 }, {} }; diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index c0523a3632..69497cd7a3 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -325,6 +325,7 @@ static const HardHashTableEntry hardcodedHashes[] = { { 0x95bd33ac373c019a, 24, "fabsf", }, { 0x9705934b0950d68d, 280, "dl_write_framebuffer_ptr", }, { 0x9734cf721bc0f3a1, 732, "atanf", }, + { 0x99b85c5fce389911, 408, "mytranwars_upload_frame", }, // Mytran Wars { 0x99c9288185c352ea, 592, "orenoimouto_download_frame_2", }, // Ore no Imouto ga Konnani Kawaii Wake ga Nai { 0x9a06b9d5c16c4c20, 76, "dl_write_clut_ptrload", }, { 0x9b88b739267d189e, 88, "strrchr", },