Hook Dissidia's avi record func.

This makes it so replays can be recorded.  Though you could probably just
record separately anyway.
This commit is contained in:
Unknown W. Brackets 2014-07-13 08:36:34 -07:00
parent 98d3dc4be8
commit 81096f6bd0
2 changed files with 12 additions and 0 deletions

View File

@ -531,6 +531,16 @@ static int Hook_ff1_battle_effect() {
return 0;
}
static int Hook_dissidia_recordframe_avi() {
// This is called once per frame, and records that frame's data to avi.
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
@ -575,6 +585,7 @@ static const ReplacementTableEntry entries[] = {
{ "starocean_write_stencil", &Hook_starocean_write_stencil, 0, REPFLAG_HOOKENTER, 0x260},
{ "topx_create_saveicon", &Hook_topx_create_saveicon, 0, REPFLAG_HOOKENTER, 0x34},
{ "ff1_battle_effect", &Hook_ff1_battle_effect, 0, REPFLAG_HOOKENTER},
{ "dissidia_recordframe_avi", &Hook_dissidia_recordframe_avi, 0, REPFLAG_HOOKENTER},
{}
};

View File

@ -157,6 +157,7 @@ static const HardHashTableEntry hardcodedHashes[] = {
{ 0x335df69db1073a8d, 96, "wcscpy", },
{ 0x35d3527ff8c22ff2, 56, "matrix_scale_q", },
{ 0x373ce518eee5a2d2, 20, "matrix300_store_q", },
{ 0x3840f5766fada4b1, 592, "dissidia_recordframe_avi", }, // Dissidia, Dissidia 012
{ 0x388043e96b0e11fd, 144, "dl_write_material_2", },
{ 0x38f19bc3be215acc, 388, "log10f", },
{ 0x393047f06eceaba1, 96, "strcspn", },