mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
Merge pull request #12387 from unknownbrackets/motorstorm
HLE: Replace Motorstorm pixel read func
This commit is contained in:
2 files changed
+11
No files matched your search
@@ -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 },
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@@ -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", },
|
||||
|
||||
Reference in new issue
Block a user