Merge pull request #12387 from unknownbrackets/motorstorm

HLE: Replace Motorstorm pixel read func
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2020-02-21 14:37:30 +01:00
commit 8048977ba0
2 files changed
+11

No files matched your search

+10
View File
@@ -1230,6 +1230,15 @@ static int Hook_starocean_clear_framebuf_after() {
return 0;
}
static int Hook_motorstorm_pixel_read() {
u32 fb_address = Memory::Read_U32(currentMIPS->r[MIPS_REG_A0] + 0x18);
u32 fb_height = Memory::Read_U16(currentMIPS->r[MIPS_REG_A0] + 0x26);
u32 fb_stride = Memory::Read_U16(currentMIPS->r[MIPS_REG_A0] + 0x28);
gpu->PerformMemoryDownload(fb_address, fb_height * fb_stride);
CBreakPoints::ExecMemCheck(fb_address, true, fb_height * fb_stride, currentMIPS->pc);
return 0;
}
#define JITFUNC(f) (&MIPSComp::MIPSFrontendInterface::f)
// Can either replace with C functions or functions emitted in Asm/ArmAsm.
@@ -1341,6 +1350,7 @@ static const ReplacementTableEntry entries[] = {
{ "marvelalliance1_copy", &Hook_marvelalliance1_copy_after, 0, REPFLAG_HOOKENTER, 0x69c },
{ "starocean_clear_framebuf", &Hook_starocean_clear_framebuf_before, 0, REPFLAG_HOOKENTER, 0 },
{ "starocean_clear_framebuf", &Hook_starocean_clear_framebuf_after, 0, REPFLAG_HOOKEXIT, 0 },
{ "motorstorm_pixel_read", &Hook_motorstorm_pixel_read, 0, REPFLAG_HOOKENTER, 0 },
{}
};
+1
View File
@@ -175,6 +175,7 @@ static const HardHashTableEntry hardcodedHashes[] = {
{ 0x3024e961d1811dea, 396, "fmod", },
{ 0x3050bfd0e729dfbf, 220, "atvoffroadfuryblazintrails_download_frame", }, // ATV Offroad Fury Blazin' Trails (US)
{ 0x30c9c4f420573eb6, 540, "expf", },
{ 0x311779b4db21dbf3, 124, "motorstorm_pixel_read" }, // Motorstorm Arctic Edge (US)
{ 0x317afeb882ff324a, 212, "memcpy", }, // Mimana (US)
{ 0x31ea2e192f5095a1, 52, "vector_add_t", },
{ 0x31f523ef18898e0e, 420, "logf", },