"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 */
{
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),
// 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)
struct {
boolean cdr_read_timing;
boolean gpu_slow_list_walking;
- boolean gpu_busy;
boolean gpu_centering;
boolean dualshock_init_analog;
boolean gpu_timing1024;
#include "cdrom.h"
#include "gpu.h"
-static u32 (*psxHwReadGpuSRptr)(void) = psxHwReadGpuSR;
-
void psxHwReset() {
memset(psxH, 0, 0x10000);
cdrReset();
psxRcntInit();
HW_GPU_STATUS = SWAP32(0x10802000);
- psxHwReadGpuSRptr = Config.hacks.gpu_busy
- ? psxHwReadGpuSRbusyHack : psxHwReadGpuSR;
}
void psxHwWriteIstat(u32 value)
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;
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;
void psxHwWriteDmaIcr32(u32 value);
void psxHwWriteGpuSR(u32 value);
u32 psxHwReadGpuSR(void);
-u32 psxHwReadGpuSRbusyHack(void);
#ifdef __cplusplus
}