Skip to content

Commit

Permalink
Replace frame download in Sakurasou No Pet Na Kanojo
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel229 committed Sep 11, 2014
1 parent f7b669a commit 7c1d423
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Core/HLE/ReplaceTables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 },
{}
};

Expand Down
1 change: 1 addition & 0 deletions Core/MIPS/MIPSAnalyst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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", },
Expand Down

0 comments on commit 7c1d423

Please sign in to comment.