Merge pull request #6880 from daniel229/func_replace_sakurasou

Replace frame download in Sakurasou No Pet Na Kanojo

Conflicts:
	Core/HLE/ReplaceTables.cpp
This commit is contained in:
Unknown W. Brackets 2014-09-12 22:28:27 -07:00
commit a892779f89
2 changed files with 11 additions and 0 deletions

View file

@ -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 },
{}
};

View file

@ -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", },