From 0c2126b9446fea1eb2a4e4c84fcb5ac1f364e81c Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 14 Dec 2023 21:05:21 +0200 Subject: [PATCH] remove one of the hacks seems to no longer be needed added in 979b861b31ef1f5033db5bd4433b842944300a3e --- libpcsxcore/database.c | 7 ------- libpcsxcore/new_dynarec/pcsxmem.c | 4 ---- libpcsxcore/psxcommon.h | 1 - libpcsxcore/psxhw.c | 18 +----------------- libpcsxcore/psxhw.h | 1 - 5 files changed, 1 insertion(+), 30 deletions(-) diff --git a/libpcsxcore/database.c b/libpcsxcore/database.c index 66b54f44..86a24a49 100644 --- a/libpcsxcore/database.c +++ b/libpcsxcore/database.c @@ -39,12 +39,6 @@ static const char * const gpu_slow_llist_db[] = "SLES02731", "SLPS02477", "SLPS03198", "SLUS01138", }; -static const char * const gpu_busy_hack_db[] = -{ - /* ToHeart (Japan) */ - "SLPS01919", "SLPS01920", -}; - static const char * const gpu_centering_hack_db[] = { /* Gradius Gaiden */ @@ -79,7 +73,6 @@ hack_db[] = { HACK_ENTRY(cdr_read_timing, cdr_read_hack_db), HACK_ENTRY(gpu_slow_list_walking, gpu_slow_llist_db), - HACK_ENTRY(gpu_busy, gpu_busy_hack_db), HACK_ENTRY(gpu_centering, gpu_centering_hack_db), HACK_ENTRY(gpu_timing1024, dualshock_timing1024_hack_db), HACK_ENTRY(dualshock_init_analog, dualshock_init_analog_hack_db), diff --git a/libpcsxcore/new_dynarec/pcsxmem.c b/libpcsxcore/new_dynarec/pcsxmem.c index e61e8a35..905f3a2c 100644 --- a/libpcsxcore/new_dynarec/pcsxmem.c +++ b/libpcsxcore/new_dynarec/pcsxmem.c @@ -510,10 +510,6 @@ void new_dyna_pcsx_mem_reset(void) // plugins might change so update the pointers map_item(&mem_iortab[IOMEM32(0x1810)], GPU_readData, 1); map_item(&mem_iowtab[IOMEM32(0x1810)], GPU_writeData, 1); - if (Config.hacks.gpu_busy) - map_item(&mem_iortab[IOMEM32(0x1814)], psxHwReadGpuSRbusyHack, 1); - else - map_item(&mem_iortab[IOMEM32(0x1814)], psxHwReadGpuSR, 1); } void new_dyna_pcsx_mem_shutdown(void) diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h index dce4f41e..a25e6252 100644 --- a/libpcsxcore/psxcommon.h +++ b/libpcsxcore/psxcommon.h @@ -150,7 +150,6 @@ typedef struct { struct { boolean cdr_read_timing; boolean gpu_slow_list_walking; - boolean gpu_busy; boolean gpu_centering; boolean dualshock_init_analog; boolean gpu_timing1024; diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c index 8179d959..0a468753 100644 --- a/libpcsxcore/psxhw.c +++ b/libpcsxcore/psxhw.c @@ -27,8 +27,6 @@ #include "cdrom.h" #include "gpu.h" -static u32 (*psxHwReadGpuSRptr)(void) = psxHwReadGpuSR; - void psxHwReset() { memset(psxH, 0, 0x10000); @@ -36,8 +34,6 @@ void psxHwReset() { cdrReset(); psxRcntInit(); HW_GPU_STATUS = SWAP32(0x10802000); - psxHwReadGpuSRptr = Config.hacks.gpu_busy - ? psxHwReadGpuSRbusyHack : psxHwReadGpuSR; } void psxHwWriteIstat(u32 value) @@ -121,18 +117,6 @@ u32 psxHwReadGpuSR(void) return v; } -// a hack due to poor timing of gpu idle bit -// to get rid of this, GPU draw times, DMAs, cpu timing has to fall within -// certain timing window or else games like "ToHeart" softlock -u32 psxHwReadGpuSRbusyHack(void) -{ - u32 v = psxHwReadGpuSR(); - static u32 hack; - if (!(hack++ & 3)) - v &= ~PSXGPU_nBUSY; - return v; -} - u8 psxHwRead8(u32 add) { u8 hard; @@ -254,7 +238,7 @@ u32 psxHwRead32(u32 add) { case 0x1124: hard = psxRcntRmode(2); break; case 0x1128: hard = psxRcntRtarget(2); break; case 0x1810: hard = GPU_readData(); break; - case 0x1814: hard = psxHwReadGpuSRptr(); break; + case 0x1814: hard = psxHwReadGpuSR(); break; case 0x1820: hard = mdecRead0(); break; case 0x1824: hard = mdecRead1(); break; diff --git a/libpcsxcore/psxhw.h b/libpcsxcore/psxhw.h index 574ee333..3017c901 100644 --- a/libpcsxcore/psxhw.h +++ b/libpcsxcore/psxhw.h @@ -93,7 +93,6 @@ void psxHwWriteChcr6(u32 value); void psxHwWriteDmaIcr32(u32 value); void psxHwWriteGpuSR(u32 value); u32 psxHwReadGpuSR(void); -u32 psxHwReadGpuSRbusyHack(void); #ifdef __cplusplus } -- 2.39.5