diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index 246b74ef10..601d3db80d 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -985,6 +985,15 @@ static int Hook_soranokiseki_sc_download_frame() { return 0; } +static int Hook_amagoushi_download_frame() { + // Amagoushi no Yakata (ULJS00216) offscreen picking pass renders to 0x04000000 or 0x04080000. + // Flush GPU framebuffer to VRAM before CPU decodes pixels into hit-test table. + gpu->PerformReadbackToMemory(0x04000000, 0x00044000); + gpu->PerformReadbackToMemory(0x04080000, 0x00044000); + NotifyMemInfo(MemBlockFlags::WRITE, 0x04000000, 0x00044000, "amagoushi_download_frame"); + return 0; +} + static int Hook_bokunonatsuyasumi4_download_frame() { const u32 fb_address = currentMIPS->r[MIPS_REG_A3]; if (Memory::IsVRAMAddress(fb_address)) { @@ -1917,6 +1926,7 @@ static const ReplacementTableEntry entries[] = { { "kagaku_no_ensemble_download_frame", &Hook_kagaku_no_ensemble_download_frame, 0, REPFLAG_HOOKENTER, 0x38 }, { "soranokiseki_fc_download_frame", &Hook_soranokiseki_fc_download_frame, 0, REPFLAG_HOOKENTER, 0x180 }, { "soranokiseki_sc_download_frame", &Hook_soranokiseki_sc_download_frame, 0, REPFLAG_HOOKENTER, }, + { "amagoushi_download_frame", &Hook_amagoushi_download_frame, 0, REPFLAG_HOOKENTER }, { "bokunonatsuyasumi4_download_frame", &Hook_bokunonatsuyasumi4_download_frame, 0, REPFLAG_HOOKENTER, 0x8C }, { "danganronpa2_1_download_frame", &Hook_danganronpa2_1_download_frame, 0, REPFLAG_HOOKENTER, 0x68 }, { "danganronpa2_2_download_frame", &Hook_danganronpa2_2_download_frame, 0, REPFLAG_HOOKENTER, 0x94 }, diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index fe736e5dfd..fb80a052c8 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -125,6 +125,7 @@ static const HardHashTableEntry hardcodedHashes[] = { { 0x11624abe9542fb01, 180, "everybodysgolf_copy_portrait", }, // Everybody's Golf (EUR) { 0x1252e902d0b49bfb, 44, "vector_sub_q_2", }, { 0x12df3d33a58d0298, 52, "sceVfpuMatrix3Unit", }, + { 0x12eed64025f5052bULL, 268, "amagoushi_download_frame", }, // Amagoushi no Yakata (ULJS00216) { 0x12feef7b017d3431, 700, "memmove", }, { 0x1322c7e3fe6dff4d, 784, "_free_r", }, { 0x1376c115d5f1d90c, 36, "strlen", }, diff --git a/assets/compat.ini b/assets/compat.ini index 210efb81eb..3ecb1364dd 100644 --- a/assets/compat.ini +++ b/assets/compat.ini @@ -1472,6 +1472,11 @@ ULUS10435 = true ULES01277 = true [ForceLowerResolutionForEffectsOn] +# Amagoushi no Yakata series - offscreen solid color ID picking pass (issue #22514) +ULJS00216 = true +ULJS00230 = true +NPJH50186 = true + # The water effect of DiRT 2 and Outrun doesn't work in higher resolutions. # Colin McRae's DiRT 2 - issue #13012 (water)