remove one of the hacks
authornotaz <notasas@gmail.com>
Thu, 14 Dec 2023 19:05:21 +0000 (21:05 +0200)
committernotaz <notasas@gmail.com>
Thu, 14 Dec 2023 22:33:00 +0000 (00:33 +0200)
seems to no longer be needed
added in 979b861b31ef1f5033db5bd4433b842944300a3e

libpcsxcore/database.c
libpcsxcore/new_dynarec/pcsxmem.c
libpcsxcore/psxcommon.h
libpcsxcore/psxhw.c
libpcsxcore/psxhw.h

index 379207c..4872202 100644 (file)
@@ -45,12 +45,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 */
@@ -85,7 +79,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),
index e61e8a3..905f3a2 100644 (file)
@@ -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)
index dce4f41..a25e625 100644 (file)
@@ -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;
index 8179d95..0a46875 100644 (file)
@@ -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;
 
index 574ee33..3017c90 100644 (file)
@@ -93,7 +93,6 @@ void psxHwWriteChcr6(u32 value);
 void psxHwWriteDmaIcr32(u32 value);
 void psxHwWriteGpuSR(u32 value);
 u32  psxHwReadGpuSR(void);
-u32  psxHwReadGpuSRbusyHack(void);
 
 #ifdef __cplusplus
 }