Replace frame download in Sakurasou No Pet Na Kanojo

This commit is contained in:
daniel229 2014-09-11 15:32:07 +08:00
parent f7b669a740
commit 7c1d4234ab
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_A1];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, 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, 0x304 },
{ "orenoimouto_download_frame", &Hook_orenoimouto_download_frame, 0, REPFLAG_HOOKENTER, 0x88 },
{ "sakurasou_download_frame", &Hook_sakurasou_download_frame, 0, REPFLAG_HOOKENTER, 0x17c },
{}
};

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