Merge pull request #7127 from daniel229/func_replace_kankatbr

Replace frame download in Kenka Banchou Bros: Tokyo Battle Royale
This commit is contained in:
Henrik Rydgård 2014-12-03 12:45:38 +01:00
commit 28c754a757
2 changed files with 11 additions and 0 deletions

View File

@ -779,6 +779,15 @@ static int Hook_danganronpa1_2_download_frame() {
return 0;
}
static int Hook_kankabanchoutbr_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
@ -843,6 +852,7 @@ static const ReplacementTableEntry entries[] = {
{ "danganronpa2_2_download_frame", &Hook_danganronpa2_2_download_frame, 0, REPFLAG_HOOKENTER, 0x94 },
{ "danganronpa1_1_download_frame", &Hook_danganronpa1_1_download_frame, 0, REPFLAG_HOOKENTER, 0x78 },
{ "danganronpa1_2_download_frame", &Hook_danganronpa1_2_download_frame, 0, REPFLAG_HOOKENTER, 0xA8 },
{ "kankabanchoutbr_download_frame", &Hook_kankabanchoutbr_download_frame, 0, REPFLAG_HOOKENTER, },
{}
};

View File

@ -138,6 +138,7 @@ static const HardHashTableEntry hardcodedHashes[] = {
{ 0x1c967be07917ddc9, 92, "strcat", },
{ 0x1d03fa48334ca966, 556, "_strtol_r", },
{ 0x1d1311966d2243e9, 428, "suikoden1_and_2_download_frame_1", }, // Gensou Suikoden 1&2
{ 0x1d7de04b4e87d00b, 680, "kankabanchoutbr_download_frame", }, // Kenka Banchou Bros: Tokyo Battle Royale
{ 0x1e1525e3bc2f6703, 676, "rint", },
{ 0x1ec055f28bb9f4d1, 88, "gu_update_stall", },
{ 0x1f53eac122f96b37, 224, "cosf", },