From 05612bbc255c5b9c4bc4472bb248d8d7ddc64c03 Mon Sep 17 00:00:00 2001 From: daniel229 Date: Sun, 3 Jan 2016 22:28:38 +0800 Subject: [PATCH] Replace function in Little Busters! Converted Edition --- Core/HLE/ReplaceTables.cpp | 10 ++++++++++ Core/MIPS/MIPSAnalyst.cpp | 1 + 2 files changed, 11 insertions(+) diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index facdb57f27..617b173d72 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -1061,6 +1061,15 @@ static int Hook_atvoffroadfuryblazintrails_download_frame() { return 0; } +static int Hook_littlebustersce_download_frame() { + const u32 fb_address = currentMIPS->r[MIPS_REG_A0]; + 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) @@ -1160,6 +1169,7 @@ static const ReplacementTableEntry entries[] = { { "sdgundamggenerationportable_download_frame", &Hook_sdgundamggenerationportable_download_frame, 0, REPFLAG_HOOKENTER, 0x34 }, { "atvoffroadfurypro_download_frame", &Hook_atvoffroadfurypro_download_frame, 0, REPFLAG_HOOKENTER, }, { "atvoffroadfuryblazintrails_download_frame", &Hook_atvoffroadfuryblazintrails_download_frame, 0, REPFLAG_HOOKENTER, }, + { "littlebustersce_download_frame", &Hook_littlebustersce_download_frame, 0, REPFLAG_HOOKENTER, }, {} }; diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index e894021fc1..73713e8671 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -428,6 +428,7 @@ static const HardHashTableEntry hardcodedHashes[] = { { 0xdcdf7e1c1a3dc260, 372, "strncmp", }, { 0xdcfc28e624a81bf1, 5476, "_dtoa_r", }, { 0xddfa5a85937aa581, 32, "vdot_q", }, + { 0xdeb6a583659e3948, 1080, "littlebustersce_download_frame", }, // Little Busters! Converted Edition (JP) { 0xe0214719d8a0aa4e, 104, "strstr", }, { 0xe029f0699ca3a886, 76, "matrix300_transform_by", }, { 0xe086d5c9ce89148f, 212, "bokunonatsuyasumi4_download_frame", }, // Boku no Natsuyasumi 2 and 4,