diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index b9340646835f..ae4453f9ad62 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -643,6 +643,15 @@ static int Hook_orenoimouto_download_frame() { return 0; } +static int Hook_sakurasou_download_frame() { + const u32 fb_address = currentMIPS->r[MIPS_REG_V0]; + if (Memory::IsVRAMAddress(fb_address)) { + gpu->PerformMemoryDownload(fb_address, 0x00088000); + CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, 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 @@ -695,6 +704,7 @@ static const ReplacementTableEntry entries[] = { { "narisokonai_download_frame", &Hook_narisokonai_download_frame, 0, REPFLAG_HOOKENTER, 0x14 }, { "kirameki_school_life_download_frame", &Hook_kirameki_school_life_download_frame, 0, REPFLAG_HOOKENTER }, { "orenoimouto_download_frame", &Hook_orenoimouto_download_frame, 0, REPFLAG_HOOKENTER }, + { "sakurasou_download_frame", &Hook_sakurasou_download_frame, 0, REPFLAG_HOOKENTER, 0xF8 }, {} }; diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index 08438fbd3b33..4d884a1d6482 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -345,6 +345,7 @@ static const HardHashTableEntry hardcodedHashes[] = { { 0xbe773f78afd1a70f, 128, "rand", }, { 0xbf5d02ccb8514881, 108, "strcmp", }, { 0xbf791954ebef4afb, 396, "expf", }, + { 0xbfa8c16038b7753d, 868, "sakurasou_download_frame", }, // Sakurasou No Pet Na Kanojo { 0xc062f2545ef5dc39, 1076, "kirameki_school_life_download_frame", },// Kirameki School Life SP,and Boku wa Tomodati ga Sukunai { 0xc0feb88cc04a1dc7, 48, "vector_negate_t", }, { 0xc1f34599d0b9146b, 116, "__subdf3", },